3 ms·
BMC: Accelerating Memcached using In-kernel Caching and Pre-stack Processing
- gbrown_ 5y agoI'm not against nested abbreviations per se but "BPF Memcached Cache" could have just been abbreviated to BPFMC. Avoiding collision with what I would have assumed to be reasonably well known BMC of "Baseboard Management Controller".
- eloff 5y agoA lot of impressive tricks here to get a memcached fast path into the kernel using ebpf. They focused only on short keys and values, only on UDP, used a simple hash table with no collision algorithm, and still had to split the code into 7 ebpf programs. Quite an achievement though, I didn't think it was possible. Also it seems udp memcached is not popular and hasn't been optimized well - it uses a single socket and spends a lot of time fighting for the kernel lock on that socket. Both the authors and Facebook patched memcached to get around that bottleneck. It's surprising that hasn't yet found its way upstream.
- fulafel 5y agoI wonder what explains the 10x speedup with patched memcached, vs the locking showing up as only 17.68% in the non-patched profile, in the 8 thread case. (disclaimer: didn't read the whole paper, maybe they explain it).
- rurban 5y agoBMC itself uses slow bytewise hashing and a slow old-school hash table. With keys of sizes 200-1000! > In userspace, Memcached consists of well-optimized data structures to handle key-value pairs, with an LRU algorithm to evict “stale” data. Memchached itself has also no well-optimized hashing nor a modern swiss-table like hashtable. It can be easily made at least 2x faster on modern CPU's. Doing it upfront in the kernel is if course a better idea, but I would have expected at least proper modern core hashtables, not 90ies tech.