SlideShare une entreprise Scribd logo
1  sur  20
giving an @ignite talk at @chirp entitled
"energy / tweet".
about 2 minutes ago via mobile web from Fort Mason, San Francisco
Sustainability
Physics 101
Energy
Power | Energy per time
Lightbulbs | 100W
iPhone
Globalization
BMR
tweet | twēt | verb
Twitter weight loss plan
Electrical energy per Tweet
Twitter architecture
Social graph
Testing and measuring
Run
Math
Global implications
Energy / Tweet

Contenu connexe

Plus de Raffi Krikorian

Twitter for CS10 @ Berkeley (Spring 2011)
Twitter for CS10 @ Berkeley (Spring 2011)Twitter for CS10 @ Berkeley (Spring 2011)
Twitter for CS10 @ Berkeley (Spring 2011)Raffi Krikorian
 
Twitter by the Numbers (Columbia University)
Twitter by the Numbers (Columbia University)Twitter by the Numbers (Columbia University)
Twitter by the Numbers (Columbia University)Raffi Krikorian
 
Twitter and the Real-Time Web
Twitter and the Real-Time WebTwitter and the Real-Time Web
Twitter and the Real-Time WebRaffi Krikorian
 
Twitter - Guest Lecture UC Berkeley CS10 Fall 2010
Twitter - Guest Lecture UC Berkeley CS10 Fall 2010Twitter - Guest Lecture UC Berkeley CS10 Fall 2010
Twitter - Guest Lecture UC Berkeley CS10 Fall 2010Raffi Krikorian
 
Developing for @twitterapi #hack4health
Developing for @twitterapi #hack4healthDeveloping for @twitterapi #hack4health
Developing for @twitterapi #hack4healthRaffi Krikorian
 
Intro to developing for @twitterapi (updated)
Intro to developing for @twitterapi (updated)Intro to developing for @twitterapi (updated)
Intro to developing for @twitterapi (updated)Raffi Krikorian
 
How to use Geolocation in your webapp @ FOWA Dublin 2010
How to use Geolocation in your webapp @ FOWA Dublin 2010How to use Geolocation in your webapp @ FOWA Dublin 2010
How to use Geolocation in your webapp @ FOWA Dublin 2010Raffi Krikorian
 
Intro to developing for @twitterapi
Intro to developing for @twitterapiIntro to developing for @twitterapi
Intro to developing for @twitterapiRaffi Krikorian
 
"What's Happening" to "What's Happening Here" @ Chirp
"What's Happening" to "What's Happening Here" @ Chirp"What's Happening" to "What's Happening Here" @ Chirp
"What's Happening" to "What's Happening Here" @ ChirpRaffi Krikorian
 
Handling Real-time Geostreams
Handling Real-time GeostreamsHandling Real-time Geostreams
Handling Real-time GeostreamsRaffi Krikorian
 
Adding the "Where" to the "When"
Adding the "Where" to the "When"Adding the "Where" to the "When"
Adding the "Where" to the "When"Raffi Krikorian
 
Scala + WattzOn, sitting in a tree....
Scala + WattzOn, sitting in a tree....Scala + WattzOn, sitting in a tree....
Scala + WattzOn, sitting in a tree....Raffi Krikorian
 
WattzOn Whole Earth Simulator
WattzOn Whole Earth SimulatorWattzOn Whole Earth Simulator
WattzOn Whole Earth SimulatorRaffi Krikorian
 
Broken Hearts: How Valentine's Day causes global warming
Broken Hearts: How Valentine's Day causes global warmingBroken Hearts: How Valentine's Day causes global warming
Broken Hearts: How Valentine's Day causes global warmingRaffi Krikorian
 

Plus de Raffi Krikorian (20)

500Startups @ Twitter
500Startups @ Twitter500Startups @ Twitter
500Startups @ Twitter
 
Twitter for CS10 @ Berkeley (Spring 2011)
Twitter for CS10 @ Berkeley (Spring 2011)Twitter for CS10 @ Berkeley (Spring 2011)
Twitter for CS10 @ Berkeley (Spring 2011)
 
Twitter by the Numbers (Columbia University)
Twitter by the Numbers (Columbia University)Twitter by the Numbers (Columbia University)
Twitter by the Numbers (Columbia University)
 
Users and Geo
Users and GeoUsers and Geo
Users and Geo
 
Twitter and the Real-Time Web
Twitter and the Real-Time WebTwitter and the Real-Time Web
Twitter and the Real-Time Web
 
