Energy / Tweet

R
Raffi KrikorianPlatform Team Member
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
Energy / Tweet
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
1 of 20

Recommended

Schulich MBA 4 Myths of Digital Marketing by
Schulich MBA 4 Myths of Digital MarketingSchulich MBA 4 Myths of Digital Marketing
Schulich MBA 4 Myths of Digital MarketingSean Howard
723 views41 slides
Hacking Conway's Law by
Hacking Conway's LawHacking Conway's Law
Hacking Conway's LawRaffi Krikorian
5.1K views36 slides
Re-architecting on the Fly #OReillySACon by
Re-architecting on the Fly #OReillySACon Re-architecting on the Fly #OReillySACon
Re-architecting on the Fly #OReillySACon Raffi Krikorian
6.7K views131 slides
Real-time systems at Twitter (Velocity 2012) by
Real-time systems at Twitter (Velocity 2012)Real-time systems at Twitter (Velocity 2012)
Real-time systems at Twitter (Velocity 2012)Raffi Krikorian
10.6K views42 slides
Twitter: Engineering for Real-Time (Stanford ACM 2011) by
Twitter: Engineering for Real-Time (Stanford ACM 2011)Twitter: Engineering for Real-Time (Stanford ACM 2011)
Twitter: Engineering for Real-Time (Stanford ACM 2011)Raffi Krikorian
10.7K views140 slides
Securing Your Ecosystem (FOWA Las Vegas 2011) by
Securing Your Ecosystem (FOWA Las Vegas 2011)Securing Your Ecosystem (FOWA Las Vegas 2011)
Securing Your Ecosystem (FOWA Las Vegas 2011)Raffi Krikorian
4.7K views31 slides

More Related Content

More from Raffi Krikorian

500Startups @ Twitter by
500Startups @ Twitter500Startups @ Twitter
500Startups @ TwitterRaffi Krikorian
1K views33 slides
Twitter for CS10 @ Berkeley (Spring 2011) by
Twitter for CS10 @ Berkeley (Spring 2011)Twitter for CS10 @ Berkeley (Spring 2011)
Twitter for CS10 @ Berkeley (Spring 2011)Raffi Krikorian
1K views52 slides
Twitter by the Numbers (Columbia University) by
Twitter by the Numbers (Columbia University)Twitter by the Numbers (Columbia University)
Twitter by the Numbers (Columbia University)Raffi Krikorian
3.7K views37 slides
Users and Geo by
Users and GeoUsers and Geo
Users and GeoRaffi Krikorian
1.2K views64 slides
Twitter and the Real-Time Web by
Twitter and the Real-Time WebTwitter and the Real-Time Web
Twitter and the Real-Time WebRaffi Krikorian
1.4K views36 slides
Twitter - Guest Lecture UC Berkeley CS10 Fall 2010 by
Twitter - Guest Lecture UC Berkeley CS10 Fall 2010Twitter - Guest Lecture UC Berkeley CS10 Fall 2010
Twitter - Guest Lecture UC Berkeley CS10 Fall 2010Raffi Krikorian
2.4K views46 slides

More from Raffi Krikorian(20)

Twitter for CS10 @ Berkeley (Spring 2011) by Raffi Krikorian
Twitter for CS10 @ Berkeley (Spring 2011)Twitter for CS10 @ Berkeley (Spring 2011)
Twitter for CS10 @ Berkeley (Spring 2011)
Raffi Krikorian1K views
Twitter by the Numbers (Columbia University) by Raffi Krikorian
Twitter by the Numbers (Columbia University)Twitter by the Numbers (Columbia University)
Twitter by the Numbers (Columbia University)
Raffi Krikorian3.7K views
Twitter and the Real-Time Web by Raffi Krikorian
Twitter and the Real-Time WebTwitter and the Real-Time Web
Twitter and the Real-Time Web
Raffi Krikorian1.4K views
Twitter - Guest Lecture UC Berkeley CS10 Fall 2010 by Raffi Krikorian
Twitter - Guest Lecture UC Berkeley CS10 Fall 2010Twitter - Guest Lecture UC Berkeley CS10 Fall 2010
Twitter - Guest Lecture UC Berkeley CS10 Fall 2010
Raffi Krikorian2.4K views
Developing for @twitterapi #hack4health by Raffi Krikorian
Developing for @twitterapi #hack4healthDeveloping for @twitterapi #hack4health
Developing for @twitterapi #hack4health
Raffi Krikorian1.7K views
Intro to developing for @twitterapi (updated) by Raffi Krikorian
Intro to developing for @twitterapi (updated)Intro to developing for @twitterapi (updated)
Intro to developing for @twitterapi (updated)
Raffi Krikorian2.6K views
How to use Geolocation in your webapp @ FOWA Dublin 2010 by Raffi Krikorian
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
Raffi Krikorian1K views
Intro to developing for @twitterapi by Raffi Krikorian
Intro to developing for @twitterapiIntro to developing for @twitterapi
Intro to developing for @twitterapi
Raffi Krikorian10.5K views
"What's Happening" to "What's Happening Here" @ Chirp by Raffi 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
Raffi Krikorian1.4K views
Handling Real-time Geostreams by Raffi Krikorian
Handling Real-time GeostreamsHandling Real-time Geostreams
Handling Real-time Geostreams
Raffi Krikorian1.6K views
Adding the "Where" to the "When" by Raffi Krikorian
Adding the "Where" to the "When"Adding the "Where" to the "When"
Adding the "Where" to the "When"
Raffi Krikorian1.9K views
Scala + WattzOn, sitting in a tree.... by Raffi Krikorian
Scala + WattzOn, sitting in a tree....Scala + WattzOn, sitting in a tree....
Scala + WattzOn, sitting in a tree....
Raffi Krikorian1.6K views
Broken Hearts: How Valentine's Day causes global warming by Raffi Krikorian
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
Raffi Krikorian2.1K views

