Upload
ixsystems
View
3.263
Download
2
Tags:
Embed Size (px)
Citation preview
rr
Joined WhatsApp server team in 2011Performance, multimedia, security, opsPreviously: Yahoo!, SGI, Metaphor, AionFirst FreeBSD: 2.2.8 at Yahoo!
Numbers
Over 600M monthly users140M concurrent connections440k connections per second1.1M messages sent per second1B pics sent per day
Performance
SMP scaling is greatkernel relatively free of contentionErlang (actor model)BEAM (Erlang VM) very SMP-aware
Hardware (typical)
SoftLayer bare-metal1U/2U/4U Supermicrodual E5-2690v2 (40 threads)(public, private) x 2 lagg x 1g igb (some 10g ix)64-768GB RAM1-12 800GB SSD (12x4TB HDD for video)JBOD w/ mobo, Adaptec, and LSI controllers
Software Platform
Erlang R16B01 (w/ our patchset)rtpriopatches address specific contention issuesschedulers bound to cpusallocators tuned for superpage promotionyaws for web-serving (but disable sendfile)
Data storage
Erlang mnesiaaccount data, group membership, etc.in-memory + dump/log persistence
Flat-file on hashed directory treeoffline mailboxes, mediafs layout tuned per workload
Versions
FreeBSD 8: 2011-2012betterbugs: zero-copy sockets, igb, tsc tctuning got us to ~2.8M conns/server
Versions
FreeBSD 9: 2013-yes!bugs: very, very rare panicenhancements:
>2G dirhash sizemax tcp rexmit interval
Tuning
loader varsigb (numq=8, rx_process_limit=-1, r/txd=4k)kern.nbuf=128kkern.max{files,filesperproc,proc}net.inet.tcp.tcbhashsize=512knet.inet.tcp.hostcache.bucketlimit=1
Issues
ufs panics (fs inconsistencies after crash/pfail)bursty syncer behaviorfiledesc table contentionpcb table contention (1.5m igb + 3m loopback)