Twitter - Guest Lecture UC Berkeley CS10 Fall 2010
Twitter - Guest Lecture UC Berkeley CS10 Fall 2010Twitter - Guest Lecture UC Berkeley CS10 Fall 2010
Twitter - Guest Lecture UC Berkeley CS10 Fall 2010
 
Developing for @twitterapi #hack4health
Developing for @twitterapi #hack4healthDeveloping for @twitterapi #hack4health
Developing for @twitterapi #hack4health
 
Twitter by the Numbers
Twitter by the NumbersTwitter by the Numbers
Twitter by the Numbers
 
Intro to developing for @twitterapi (updated)
Intro to developing for @twitterapi (updated)Intro to developing for @twitterapi (updated)
Intro to developing for @twitterapi (updated)
 
How to use Geolocation in your webapp @ FOWA Dublin 2010
How to use Geolocation in your webapp @ FOWA Dublin 2010How to use Geolocation in your webapp @ FOWA Dublin 2010
How to use Geolocation in your webapp @ FOWA Dublin 2010
 
Intro to developing for @twitterapi
Intro to developing for @twitterapiIntro to developing for @twitterapi
Intro to developing for @twitterapi
 
Twitter API Annotations
Twitter API AnnotationsTwitter API Annotations
Twitter API Annotations
 
"What's Happening" to "What's Happening Here" @ Chirp
"What's Happening" to "What's Happening Here" @ Chirp"What's Happening" to "What's Happening Here" @ Chirp
"What's Happening" to "What's Happening Here" @ Chirp
 
Handling Real-time Geostreams
Handling Real-time GeostreamsHandling Real-time Geostreams
Handling Real-time Geostreams
 
Adding the "Where" to the "When"
Adding the "Where" to the "When"Adding the "Where" to the "When"
Adding the "Where" to the "When"
 
What's happening here?
What's happening here?What's happening here?
What's happening here?
 
WattzOn @ ETech 2009
WattzOn @ ETech 2009WattzOn @ ETech 2009
WattzOn @ ETech 2009
 
Scala + WattzOn, sitting in a tree....
Scala + WattzOn, sitting in a tree....Scala + WattzOn, sitting in a tree....
Scala + WattzOn, sitting in a tree....
 
WattzOn Whole Earth Simulator
WattzOn Whole Earth SimulatorWattzOn Whole Earth Simulator
WattzOn Whole Earth Simulator
 
Broken Hearts: How Valentine's Day causes global warming
Broken Hearts: How Valentine's Day causes global warmingBroken Hearts: How Valentine's Day causes global warming
Broken Hearts: How Valentine's Day causes global warming
 

Dernier

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 

Dernier (20)

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 

Energy / Tweet

