People frequently ask what the performance is that they may expect from Lessfs. This article will give an indication of what to expect.
About the hardware
All the tests are done using an Intel 5520HC system board with a single E5520 processor @ 2.27GHz. The meta data is written to an Intel 320 SSD while the data is written to 5 Hitachi HUA722010CLA330 SATA drives attached to an LSI Megaraid controller in RAID 5. The maximum transfer speed to the volume on the LSI controller is approximately 400 MB/sec. When I tested the same drives with Linux software raid5 I found it hard to get more then 250MB/sec out of them. Even worse is the amount of IOPS that you can get from the drives with software raid. So for now I will stick to using hardware raid.
In this test we will setup lessfs with file_io and hamsterdb 2.0.1. After downloading and installing hamsterdb-2.0.1 we start with downloading lessfs.
wget http://sourceforge.net/projects/lessfs /files/lessfs/lessfs-1.5.12/lessfs-1.5.12.tar.gz tar xvzf lessfs-1.5.12.tar.gz cd lessfs-1.5.12 ./configure --with-hamsterdb --with-snappy make -j4 In this example the RAID5 volume on the LSI raidcontroller is mount on /data The SSD is mounted on /data/mta
The configuration file used in this example can be downloaded here : lessfs.cfg
After downloading lessfs.cfg you will need to copy it to /etc
Please make sure that the directories /data/dta and /data/mta exist.
Now we can format lessfs and mount the filesystem:
./mklessfs -c /etc/lessfs.cfg
./lessfs /etc/lessfs.cfg /mnt
When everything went right you should now have lessfs mounted on /mnt
I now use a little tool to write 3000 files with a 1GB size to lessfs. The files can not be compressed and all have a unique content. The second pass writes files 100% identical to the first pass and will therefore be written with a much higher speed. After this the first files a read from lessfs. This is the result:
As you can see there appear to be 5 lines in this graph instead of the 3 lines that you would expect. The explanation is this: Lessfs will flush all data from the cache to disk at COMMIT_INTERVAL seconds. At this point all the transactions are committed to disc and a steady state for the file system is created. When Lessfs flushes the data to disk no new data is processed and as a result we see a dip in the transfer rate. This dip shows up at the bottom of the graph.
In this case the red line shows the worst case performance that you can have. Lessfs is writing files that are unique and can not be compressed. The purple line shows the best performance that you may expect. Since these are files that are 100% duplicates of the files written in the red line. You can improve performance when you disable compression in this case. Since the files can not be compressed this would make sense with this workload.
In this test the transfer speed of the first write appeared to be limited by the IOPS capability of the SATA RAID5 volume. The reads are limited in speed by decompression latency and IOPS capability of the SATA drives.
Next time I will show the results of Lessfs with Berkeley DB and the effect of caching the Intel 320 SSD with EPRD.