LS-BDD is a block device driver that implements log-structured storage based on B+-tree, RB-tree, Skiplist, and Hashtable data structures. The log-structured approach is designed to speed up reading from block devices by transforming random requests into sequential ones. The efficiency and behavior of different data structures are being examined.
The driver is based on BIO request management and supports BIO splitting (i.e. different operation block sizes, e.g. 4KB write, 16 KB read). At the moment, a multithreaded lock-free implementation is in development.
For more info - see ru-presentation v1 eng-presentation v1
Compatable with Linux Kernel 6.8
Highly recommended to test/use the driver using a VM, to prevent data coruption.
make init DS="ds_name" TY="io_type" BD="bd_name"
ds_name - one of available data structures to store the mapping ("bt", "ht", "sl", "rb") io_type - block device mode ("lf" - lock-free, "sy" - sync) bd_name - terminal block device (f.e. "ram0" "vdb", "sdc", ...)
Initialisation example:
...
echo "1 /dev/vdb" > /sys/module/lsbdd/parameters/set_redirect_bd
cat /sys/module/lsbdd/parameters/get_bd_names // to get the links
dd if=/dev/urandom of=/dev/lsvbd1 oflag=direct bs=2K count=10;
dd of=test2.txt if=/dev/lsvbd1 iflag=direct bs=4K count=10;
You can use the provided fio tests (or write your own), that time the execution and use pattern-verify process.
make fio_verify IO=libaio WO=randwrite RO=randread FS=1000 WBS=8 RBS=8
Options description is provided in Makefile
.
Although, if you need more customizable fio testing - you can check test/fio/
for more predefined configs.
In case of performance measuring test/main.sh
and future analysis can be used. For example:
make init DS=sl TY=lf BD=ram0
cd ../test && ./main.sh -s -c --io_depth 16 --jobs_num 4 --bd_name ram0
It is able to run fio tests with pattern verification, plot generation (fio2gnuplot), flamegraph generation and system-side optimisation. For more information about modes usage - see source code or run ./test/main.sh -h
.
Distributed under the GPL-2.0 License.