Reiser4, futuristic FileSystem from outer space!

I'm just in shock! with some local test results :eyepopping:

So I created an image file (acting like a partition), and first I was surprised about the size used, the funny thing is that looked like with reiser4 it required more space, but then I realized that reiser4 was simply reporting the sizes correctly while btrfs not, and also btrfs uses much more of space than reiser4 using the same compression :rofl2: :-1:

root /tmp ❯❯❯ dd if=/dev/zero of=test.img bs=8M count=80
80+0 records in
80+0 records out
671088640 bytes (671 MB, 640 MiB) copied, 0.364203 s, 1.8 GB/s
root /tmp ❯❯❯ mkfs.reiser4 -yf -o create=ccreg40,compress=zstd1 test.img
root /tmp ❯❯❯ mount test.img mountpoint/
root /tmp ❯❯❯ mount | grep mountpoint
/tmp/test.img on /tmp/mountpoint type reiser4 (rw,relatime,atom_max_size=0x73f09,atom_max_age=0x249f0,atom_min_size=0x100,atom_max_flushers=0x1,cbk_cache_slots=0x10)
root /tmp ❯❯❯ du -hs /etc/ /usr/include/ /usr/src/ /boot/
33M /etc/
108M /usr/include/
118M /usr/src/
196M /boot/
root /tmp ❯❯❯ cp -a /etc/ /usr/include/ /usr/src/ /boot/ mountpoint/
root /tmp ❯❯❯ du -hs mountpoint/*
212M mountpoint/boot
211M mountpoint/etc
633M mountpoint/include
945M mountpoint/src
root /tmp ❯❯❯ df | grep mountpoint
/dev/loop0 622720 271160 351560 44% /tmp/mountpoint

The original files where located in my actual btrfs+compression(zstd) installed filesystem, they reports as having small sizes and after to copy them to the reiser4 mount they looks bigger, why? let's see:

In any case, (212 + 211 + 633 + 945) = 2GB, this should be size that these files should occupy, while it is using only 271MB as "df" shows, so "2000MB of files stored in a 271MB space", hum!

What happens if we do the same on btrfs with the same compression?

root /tmp ❯❯❯ du -hs mountpoint/*
196M mountpoint/boot
33M mountpoint/etc
108M mountpoint/include
118M mountpoint/src
root /tmp ❯❯❯ df | grep mountpoint
/dev/loop0 655360 339516 191236 64% /tmp/mountpoint
root /tmp ❯❯❯ mount | grep mountpoint
/tmp/test.img on /tmp/mountpoint type btrfs (rw,relatime,compress=zstd,space_cache,subvolid=5,subvol=/)

The sizes by "du" are reported in the same "small" results, they reports their compressed size instead of their real size? makes sense but I wonder how much "correct" is that in reality, if you want to know the size of your data is reporting a wrong value, you should only care that your disks saves space as much as possible, but this is wrong! Example: let's say you want to copy data to your USB stick, you verify the size of this data and then you are surprised that it doesn't fit on the USB!

Now, see the final (real) space used, shown by "df" is, is much bigger! 339MB in btrfs instead of 271MB by reiser4! 64% used vs 44%! Damn... this is a big difference, a non-sense one since both FS uses the same compression algorithm! (big spank to btrfs! :woman_facepalming:)

More interesting results: btrfs: I deleted all the files, and "df" shows that the 6% of the filesystem is "wasted" (used) with no files, reformated the partition, the 3% is wasted in never-used-before space (16.6 MB exactly). Now, with reiser4: only 132KB used (not even a real 1%), copied all the files + removed (multiple times), 140KB used, LOL!

A last astonishing result: the time required to copy all the files with btrfs is 9.33 seconds. While in reiser4 is 4.98 seconds (double write speed? what?
we are serious?). Also this is interesting, erasing the files and copy them again, in btrfs shows random results, between 4 and 9 seconds in every attempt, but with reiser4 it is extremely precise: between 4.99 and 5.14 seconds in every attempt.

lol, I have no words... why? because this amazing FS is not included by default in the kernel, maybe its time to someone fork the kernel project in a new one :mwahaha:

2 Likes