SlideShare une entreprise Scribd logo
1  sur  43
Télécharger pour lire hors ligne
Improving Running
  Components

  Evan Weaver
  Twitter, Inc.
  QCon London, 2009
Many tools:

  Rails
    C
  Scala
   Java
 MySQL
Rails front-end:

    rendering
cache composition
   db querying
Middleware:

  Memcached
Varnish (cache)
 Kestrel (MQ)
 comet server
Milestone 1: Cache policy

   Optimization plan:

    1. stop working
   2. share the work
     3. work faster
Old
Everything runs from
memory in Web 2.0.
First policy change:
       vector cache

Stores arrays of tweet pkeys
       Write-through
        99% hit rate
Second policy change:
       row cache

Store records from the db
    (Tweets and users)
      Write-through
       95% hit rate
Third policy change:
     fragment cache

Stores rendered version of
    tweets for the API
      Read-through
       95% hit rate
Fourth policy change:
giving the page cache its own
          cache pool

     Generational keys
     Low hit rate (40%)
Visibility was lacking.

      Peep tool
Dumps a live memcached
         heap
Cache only was living
                         five hours
mysql> select round(round(log10(3576669 - last_read_time) * 5, 0) / 5, 1) as log, round(avg(3576669 - last_read_time), -2) as freshness, count(*),
rpad('', count(*) / 2000, '*') as bar from entries group by log order by log desc;
+------+-----------+----------+------------------------------------------------------------------------------------------------------------------+
| log | freshness | count(*) | bar                                                                                                               |
+------+-----------+----------+------------------------------------------------------------------------------------------------------------------+
| NULL |         0|     13400 | *******                                                                                                          |
| 6.6 |    3328300 |      940 |                                                                                                                  |
| 6.2 |    1623200 |        1|                                                                                                                   |
| 5.2 |     126200 |        1|                                                                                                                   |
| 5.0 |      81100 |      343 |                                                                                                                  |
| 4.8 |      64800 |     3200 | **                                                                                                               |
| 4.6 |      34800 |    18064 | *********                                                                                                        |
| 4.4 |      24200 |    96739 | ************************************************                                                                 |
| 4.2 |      15700 |   212865 | **********************************************************************************************************       |
| 4.0 |      10200 |   224703 | **************************************************************************************************************** |
| 3.8 |       6500 |   158067 | *******************************************************************************                                  |
| 3.6 |       4100 |   108034 | ******************************************************                                                           |
| 3.4 |       2600 |    82000 | *****************************************                                                                        |
| 3.2 |       1600 |    65637 | *********************************                                                                                |
| 3.0 |       1000 |    49267 | *************************                                                                                        |
| 2.8 |        600 |    34398 | *****************                                                                                                |
| 2.6 |        400 |    24322 | ************                                                                                                     |
| 2.4 |        300 |    19865 | **********                                                                                                       |
| 2.2 |        200 |    14810 | *******                                                                                                          |
| 2.0 |        100 |    10108 | *****                                                                                                            |
| 1.8 |        100 |     8002 | ****                                                                                                             |
| 1.6 |          0|      6479 | ***                                                                                                              |
| 1.4 |          0|      4014 | **                                                                                                               |
| 1.2 |          0|      2297 | *                                                                                                                |
| 1.0 |          0|      1733 | *                                                                                                                |
| 0.8 |          0|       649 |                                                                                                                  |
| 0.6 |          0|       710 |                                                                                                                  |
| 0.4 |          0|       672 |                                                                                                                  |
| 0.0 |          0|       319 |                                                                                                                  |
+------+-----------+----------+------------------------------------------------------------------------------------------------------------------+
What does a timeline miss
        mean?

     Container union

/home rebuild reads through
  your followings’ profiles
New
Milestone 2:
     Message queue

A component with problems
Purpose in a web app:

Move operations out of the
synchronous request cycle

 Amortize load over time
Inauguration, 2009
Simplest MQ ever:
Gives up constraints for scalability
    No strict ordering of jobs
 No shared state among servers
       Just like memcached
   Uses memcached protocol
First version was written in
            Ruby

  Ruby is “optimization-
        resistant”
  Mainly due to the GC