Notes de l'éditeur

  1. * my name is raffi krikorian * work on the platform team - responsible for the APIs that developers use to call Twitter * brady coerced me into giving a talk entitled "energy per tweet"
  2. * for a while i’ve been interested in sustainability * the crux of it is how can we do things better for the planet? * how can we do things in a way that is not harmful for the planet -- whether this means getting electricity through renewable means, or using things that are recycled
  3. * before we can really talk about energy per tweet, we should talk about some basic physics that i'm sure you've all long forgotten * there are two basic quantities that i should refresh everybody's knowledge on * energy and power -- they are intertwined, but their stories are going to flow through the rest of my talk
  4. * energy == work * there are two ways to think about it * another way to think about it literally goes back to work. if you were to pick up a kg from the floor and put it on a table, say a meter high, you've done work. you've expended energy. one J of energy to be exact.
  5. * power is the companion to energy in this story * power is a “Rate” - its something that you keep on spending * a watt, for example, is the amount of joules (remember the kilogram weight?) that is spent per second. * if i were to move that weight from the floor to the table in a second, i would have exerted one watt of power * but i would have to keep on doing that over and over to maintain one watt
  6. * the lightbulb is probably the most common thing where people interact with power * a 100W lightbulb is expending as much power as me lifting 100 kilograms (200 ish pounds - more than i weigh) up to a one meter high table every single second and continuing to do that. imagine that. its lifting me, just over a meter, every second to keep that lightbulb running. * my 13" macbook pro has a 60W power adapter. that's less power than an incandescent bulb. you can see why people switch to CFL light bulbs that only use 23Ws to give the same power as 100W incandescent bulb.
  7. * how does this relate to tweeting? * there are a few things that i want to pull apart, and they are all core to twitter
  8. * of course, a mobile is in twitter's DNA * as you know, a huge percentage of our traffic comes from mobile devices from all over the world * let's look at one of these devices, the iPhone * when i first ordered my iPhone, i anxiously waited for it to show up * i remember watching fedex to watch this magical device be shipped from shenzhen china, to alaska via fedex, and then from there to me * it flew across the world for it to show up at my door.... and then for me to throw away a year later when the 3G came out.
  9. * that’s a prime example of globalization * not only is the device coming from china and being shipped to me, but its components come from all around the world and need to get to china to be put together * things like the CPU and the video chip need to come in from singapore, and they need to get the silicon from somewhere * internal circuitry comes from taiwan * plastics come from oil which probably needs to be shipped in from the middle east * there is a whole story of the world that is going on in my phone alone * and just imagine how much energy was spent putting this all together. some estimates put it at 400 megajoules. that’s me lifting a kilogram of weight to a table that is as far away as the moon.
  10. * there is something called the basal metabolic rate (BMR) * that's the amount of energy expended while at rest - mine is 1800 C - basically, that's how many calories i burn by just sleeping all the time * a small hummingbird, on the other hand, only consumes about 6 C. * but, look how small it is! i do something like 20 kilocalories per kilogram of "me", where as the humming bird does about 1600 per kilogram of "it" * small little dynamo
  11. * so - given how much energy is spent at rest, what if you’re actually doing something? * get off your butt, take that iphone i talked about, and sent a tweet? * for somebody like me, it really comes out to about 1 kilocalorie (big C) to type frantically for about a minute. so, let’s say it takes you a minute to compose a tweet. you’re burning about 1 calories to pull that off.
  12. * is that a good weight loss plan? * sarcastically : *maybe* * we only let you send about 120 tweets every three hours - so you could burn off about 120 calories every three hours (but you would have to type something new every time) * a mocha from starbucks puts about 300 calories onto my hips, so if i can just cut those off and tweet more, then i would be good. (of course, don’t forget you eat other stuff throughout the day)
  13. * so, the biggest question, however, is how much electrical energy does it take for twitter to process a tweet? * just to get it out in front, i’m probably not going to say the actual number, but i’ll give some numbers that are in the ballpark * where do we use energy? we have to power all the machines in our data center. if you’ve ever been in our war room at operations in the office, we’re power projectors, and screens, computers, VPN links, etc., all to monitor the system. we spend a lot of computing power to smoothly run through our 50 million tweets a day.
  14. * all of this really comes down to our architecture -- which is just a whole bunch of tubes. we have to shuttle tweets around the system in real time. * its pretty well known that we run ruby and rails (mostly) on our front end servers, and we run mysql as the backend data storage system * and we have some really great talks tomorrow from people like ryan king, eric jensen, john kalucki, and others talking a lot more about our backend infrastructures. things like how we are changing the servers that are running our systems, how search takes incoming tweets and consumes them, and how we push this data out of our system in real time. * basically, we have hundreds of computers focused on the problem of ingesting tweets and getting them out again
  15. * thinking about all that gets quickly overwhelming, and if we just want to get a zeroth order estimate -- basically a really rough estimate -- of how much energy, one has to think about the social graph * fundamentally, twitter has to take an incoming tweet that you send, and put it in the timelines of all the people who are following you. * the more people who are following you (say, you’re barack obama and have 3.6 million followers), twitter has to make sure that tweet gets delivered to 3.6 million people * if we were to take a postal system analogy, you give a tweet to a mailman who has to then copy that tweet and stick it into the mailboxes of all your followers * the more followers you have, the more people we have to deliver that tweet to * followers are like a power law -- a lot of people have a lot of followers, and a lot of people have a small number of followers. let’s say, on average, that comes out to about 120 people who follow you.
  16. * the experiment is as follows * we have a development mode for twitter codebase * we can run the rals up in dev mode * but we still start up almost all the relevant portions of the application * can run the entire thing on our developer laptops to get an almost full twitter experience * run the development mode version of twitter (memcache, database, etc.) all on laptop * cleanly restarted laptop
  17. * loaded it up with requests and calling /status/update over and over and over * basically, trying to max out the system on the laptop to see how much we can push off * really, we’re trying to measure the throughput of the system. we know how much power my laptop is taking, so we just want to pump through the most number of tweets that we can in that time.
  18. * 65W laptop - can push out about a tweet every 1.25 seconds * multiply those out - its about 90 J / tweet * google has said that each google search takes about 1 kJ / tweet (10x more expensive) * good thing - i’m running this in development - our numbers in production are more like - 3x less than that
  19. * going with my 90J / tweet number, that’s something like 0.02 g of CO2 per tweet * that’s a small number, but small numbers add up - if we put in our 50M per day, then we’re talking 1000 kg of CO2 a day * if we ran all the tweets through my laptop, that’s one metric ton of CO2 a day * again, thankfully, we’re better than that
  20. * and we can do better * working on efficiency