Reiser4 Performances on Ubuntu 9.10

Since its debut in 2004, there is a lots of controversy on Reiser4, the game-changing file-system developed by Namesys. It has been available for Linux for quite a while and there are great reviews on the Internet, but most distribution do not include it as an option by default, including Ubuntu Karmic 9.10.

Since the performances of my loyal Dell x300 are disk bounded, and I had success improving them using SquashFS last year (unfortunately it’s read-only), I decided to do my own review of Reiser4: I downloaded the source of my kernel (apt-get source linux-image-2.6.31-20-generic), its build dependencies (apt-get build-dep linux-image-2.6.31-20-generic), applied the right Reiser4 patch, copied over my current .config file (disable the DEBUG symbols from the kernel or your image will be huge) from the /boot directory and a couple of minutes later I was already running make-kpkg.

The goal of my first test was to compare Reiser4 with other well-known choices. I created a partition of about 5Gb and copied over my /usr directory (3549986832 bytes) using rsync (-aHAX) for each file-system.

FS Time KB/s CPU % Disk (Gb)
ext4 - 2983 - -
jfs - 2817 - -
reiser3 16:57 3412 20 3.4
reiser4 12:40 4570 25 3.4

Using Reiser4 the CPU utilization was definitively higher, but the disk throughput increased significantly (+53% versus ext4). If the ccreg40 plugin is used for file creation instead of the default reg40, Reiser4 offers many additional options on how the files are laid out, if and how are compressed, and which compression/encryption algorithm is used. I tested the impact of some of its compression schemes (conv, ultim and force) and the two compression algorithms (gzip1 and lzo1).

I was expecting the best compression performances from LZO1, but instead got the highest throughput (+70% respect to ext4) at the expense of an higher CPU utilization (+70% respect to Reiser3):

Compression Time KB/s CPU % Disk (Gb)
conv 11:41 4954 30 3.8
force 11:33 5004 27 3.4
ultim 11:23 5085 28 3.6

Using GZIP1 lead to the highest compression ratio (-48% vs. ext4) but a lower CPU utilization (-19% respect to LZO1) and a lower disk throughput (+42% over ext4):

Compression Time KB/s
CPU % Disk (Gb)
conv 14:32 3972 27 2.7
force 13:56 4155 22 2.4
ultim 13:39 4241 23 1.8

The results can be difficult to interpret: LZO1 seems to give the maximum disk throughput but there is less CPU available for applications and the files on disk are bigger (thus there is more to read), on the other hand, GZIP1 offers lower disk performances but there is half of the data to read from the disk.

To help me decide, I devised a comprehensive score (lower is better) which takes in account CPU, disk utilization and throughput, assuming that they all have the same importance:


    score = (max_throughput / throughput) * (cpu / min_cpu) * (size / min_size)


Using this formula the winning configuration is GZIP1 with “ultim” (1.38). With default options enabled Reiser3 and Reiser4 obtain a score of 2.82 and 2.63 respectively. Slightly better GZIP1 with “force” (1.79) and “conv” (2.59). LZO1 is best using “force” (2.59) instead of “ultim” (2.80) or “conv” (3.25).

Using Reiser4 with GZIP1 and “ultim” should provide a 42% increase in disk throughput and reduce by 48% the amount of data to read, making my disk about 2.95 times faster. Let’s hope its true.

Technology

If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.

Comments

6 Responses to “Reiser4 Performances on Ubuntu 9.10”

Leave Comment

(required)

(required)