If the consumers could not
keep pace, the MQ would fill
         up and crash

 Ported it to Scala for this
          reason
Good tooling
for the Java GC:

   JConsole
    Yourkit
Poor tooling for the Ruby
          GC:

 Railsbench w/patches
 BleakHouse w/patches
  Valgrind/Memcheck
  MBARI 1.8.6 patches
Our Railsbench GC tunings

      35% speed increase
RUBY_HEAP_MIN_SLOTS=500000
RUBY_HEAP_SLOTS_INCREMENT=250000
RUBY_HEAP_SLOTS_GROWTH_FACTOR=1
RUBY_GC_MALLOC_LIMIT=50000000
RUBY_HEAP_FREE_MIN=4096
Situational decision:

Scala is a flexible language
(But libraries a bit lacking)
We have experienced JVM
         engineers
Big rewrites fail...?

      Small rewrite:
  No new features added
   Well-defined interface
Already went over the wire
Deployed to 1 MQ host

    Fixed regressions

Eventually deployed to all
          hosts
Milestone 3:
 the memcached client

Optimizing a critical path
Switched to libmemcached, a
 new C Memcached client

We are now the biggest user
  and biggest 3rd-party
       contributor
Uses a SWIG Ruby binding I
 started a year or so ago

  Compatibility among
memcached clients is critical
Twitter is big, and runs hot

Flushing the cache would be
        catastrophic
Spent endless time on
backwards compatibility

A/B tested the new client
     over 3 months
MQ also benefitted

Memcached can be a generic
lightweight service protocol

   We also use Thrift and
     HTTP internally
So many RPCs! Sometimes
 100s of Memcached round
     trips per request.

  “As a memory device gets
larger, it tends to get slower.”
Performance hierarchy is
 supposed to look like:
At web scale, it looks more
           like:
End
Links:
  C tools:
 - Peep http://github.com/fauna/peep/
 - Libmemcached http://tangent.org/552/libmemcached.html
 - Valgrind http://valgrind.org/

 JVM tools:
 - Kestrel http://github.com/robey/kestrel/
 - Smile http://github.com/robey/smile/
 - Jconsole http://openjdk.java.net/tools/svc/jconsole/
 - Yourkit http://www.yourkit.com/

 Ruby tools:
 - BleakHouse http://github.com/fauna/bleak_house/
 - Railsbench Ruby patches http://github.com/skaes/railsbench/
 - MBARI Ruby patches http://github.com/brentr/matzruby/tree/v1_8_6_287-mbari

 General:
 - Danga stack http://www.danga.com/words/2005_oscon/oscon-2005.pdf
 - Seymour Cray quote http://books.google.com/books?client=safari&id=qM4Yzf8K9hwC&dq=rapid
+development&q=cray&pgis=1
 - Last.fm downtime http://blog.last.fm/2008/04/18/possible-lastfm-downtime
twitter.com/evan

blog.evanweaver.com

    cloudbur.st

Contenu connexe

Dernier

THE OBSTACLES THAT IMPEDE THE DEVELOPMENT OF BRAZIL IN THE CONTEMPORARY ERA A...
THE OBSTACLES THAT IMPEDE THE DEVELOPMENT OF BRAZIL IN THE CONTEMPORARY ERA A...THE OBSTACLES THAT IMPEDE THE DEVELOPMENT OF BRAZIL IN THE CONTEMPORARY ERA A...
THE OBSTACLES THAT IMPEDE THE DEVELOPMENT OF BRAZIL IN THE CONTEMPORARY ERA A...
Faga1939
 