Recently uploaded

Webinar : Desperately Seeking Transformation - Part 2: Insights from leading... by
Webinar : Desperately Seeking Transformation - Part 2:  Insights from leading...Webinar : Desperately Seeking Transformation - Part 2:  Insights from leading...
Webinar : Desperately Seeking Transformation - Part 2: Insights from leading...The Digital Insurer
24 views52 slides
Uni Systems for Power Platform.pptx by
Uni Systems for Power Platform.pptxUni Systems for Power Platform.pptx
Uni Systems for Power Platform.pptxUni Systems S.M.S.A.
58 views21 slides
Future of AR - Facebook Presentation by
Future of AR - Facebook PresentationFuture of AR - Facebook Presentation
Future of AR - Facebook PresentationRob McCarty
22 views27 slides
The Forbidden VPN Secrets.pdf by
The Forbidden VPN Secrets.pdfThe Forbidden VPN Secrets.pdf
The Forbidden VPN Secrets.pdfMariam Shaba
20 views72 slides
Democratising digital commerce in India-Report by
Democratising digital commerce in India-ReportDemocratising digital commerce in India-Report
Democratising digital commerce in India-ReportKapil Khandelwal (KK)
20 views161 slides
STKI Israeli Market Study 2023 corrected forecast 2023_24 v3.pdf by
STKI Israeli Market Study 2023   corrected forecast 2023_24 v3.pdfSTKI Israeli Market Study 2023   corrected forecast 2023_24 v3.pdf
STKI Israeli Market Study 2023 corrected forecast 2023_24 v3.pdfDr. Jimmy Schwarzkopf
24 views29 slides

Recently uploaded(20)

Webinar : Desperately Seeking Transformation - Part 2: Insights from leading... by The Digital Insurer
Webinar : Desperately Seeking Transformation - Part 2:  Insights from leading...Webinar : Desperately Seeking Transformation - Part 2:  Insights from leading...
Webinar : Desperately Seeking Transformation - Part 2: Insights from leading...
Future of AR - Facebook Presentation by Rob McCarty
Future of AR - Facebook PresentationFuture of AR - Facebook Presentation
Future of AR - Facebook Presentation
Rob McCarty22 views
The Forbidden VPN Secrets.pdf by Mariam Shaba
The Forbidden VPN Secrets.pdfThe Forbidden VPN Secrets.pdf
The Forbidden VPN Secrets.pdf
Mariam Shaba20 views
STKI Israeli Market Study 2023 corrected forecast 2023_24 v3.pdf by Dr. Jimmy Schwarzkopf
STKI Israeli Market Study 2023   corrected forecast 2023_24 v3.pdfSTKI Israeli Market Study 2023   corrected forecast 2023_24 v3.pdf
STKI Israeli Market Study 2023 corrected forecast 2023_24 v3.pdf
HTTP headers that make your website go faster - devs.gent November 2023 by Thijs Feryn
HTTP headers that make your website go faster - devs.gent November 2023HTTP headers that make your website go faster - devs.gent November 2023
HTTP headers that make your website go faster - devs.gent November 2023
Thijs Feryn26 views
Piloting & Scaling Successfully With Microsoft Viva by Richard Harbridge
Piloting & Scaling Successfully With Microsoft VivaPiloting & Scaling Successfully With Microsoft Viva
Piloting & Scaling Successfully With Microsoft Viva
PharoJS - Zürich Smalltalk Group Meetup November 2023 by Noury Bouraqadi
PharoJS - Zürich Smalltalk Group Meetup November 2023PharoJS - Zürich Smalltalk Group Meetup November 2023
PharoJS - Zürich Smalltalk Group Meetup November 2023
Noury Bouraqadi139 views
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive by Network Automation Forum
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLiveAutomating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Special_edition_innovator_2023.pdf by WillDavies22
Special_edition_innovator_2023.pdfSpecial_edition_innovator_2023.pdf
Special_edition_innovator_2023.pdf
WillDavies2218 views
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N... by James Anderson
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
James Anderson126 views
Igniting Next Level Productivity with AI-Infused Data Integration Workflows by Safe Software
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Safe Software317 views
2024: A Travel Odyssey The Role of Generative AI in the Tourism Universe by Simone Puorto
2024: A Travel Odyssey The Role of Generative AI in the Tourism Universe2024: A Travel Odyssey The Role of Generative AI in the Tourism Universe
2024: A Travel Odyssey The Role of Generative AI in the Tourism Universe
Simone Puorto13 views
Five Things You SHOULD Know About Postman by Postman
Five Things You SHOULD Know About PostmanFive Things You SHOULD Know About Postman
Five Things You SHOULD Know About Postman
Postman38 views

Energy / Tweet

Editor's Notes

  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