Twemcache is efficient in memory management because it allocates memory in units of slab,
which is different the structure of allocating memory whenever an object is entered.
However, we would like to analyze memory issues in the case memory waste occurs due to problems
such as TTL expiration for each item and the data size is smaller than the specified item space per slab.
When analyzing, it records the log by uting multiple trace files and records the number of slabs in use for a certain period,
the number of bytes occupied by the data ed into the slab, the number of expired items.
this code is based on Segcache https://github.com/Thesys-lab/Segcache
i modify some code(to print log and to analyze the fragmentation of slab memory) for my research
i actually understand the thesis(A large scale analysis of hundreds of in-memory cache clusters at Twitter, USENIX OSDI 2020 && Segcache: a memory-efficient and scalable in-memory key-value cache for small objects, USENIX NSDI 2021)
The item size is the same inside the slab.
At this time, if item with a size smaller than the corresponding item size is inserted, internal fragmentation occurs.
Evict is processed immediately in a situation where slab is insufficient
Expireed items are not processed immediately and continue to consume memory in the slab.
This is an attempt to access an object whose TTL has expired and is treated as a cache miss.
i tested three trace file provided by organizer (n.sbin, c.sbin, u2.sbin)
my presentation is available here https://softcon.ajou.ac.kr/works/works.asp?uid=479&category=M