Powerful Love Spells in Phoenix, AZ (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Phoenix, AZ (310) 882-6330 Bring Back Lost LoverPowerful Love Spells in Phoenix, AZ (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Phoenix, AZ (310) 882-6330 Bring Back Lost Lover
PsychicRuben LoveSpells
 

Dernier (20)

THE OBSTACLES THAT IMPEDE THE DEVELOPMENT OF BRAZIL IN THE CONTEMPORARY ERA A...
THE OBSTACLES THAT IMPEDE THE DEVELOPMENT OF BRAZIL IN THE CONTEMPORARY ERA A...THE OBSTACLES THAT IMPEDE THE DEVELOPMENT OF BRAZIL IN THE CONTEMPORARY ERA A...
THE OBSTACLES THAT IMPEDE THE DEVELOPMENT OF BRAZIL IN THE CONTEMPORARY ERA A...
 
Julius Randle's Injury Status: Surgery Not Off the Table
Julius Randle's Injury Status: Surgery Not Off the TableJulius Randle's Injury Status: Surgery Not Off the Table
Julius Randle's Injury Status: Surgery Not Off the Table
 
Enjoy Night ≽ 8448380779 ≼ Call Girls In Gurgaon Sector 46 (Gurgaon)
Enjoy Night ≽ 8448380779 ≼ Call Girls In Gurgaon Sector 46 (Gurgaon)Enjoy Night ≽ 8448380779 ≼ Call Girls In Gurgaon Sector 46 (Gurgaon)
Enjoy Night ≽ 8448380779 ≼ Call Girls In Gurgaon Sector 46 (Gurgaon)
 
Enjoy Night ≽ 8448380779 ≼ Call Girls In Palam Vihar (Gurgaon)
Enjoy Night ≽ 8448380779 ≼ Call Girls In Palam Vihar (Gurgaon)Enjoy Night ≽ 8448380779 ≼ Call Girls In Palam Vihar (Gurgaon)
Enjoy Night ≽ 8448380779 ≼ Call Girls In Palam Vihar (Gurgaon)
 
BDSM⚡Call Girls in Sector 135 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 135 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 135 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 135 Noida Escorts >༒8448380779 Escort Service
 
06052024_First India Newspaper Jaipur.pdf
06052024_First India Newspaper Jaipur.pdf06052024_First India Newspaper Jaipur.pdf
06052024_First India Newspaper Jaipur.pdf
 
BDSM⚡Call Girls in Indirapuram Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Indirapuram Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Indirapuram Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Indirapuram Escorts >༒8448380779 Escort Service
 
BDSM⚡Call Girls in Sector 143 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 143 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 143 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 143 Noida Escorts >༒8448380779 Escort Service
 
America Is the Target; Israel Is the Front Line _ Andy Blumenthal _ The Blogs...
America Is the Target; Israel Is the Front Line _ Andy Blumenthal _ The Blogs...America Is the Target; Israel Is the Front Line _ Andy Blumenthal _ The Blogs...
America Is the Target; Israel Is the Front Line _ Andy Blumenthal _ The Blogs...
 
AI as Research Assistant: Upscaling Content Analysis to Identify Patterns of ...
AI as Research Assistant: Upscaling Content Analysis to Identify Patterns of ...AI as Research Assistant: Upscaling Content Analysis to Identify Patterns of ...
AI as Research Assistant: Upscaling Content Analysis to Identify Patterns of ...
 
Gujarat-SEBCs.pdf pfpkoopapriorjfperjreie
Gujarat-SEBCs.pdf pfpkoopapriorjfperjreieGujarat-SEBCs.pdf pfpkoopapriorjfperjreie
Gujarat-SEBCs.pdf pfpkoopapriorjfperjreie
 
02052024_First India Newspaper Jaipur.pdf
02052024_First India Newspaper Jaipur.pdf02052024_First India Newspaper Jaipur.pdf
02052024_First India Newspaper Jaipur.pdf
 
Busty Desi⚡Call Girls in Sector 62 Noida Escorts >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Sector 62 Noida Escorts >༒8448380779 Escort ServiceBusty Desi⚡Call Girls in Sector 62 Noida Escorts >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Sector 62 Noida Escorts >༒8448380779 Escort Service
 
Embed-2 (1).pdfb[k[k[[k[kkkpkdpokkdpkopko
Embed-2 (1).pdfb[k[k[[k[kkkpkdpokkdpkopkoEmbed-2 (1).pdfb[k[k[[k[kkkpkdpokkdpkopko
Embed-2 (1).pdfb[k[k[[k[kkkpkdpokkdpkopko
 
Verified Love Spells in Little Rock, AR (310) 882-6330 Get My Ex-Lover Back
Verified Love Spells in Little Rock, AR (310) 882-6330 Get My Ex-Lover BackVerified Love Spells in Little Rock, AR (310) 882-6330 Get My Ex-Lover Back
Verified Love Spells in Little Rock, AR (310) 882-6330 Get My Ex-Lover Back
 
Enjoy Night ≽ 8448380779 ≼ Call Girls In Gurgaon Sector 48 (Gurgaon)
Enjoy Night ≽ 8448380779 ≼ Call Girls In Gurgaon Sector 48 (Gurgaon)Enjoy Night ≽ 8448380779 ≼ Call Girls In Gurgaon Sector 48 (Gurgaon)
Enjoy Night ≽ 8448380779 ≼ Call Girls In Gurgaon Sector 48 (Gurgaon)
 
WhatsApp 📞 8448380779 ✅Call Girls In Chaura Sector 22 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Chaura Sector 22 ( Noida)WhatsApp 📞 8448380779 ✅Call Girls In Chaura Sector 22 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Chaura Sector 22 ( Noida)
 
Powerful Love Spells in Phoenix, AZ (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Phoenix, AZ (310) 882-6330 Bring Back Lost LoverPowerful Love Spells in Phoenix, AZ (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Phoenix, AZ (310) 882-6330 Bring Back Lost Lover
 
Enjoy Night ≽ 8448380779 ≼ Call Girls In Gurgaon Sector 47 (Gurgaon)
Enjoy Night ≽ 8448380779 ≼ Call Girls In Gurgaon Sector 47 (Gurgaon)Enjoy Night ≽ 8448380779 ≼ Call Girls In Gurgaon Sector 47 (Gurgaon)
Enjoy Night ≽ 8448380779 ≼ Call Girls In Gurgaon Sector 47 (Gurgaon)
 
Embed-4.pdf lkdiinlajeklhndklheduhuekjdh
Embed-4.pdf lkdiinlajeklhndklheduhuekjdhEmbed-4.pdf lkdiinlajeklhndklheduhuekjdh
Embed-4.pdf lkdiinlajeklhndklheduhuekjdh
 

En vedette

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

En vedette (20)

Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 

Improving Running Components at Twitter

  • 1. Improving Running Components Evan Weaver Twitter, Inc. QCon London, 2009
  • 2. Many tools: Rails C Scala Java MySQL
  • 3. Rails front-end: rendering cache composition db querying
  • 4. Middleware: Memcached Varnish (cache) Kestrel (MQ) comet server
  • 5. Milestone 1: Cache policy Optimization plan: 1. stop working 2. share the work 3. work faster
  • 6. Old
  • 8. First policy change: vector cache Stores arrays of tweet pkeys Write-through 99% hit rate
  • 9. Second policy change: row cache Store records from the db (Tweets and users) Write-through 95% hit rate
  • 10. Third policy change: fragment cache Stores rendered version of tweets for the API Read-through 95% hit rate
  • 11. Fourth policy change: giving the page cache its own cache pool Generational keys Low hit rate (40%)
  • 12. Visibility was lacking. Peep tool Dumps a live memcached heap
  • 13. Cache only was living five hours mysql> select round(round(log10(3576669 - last_read_time) * 5, 0) / 5, 1) as log, round(avg(3576669 - last_read_time), -2) as freshness, count(*), rpad('', count(*) / 2000, '*') as bar from entries group by log order by log desc; +------+-----------+----------+------------------------------------------------------------------------------------------------------------------+ | log | freshness | count(*) | bar | +------+-----------+----------+------------------------------------------------------------------------------------------------------------------+ | NULL | 0| 13400 | ******* | | 6.6 | 3328300 | 940 | | | 6.2 | 1623200 | 1| | | 5.2 | 126200 | 1| | | 5.0 | 81100 | 343 | | | 4.8 | 64800 | 3200 | ** | | 4.6 | 34800 | 18064 | ********* | | 4.4 | 24200 | 96739 | ************************************************ | | 4.2 | 15700 | 212865 | ********************************************************************************************************** | | 4.0 | 10200 | 224703 | **************************************************************************************************************** | | 3.8 | 6500 | 158067 | ******************************************************************************* | | 3.6 | 4100 | 108034 | ****************************************************** | | 3.4 | 2600 | 82000 | ***************************************** | | 3.2 | 1600 | 65637 | ********************************* | | 3.0 | 1000 | 49267 | ************************* | | 2.8 | 600 | 34398 | ***************** | | 2.6 | 400 | 24322 | ************ | | 2.4 | 300 | 19865 | ********** | | 2.2 | 200 | 14810 | ******* | | 2.0 | 100 | 10108 | ***** | | 1.8 | 100 | 8002 | **** | | 1.6 | 0| 6479 | *** | | 1.4 | 0| 4014 | ** | | 1.2 | 0| 2297 | * | | 1.0 | 0| 1733 | * | | 0.8 | 0| 649 | | | 0.6 | 0| 710 | | | 0.4 | 0| 672 | | | 0.0 | 0| 319 | | +------+-----------+----------+------------------------------------------------------------------------------------------------------------------+
  • 14.
  • 15. What does a timeline miss mean? Container union /home rebuild reads through your followings’ profiles
  • 16. New
  • 17. Milestone 2: Message queue A component with problems
  • 18. Purpose in a web app: Move operations out of the synchronous request cycle Amortize load over time
  • 20. Simplest MQ ever: Gives up constraints for scalability No strict ordering of jobs No shared state among servers Just like memcached Uses memcached protocol
  • 21. First version was written in Ruby Ruby is “optimization- resistant” Mainly due to the GC
  • 22. If the consumers could not keep pace, the MQ would fill up and crash Ported it to Scala for this reason
  • 23. Good tooling for the Java GC: JConsole Yourkit
  • 24.
  • 25. Poor tooling for the Ruby GC: Railsbench w/patches BleakHouse w/patches Valgrind/Memcheck MBARI 1.8.6 patches
  • 26. Our Railsbench GC tunings 35% speed increase RUBY_HEAP_MIN_SLOTS=500000 RUBY_HEAP_SLOTS_INCREMENT=250000 RUBY_HEAP_SLOTS_GROWTH_FACTOR=1 RUBY_GC_MALLOC_LIMIT=50000000 RUBY_HEAP_FREE_MIN=4096
  • 27. Situational decision: Scala is a flexible language (But libraries a bit lacking) We have experienced JVM engineers
  • 28. Big rewrites fail...? Small rewrite: No new features added Well-defined interface Already went over the wire
  • 29. Deployed to 1 MQ host Fixed regressions Eventually deployed to all hosts
  • 30. Milestone 3: the memcached client Optimizing a critical path
  • 31.
  • 32. Switched to libmemcached, a new C Memcached client We are now the biggest user and biggest 3rd-party contributor
  • 33. Uses a SWIG Ruby binding I started a year or so ago Compatibility among memcached clients is critical
  • 34. Twitter is big, and runs hot Flushing the cache would be catastrophic
  • 35. Spent endless time on backwards compatibility A/B tested the new client over 3 months
  • 36.
  • 37. MQ also benefitted Memcached can be a generic lightweight service protocol We also use Thrift and HTTP internally
  • 38. So many RPCs! Sometimes 100s of Memcached round trips per request. “As a memory device gets larger, it tends to get slower.”
  • 39. Performance hierarchy is supposed to look like:
  • 40. At web scale, it looks more like:
  • 41. End
  • 42. Links: C tools: - Peep http://github.com/fauna/peep/ - Libmemcached http://tangent.org/552/libmemcached.html - Valgrind http://valgrind.org/ JVM tools: - Kestrel http://github.com/robey/kestrel/ - Smile http://github.com/robey/smile/ - Jconsole http://openjdk.java.net/tools/svc/jconsole/ - Yourkit http://www.yourkit.com/ Ruby tools: - BleakHouse http://github.com/fauna/bleak_house/ - Railsbench Ruby patches http://github.com/skaes/railsbench/ - MBARI Ruby patches http://github.com/brentr/matzruby/tree/v1_8_6_287-mbari General: - Danga stack http://www.danga.com/words/2005_oscon/oscon-2005.pdf - Seymour Cray quote http://books.google.com/books?client=safari&id=qM4Yzf8K9hwC&dq=rapid +development&q=cray&pgis=1 - Last.fm downtime http://blog.last.fm/2008/04/18/possible-lastfm-downtime