Skip to content

BaekJongSeong/In-memory-database-twemcache-slab--segcache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 

Repository files navigation

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

research topic: Analysis of wasted memory size after twemcache's slab memory accumulation

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)

and then i got some question for this twemcache.(description below)


first, Internal fragmentation caused by item size of specified size

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.

image image

second, Irregularity in handling expired items

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.

image

So I analyzed how much memory wasted in slab(twemcache)

i tested three trace file provided by organizer (n.sbin, c.sbin, u2.sbin)

image

my presentation is available here https://softcon.ajou.ac.kr/works/works.asp?uid=479&category=M

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published