You are not logged in.
Hi.
I have a new Arch install on an old T420 (i5-2450m) with SATA 3 SSD, the filesystem is BTRFS with zstd:1 on a LUKS device.
SSD -> GPT -> LUKS -> BTRFS
AES-throughput is 1500 MB/s and FIO on the filesystem has measured (read and write values were always within 1% of each other):
sequential-rw: 230 MB/s
random-64K-rw: 60 MB/s
random-4K-rw: 10 MB/s
Important here is that read and write show no relevant performance difference.
Then I did some real world tests of "time (cp -R && sync)" with data from an older system (3 GB /usr /var /boot /etc) which contains many small files. I dropped caches between each run.
While doing the tests with no compression:
copy tmpfs to btrfs: 3 min
copy btrfs to tmpfs: 30 sec
But with zstd:1 and everything else the same:
copy tmpfs to btrfs: 38 sec
copy btrfs to tmpfs: 25 sec
30 seconds for 3GB is around 100 MB/s which is amazing for small file performance on this old device. 3 minutes (17 MB/s) on the other hand is more what I would expect from an HDD. LZO as well as higher zstd levels give me much better performance than uncompressed, even if my CPU is 100% in use. At least writing data with zstd:15 should be much slower than uncompressed but it isn't.
Can someone explain this behavior, what could I do to fix it? Do you need any additional logs, infos or test? I already tried every possible mount option (ssd_spread,nobarrier,noatime,discard=*, ...) but the only change comes with compression.
Thanks for your time and knowledge.
Offline
After my BTRFS partition became unwritable and told me there is no space left on device. I had to add a device, do btrfs balance and afterwards my uncompressed write speed is around 30 sec where it should be. I guess BTRFS is not intended to be used with many file operations/small files, a little warning like "extensive usage will make this file system read only" would have been nice. Now I wasted many days to come to the conclusion that this filesystem is unusable and I need to investigate ext4 + VDO.
So I guess the problem is temporary solved ... until it happens again.
Offline