+284,000,000,000 requests 5 different use cases Workload characteristics, locality, cache effectiveness 1
2 Cache Servers Web Servers Database
Understand workload characteristics Identify factors affecting performance Provide a benchmark for future studies 3
Distributed memory caching system Key-value store for small objects 4 Hash Function Memcached Servers Key
Capture traces through a Linux Kernel Module (LKM) Process traces with Hive 5 Memcached Transport (TCP/UDP) Network Ethernet LKM
6 PoolSizeDescription USRFewUser-account status information APPDozensObject metadata of a popular application SYSFewSystem data on service location VARDozensServer-side browser information ETCHundredsNonspecific, general purpose Contains server related information Anything that doesn’t belong to a specific pool goes to ETC
Workload Characteristics Locality, Cache Behavior 7
8 > 99.8% GET GET:UPDATE = 30:1
9 90% of VAR keys are 31B USR keys are 16B or 21B ETC is heterogeneous
10 USR values are only 2B 90% of values are smaller than 500B
11 90% of data is generated by values of 500B or smaller except ETC 90% is 10KB or smaller values for ETC
12 All pools show diurnal pattern except SYS
13 Night time in Western Semiphere North America starts its day
Workload Characteristics Locality, Cache Behavior 14
% of keys in 10% of requests in ETC 1% of keys in 55% of requests in ETC Least frequent 50% of keys in 1% of requests in ETC
16
% of SYS keys are reused in 1hr 88.5% of ETC keys are reused in 1hr 96.4% of ETC keys are reused in 6hr
%92.9%81.4% 93.7%98.7% Why?
19 CompulsoryCapacityInvalidation 70%22%8%
Analyzed 5 different memcached use cases Different applications of memcached have extreme variations in access patterns Answered pertinent questions to improve Facebook’s memcached usage 20
Questions? 21