This repo contains the code of Segcache described in the following paper:
Segcache has been re-implemented in Rust version of Pelikan, and this repo is not maintained anymore.
Previous version of Segcache did not turn off STAT which causes it to be less scalable. Please clone the new repo.
- benchmarks: code for running the evaluation benchmarks
- src/storage/seg: implementation of Segcache
- other see Pelikan repo
- platform: Linux
- build tools:
cmake (>=2.8)
- compiler:
gcc (>=4.8)
orclang (>=3.1)
git clone https://github.com/Thesys-lab/Segcache.git
cd Segcache && mkdir _build && cd _build
cmake ..
make -j
The executables can be found under _benchmarks/
(under build directory)
After building, you should have _build/trace_replay_seg
and _build/trace_replay_slab
which are the benchmarks for Segcache and Pelikan_twemcache.
To run them, you can do
./trace_replay_slab trace_replay_slab.conf
./trace_replay_seg trace_replay_seg.conf
We provide example config to run the two benchmarks at benchmarks/config/examples/
. Before using it, you need to change the options, specifically, you need to change trace_path
to the path of your trace.
We release the five traces we use here. The traces are comparessed with zstd, you can use
zstd -d c.sbin.zst
to decompress, the raw traces are in binary format and can be directly consumed by the benchmark.
If you would like to use your traces, you can convert your trace into the following format, each request uses 20 bytes with the following format
struct request {
uint32_t real_time,
uint64_t obj_id,
uint32_t key_size:8,
uint32_t val_size:24,
uint32_t op:8,
uint32_t ttl:24
};
If want to run multiple threads, besides modifying the configuration, you need to enable USE_THREAD_LOCAL_SEG
in src/storage/seg/constant.h
and use a large enough cache size.
This software is licensed under the Apache 2.0 license, see LICENSE for details.