This repository provides instructions for reproducing the Experiment using FEMU with CCZNS and Balloon-ZNS
-
Prepare the VM Image by following the instructions in the FEMU repository
-
Clone the project folder from GitHub
-
To set up FEMU, navigate to the script folder of the respective method and run install_femu.sh
If you want to test SSD without compression, use the Balloon-ZNS version of the software on the CCZNS version of FEMU
-
Go to the FEMU/build-femu folder and edit the device size in the run-zns.sh script
-
Start FEMU by running run-zns.sh
-
In FEMU emulated OS, clone the project folder from Github
-
Install the CCZNS version of the Linux kernel by running emulator_install_kernel.sh
It is recommended to use the same kernel across all tests to ensure a fair comparison. Modifications made to the kernel to enable CCZNS, do not affect the performance
-
To install fio, run emulator_install_fio.sh in the respective folder
fio tests can now be run from the fio folder using fio
When testing CCZNS, use xnvme eninge, as it is the only engine adapted for CCZNS.
-
To install RocksDB, run emulator_install_rocksdb.sh
To test RocksDB you can use db_bench located in the rocksdb folder, or ycsb located in the YCSB-cpp folder.
- To set fixed_compression_ratio, add fixed_compression_ratio=x to the -device femu, argument. Example:
-device femu,devsz_mb=4096,femu_mode=3,fixed_compression_ratio=2- All scripts are tested on Ubuntu 20.04, while all scripts that are run inside FEMU are tested on Ubuntu 22.04, installed with instructions provided in the official FEMU repository: https://github.com/MoatLab/FEMU**{https://github.com/MoatLab/FEMU
- Set scheduler to deadline with:
sudo sh -c 'echo deadline > /sys/class/block/nvme0n1/queue/scheduler'-
While performing fio tests, there are some arguments that are important:
- rw - write, read, and randread were used to perform sequential write, sequential read, and random read
- numjobs - All tests were performed with 16 jobs
- max_open_zones - In all tests a maximum of 14 open zones was allowed
- fixed_compression_ratio - Should be set to 1 when no compression is performed, otherwise, it should be equal the desired compression ratio
- md_per_io_size - In all tests this value was set to the minimum possible value
-
Reset all the zones before performing sequential write tests to ensure that no overhead from resetting zone will occurs
-
To perform sequential read or random read tests, the device must be pre-filled with data
-
An example command to perform sequential write test:
sudo ./fio --ioengine=xnvme --direct=1 --filename=/dev/nvme0n1 --rw=write --bs=64k --group_reporting --zonemode=zbd --name=seqwrite --numjobs=16 --offset_increment=8z --size=8z --max_open_zones=14 --md_per_io_size=1024 --thread=1 --fixed_compression_ratio=2- Set scheduler to deadline with:
sudo sh -c 'echo deadline > /sys/class/block/nvme0n1/queue/scheduler'- Create a rocksdb.properties and set following variables in it:
- rocksdb.fs_uri=zenfs://dev:nvme0n1
- rocksdb.dbname=/
- rocksdb.use_direct_io_for_flush_compaction=true
- rocksdb.use_direct_reads=true
- rocksdb.rocksdb.cache_size=4294967296
- Create file-system with zenfs located in rocksdb/plugin/zenfs/util/zenfs:
sudo zenfs mkfs --zbd=nvme0n1 --aux_path=/tmp/zenfs-aux-1 --force- Put the dataset in a file dataset.txt in the same directory as ycsb executable, where each line contains a value for a key-value pair. Keys are generated automatically
- An example command to perform workload A test:
sudo ./ycsb -load -run -db rocksdb -s -P workloads/workloada -P rocksdb.properties -threads 16