code for the earth ocp apac tokyo 2013-05
TRANSCRIPT
![Page 1: Code for the earth OCP APAC Tokyo 2013-05](https://reader030.vdocuments.site/reader030/viewer/2022032419/55a3d5eb1a28ab75398b45f4/html5/thumbnails/1.jpg)
Code for the EarthOCP APAC Engineering Workshop Tokyo
Day2 (2013-5-28)
• Application Framework (eco PHP)• Measurement of Runtime Efficiency
Cloud Business AllianceTetsu Saburi, Hideyuki Fukuhara
![Page 2: Code for the earth OCP APAC Tokyo 2013-05](https://reader030.vdocuments.site/reader030/viewer/2022032419/55a3d5eb1a28ab75398b45f4/html5/thumbnails/2.jpg)
Session Positioning
Application Frameworkdesigning “eco PHP” and promote “code for earth”
Measurement of Runtime Efficiency
This Topic
OCP Project
![Page 3: Code for the earth OCP APAC Tokyo 2013-05](https://reader030.vdocuments.site/reader030/viewer/2022032419/55a3d5eb1a28ab75398b45f4/html5/thumbnails/3.jpg)
100 Google searches = 30Wh
How much energy do you use when you type in a Google search or watch a YouTube video? Google said that 100 searches are equal to a 60-watt light bulb burning for 28 minutes. "Specifically, we currently use about 0.0003 kWh of energy to answer the average search query," Google said. "This translates into roughly 0.2g of carbon dioxide."
2011 PC Magazine
60W
28minx 100 =
We ICT user should care about energy consumption of the service that we use.
![Page 4: Code for the earth OCP APAC Tokyo 2013-05](https://reader030.vdocuments.site/reader030/viewer/2022032419/55a3d5eb1a28ab75398b45f4/html5/thumbnails/4.jpg)
APPLICATION FRAMEWORKnew programming culture (eco PHP) for electric-power-efficiency
![Page 5: Code for the earth OCP APAC Tokyo 2013-05](https://reader030.vdocuments.site/reader030/viewer/2022032419/55a3d5eb1a28ab75398b45f4/html5/thumbnails/5.jpg)
Eco Application Framework
Eco Programming
Eco PlatformSoftware
x
efficiency =work servedby program
Energyconsumption
Measurement of Runtime Efficiency
Hardware(Application Framework)
(CPU, …, Shipho)
Programmer
PHPengine
![Page 6: Code for the earth OCP APAC Tokyo 2013-05](https://reader030.vdocuments.site/reader030/viewer/2022032419/55a3d5eb1a28ab75398b45f4/html5/thumbnails/6.jpg)
Eco Programming
Only using eco platform is not enough
eco platform + good program = efficient
Eco car
Only using eco caris not enough
eco car + bad driving = wasting energy
eco car + eco driving = efficient
eco platform + bad program = not efficient
Programming Convention
Driving Manner
Eco Platform
Eco Platform
Eco Platform
![Page 7: Code for the earth OCP APAC Tokyo 2013-05](https://reader030.vdocuments.site/reader030/viewer/2022032419/55a3d5eb1a28ab75398b45f4/html5/thumbnails/7.jpg)
Eco Platform
OS
Library
Language
Server ClusterCPUs
print “Hello World”
programmer
Framework
Current framework and language is designed only for programmer
Eco Platform is designed for the earth and programmer.
= flexible, scalable, and efficient across the entire stackand easy to maintain
PHP, Ruby, Python, Java, Javascript, C#, …, Django, RoR, …, OpenMPI, …
programmer
language Application framework
H/W(CPU)
library
e.g. - eco PHP platform - eco Ruby platform
Application - Web Application - High Performance Computing (CFD, bio, …)
![Page 8: Code for the earth OCP APAC Tokyo 2013-05](https://reader030.vdocuments.site/reader030/viewer/2022032419/55a3d5eb1a28ab75398b45f4/html5/thumbnails/8.jpg)
Distributed Computing Platform for Cluster
……
App
AppApp
AppApp
App
App App AppApp App AppApp
App
IaaS/Hardware Distributed Platform
OS
VM distributed application platform
server server
Distributed Platform consists of - distributed execute engine: load management and execution fault tolerance - distributed storage: fault tolerance for persistent data - distributed memory: fault tolerance for runtime data (temporary data) - easy to maintain
Flavor - Web: small and frequent application (affinity and cache consideration) - HPC: big and long life application (runtime robust, <-homomorphic coding)
For cluster (many servers), high efficient and easy-to-use platform is needed.
![Page 9: Code for the earth OCP APAC Tokyo 2013-05](https://reader030.vdocuments.site/reader030/viewer/2022032419/55a3d5eb1a28ab75398b45f4/html5/thumbnails/9.jpg)
As tim
e g o on- Com
ple x- H
eavy- Expensi ve
Web Application Framework for Cluster
HTTP + Cookie + CGI
HTTP + Application Server + Session
HTTP + Heavy Application Server + Heavy Object Session
Load Balancer
Heavy Load Balancermemchache
Web App Framework History
- simple server framework for cluster- minimum session, minimum server persistence- reconsideration of cookie and client (instead of session & load balancer model)- not only request/response model but also publish/subscribe model or …
Reconsideration of Web App Framework for efficiency
e.g.
HTTP + Cookie + CGI/wsgi/rack/… or PHP(no session or minimum session framework)
Light Load Balance(low cost and loose relation of user & server, DNS RR, SDN, …)
+
+ +
RDB+
RDB
NoSQL+ +cache+
Rails, Django, …
NoSQL
time
![Page 10: Code for the earth OCP APAC Tokyo 2013-05](https://reader030.vdocuments.site/reader030/viewer/2022032419/55a3d5eb1a28ab75398b45f4/html5/thumbnails/10.jpg)
Eco PHP Platform
•Eco PHP language= subset of PHP (optimized for Compiler and CPU like http://asmjs.org/ in JS world)
•Eco programming convention and Eco Programmer•Eco library
•Eco language engine•HipHop compiler•HipHop machine (VM, Processor, SoC)
•Eco framework for cluster•Application framework with distributed computing
technology•Disaggregated Rack
![Page 11: Code for the earth OCP APAC Tokyo 2013-05](https://reader030.vdocuments.site/reader030/viewer/2022032419/55a3d5eb1a28ab75398b45f4/html5/thumbnails/11.jpg)
Eco Programming Culture
new programming culture
Eco programming is more electric-power-efficient programming. Eco language, eco platform, eco programming convention, and eco programmer makes the world better.
eco PHP is cool!
Like Eco Wordpress
![Page 12: Code for the earth OCP APAC Tokyo 2013-05](https://reader030.vdocuments.site/reader030/viewer/2022032419/55a3d5eb1a28ab75398b45f4/html5/thumbnails/12.jpg)
Goal
Create new programming culture• Build eco application framework (eco PHP and middleware)• Foster eco programmer (eco programming conventions)
Key technology• Building eco platform to maximize runtime efficiency on OCP
physical system• Measurement of runtime efficiency
![Page 13: Code for the earth OCP APAC Tokyo 2013-05](https://reader030.vdocuments.site/reader030/viewer/2022032419/55a3d5eb1a28ab75398b45f4/html5/thumbnails/13.jpg)
MEASUREMENT OF RUNTIME EFFICIENCY
for the most efficient computing infrastructures
![Page 14: Code for the earth OCP APAC Tokyo 2013-05](https://reader030.vdocuments.site/reader030/viewer/2022032419/55a3d5eb1a28ab75398b45f4/html5/thumbnails/14.jpg)
Measuring efficiency
Hacking Conventional Computing Infrastructure
We started a project at Facebook almost two years ago with a pretty big goal: to build one of the most efficient computing infrastructures at the lowest possible cost. We decided to honor our hacker roots and challenge convention by custom designing and building our software, servers and data centers from the ground up – and then share these technologies as they evolve.
Measure the runtime efficiency
![Page 15: Code for the earth OCP APAC Tokyo 2013-05](https://reader030.vdocuments.site/reader030/viewer/2022032419/55a3d5eb1a28ab75398b45f4/html5/thumbnails/15.jpg)
Runtime energy efficiency
calls of Function A
Energy consumption of
CPU (Wh)
user operations of Application A
Energy consumption of
server (Wh)
Work served
Energyconsumption
e.g.
![Page 16: Code for the earth OCP APAC Tokyo 2013-05](https://reader030.vdocuments.site/reader030/viewer/2022032419/55a3d5eb1a28ab75398b45f4/html5/thumbnails/16.jpg)
Example of efficiency
Facebook users
Power Plants
Blogviews & updates
/ sec
Racks
CPUs
convert(),edit(), …
Library calls/ sec
![Page 17: Code for the earth OCP APAC Tokyo 2013-05](https://reader030.vdocuments.site/reader030/viewer/2022032419/55a3d5eb1a28ab75398b45f4/html5/thumbnails/17.jpg)
energy measurement scopework granularity
CPU CPU + memory
CPU + memory + IO
… Server … Servers …
Code snippet
Function
Application
work served
energy consumption
Choice of numerator and denominator
Work granularity•Code snippet: e.g. for(){…}, …•Function: e.g. regex, image processing, …•Application: e.g. wordpress•Service: facebook
Energy consumption measurement scope•CPU•CPU + memory …•Server …•+ Network + Client
![Page 18: Code for the earth OCP APAC Tokyo 2013-05](https://reader030.vdocuments.site/reader030/viewer/2022032419/55a3d5eb1a28ab75398b45f4/html5/thumbnails/18.jpg)
Type of measurement application / server
work load eco Wordpress 201x
Load scenario A- user behavior A- 1000 user- 10 min
energy measurement scope Server (OCP1.0 H/W) x 1
Example 1: Application/Server
Application (wordpress)
A ServerEnergyconsum
ption
Work (Load)
Eco wordpress 2014
Eco wordpress 2015
Eco wordpress 2016 Year
Test pattern (work load) is contributed by facebook/linaro results?
![Page 19: Code for the earth OCP APAC Tokyo 2013-05](https://reader030.vdocuments.site/reader030/viewer/2022032419/55a3d5eb1a28ab75398b45f4/html5/thumbnails/19.jpg)
Example2: CFD Benchmark/A Disaggregated Rack
Fluid Calculation (CFD Benchmark)
A Disaggregated Rack for HPC
![Page 20: Code for the earth OCP APAC Tokyo 2013-05](https://reader030.vdocuments.site/reader030/viewer/2022032419/55a3d5eb1a28ab75398b45f4/html5/thumbnails/20.jpg)
Relations with other OCP Project
• HipHop Project (PHP Compiler, PHP VM)• Processor or SoC Project? (Intel, AMD, ARM, …)• Disaggregated Rack• Japan chapter: “eco Ruby” sub project
![Page 21: Code for the earth OCP APAC Tokyo 2013-05](https://reader030.vdocuments.site/reader030/viewer/2022032419/55a3d5eb1a28ab75398b45f4/html5/thumbnails/21.jpg)
2015 document
1 . Application Framework1.1 Eco PHP 20151.1.1 language spec1.1.2 programming convention
2. Measurement 2.1 wordpress/rack2.2 2014 vs 2015…
Documents in future
2014 document
1. Application Framework1.1 Eco PHP 20141.1.1 language spec1.1.2 programming convention
2. Measurement 2.1 wordpress/server3. Future vision
Application FrameworkAnd
Measurement of Runtime Efficiency2014
2016 document
1. Application Framework1.1 Eco PHP 20161.1.1 language spec1.1.2 programming convention1.2. Eco Ruby 2016…
2. Measurement 2.1 wordpress/rack2.2 eco library/CPU… Energy
Work (Load)Eco wordpress
2014
Eco wordpress 2015
Eco wordpress 2016