3.0. Tuning Contest Guide

1. Workload (Benchmark): YCSB-cpp

The goal of the Yahoo Cloud Serving Benchmark (YCSB) project is to develop a framework and common set of workloads for evaluating the performance of different “key-value” and “cloud” serving stores. image

Contest Workload

2. Tuning Options

Teamwrite_buffer_sizemax_file_sizecompressionblock_cachefilter_policyblock_sizeblock_restart_interval
WAL/Manifest128MB64MBsnappy128MB108KB16
Memtable32MB16MBsnappy32MB108KB16
Compaction32MB4MBsnappy8MB102KB16
SSTable64MB32MBsnappy13.75MB102MB4
Bloom Filter128MB64MBsnappy64MB98KB4
Cache47.68MB4MBsnappy40MB108KB32

3. Result

Avg. Throughput
(ops/sec)
WAL/ManifestMemtableCompactionSSTableBloom FilterCache
Load A710653480023336577347197235522
Run A739285861040784637537225347830
Run B131709130014114509147205136455125638
Run D191939200841177168207546194346193820

4. Ranking & Report

Total RankTeamLoad ARun ARun BRun DReport
1SSTable3311Link (KOR)
1Bloom Filter1223Link (KOR)
3WAL/Manifest2135Link (KOR)
4Memtable5442Link (KOR)
5Cache4554Link (KOR)
6Compaction6666Link (ENG)

5. Notice

  1. Study the db options and their relationships.
  2. Analyze workloads such as key/value size and key/operations distribution.
  3. Hypothesize the best option set and verify it by experiment.
  4. Submit your best option set to the assistant by e-mail.
    • Send your YCSB-cpp/leveldb/leveldb.properties to koreachoi96@gmail.com until Monday, 15 August 2022, 9:00 AM
  5. Write a report about your hypothesis, experiment, and final decision in markdown format.
    • Pull request at tuning directory until Tuesday, 16 August 2022, 2:00 PM
    • Title: [Tuning]team__report.md
  6. Check your ranking at Tuesday, 16 August 2022, 4:00 PM

6. LevelDB options and restrictions

Modify YCSB-cpp/leveldb/leveldb.properties like below.

# YCSB-cpp/leveldb/leveldb.properties
# ---------------------------Restriction----------------------------
#  max_memory size (= write_buffer_size + block_cache_size) <= 1024 * 1024 * 1024 (1GB)
#  max_file_size <= 1024 * 1024 * 1024 (1GB)
leveldb.max_open_files=10000

# -------------LevelDB Options, Tune them!------------------
leveldb.dbname=/tmp/ycsb-leveldb
leveldb.format=single
leveldb.destroy=false

leveldb.write_buffer_size=2097152
leveldb.max_file_size=4194304
leveldb.compression=snappy 
leveldb.cache_size=4194304
leveldb.filter_bits=10
leveldb.block_size=4096
leveldb.block_restart_interval=16

7. Install YCSB-cpp

  • Install and build leveldb in release mode
  • git clone https://github.com/ls4154/YCSB-cpp.git
  • Modify config section in Makefile
    #---------------------build config-------------------------
    DEBUG_BUILD ?= 0
    # put your leveldb directory
    EXTRA_CXXFLAGS ?= -I/example/leveldb/include
    EXTRA_LDFLAGS ?= -L/example/leveldb/build -lsnappy
    
    BIND_LEVELDB ?= 1
    BIND_ROCKSDB ?= 0 
    BIND_LMDB ?= 0
    
  • make
  • Modify YCSB-cpp/leveldb/leveldb.properties
  • Run benchmarks
    # Command
    ./ycsb -load -db leveldb -P workloads/workloada -P leveldb/leveldb.properties -s
    ./ycsb -run -db leveldb -P workloads/workloada -P leveldb/leveldb.properties -s
    ./ycsb -run -db leveldb -P workloads/workloadb -P leveldb/leveldb.properties -s
    ./ycsb -run -db leveldb -P workloads/workloadd -P leveldb/leveldb.properties -s
    
    • You can make copies of leveldb.properties and use them for benchmarks.
      # Command
      ./ycsb -load -db leveldb -P workloads/workloada -P leveldb/leveldb.properties1 -s
      ./ycsb -load -db leveldb -P workloads/workloada -P leveldb/leveldb.properties2 -s
      

8. Tuning Enviornment

  • DKU Linux Server
SystemSpecification
CPU
Memory
Storage
Linux
Ubuntu