fbmarc edited this page Sep 13, 2010 · 6 revisions
Clone this wiki locally

Welcome to the facebook-memcached wiki!

This is the official repository for facebook’s production version of memcached.

The memcached deployment at facebook is huge.

  • 1000 memcached servers
  • 25 terabytes of memory
  • 93 billion cached objects
  • 50 million memcache gets/second

To get to these numbers we’ve had to make a lot of tweaks to memcached.

We’ve decided to make our in-house version of memcached available on github so that others can review and benefit from our work. We’re including two branches.


This is what we’re running right now. We’ll keep this up to date as we fix bugs and make enhancements. The big changes found here are:

  • Improved connection buffer management.
  • Per-thread stats and elimination of global stats lock for everything
    but stat requests
  • Multiple UDP reply ports. (If you do a lot of UDP with linux, each core needs a separate UDP socket for replies to eliminate lock contention)
  • Dispatch deadlock fix.
  • Flat-memory allocator. Store objects as lists of fixed length blocks to eliminate slab ghettos


This is our integration of the official OSS memcached-1.2.5 release with our in-house version