create VG based on HDD and SSD for caching

In this test i used an normal hard disk and an ssd to build volumne group where the "fast" ssd is a cache for the "slow" hdd. during writing the files you'll see no big difference. Also reading the test data the first time there will be no big difference. But after the ssd is filled with the data from the hdd you'ss have an "random read performance" close to the native ssd . In my test i used an HDD=/dev/sde with 418GB  and an SSD=/dev/sdc with 92GB.

Preparing the VG and the LV

pvcreate /dev/sde
vgcreate storage /dev/sde
lvcreate -n volume -L 418GB  storage /dev/sde
vgextend storage /dev/sdc
lvcreate -n metadata -L 1GB storage /dev/sdc
lvcreate -n cache -L 91GB storage /dev/sdc
lvconvert --type cache --cachepool storage/cache storage/volume
mkfs.ext4  /dev/storage/volume
mount  /dev/storage/volume /data

Create test data and run the test

The first "fio" run will create the test files and will have "normal" read performance.

mkdir /data/TEST 
fio --directory=/data/TEST --size 100MB --name=4ktest --rw=randrw --refill_buffers --norandommap --randrepeat=0 --ioengine=libaio --bs=4k --rwmixread=100  --iodepth=16 --numjobs=16 --runtime=240 --group_reporting

Now Re-Run the Test !!!

you should now re-run the same "fio ... " some more times. Now the cache is filled with date and its fast. try to run a "dstat" in a second windows during the test.



We use cookies

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.