You are not logged in.

#1 2021-08-24 02:48:36

MaWalla
Member
Registered: 2016-12-23
Posts: 11

Bad write performance on an SSD with LUKS encrypted btrfs root

Hi there,

I feel like I am doing something horribly wrong, because my write performance is outright terrible!

On my NVMe SSD (Crucial CT500P1SSD8), I'm running btrfs within a LUKS encrypted container, while using zstd compression.
The system is running smoothly until big amounts of data are written (with a speed like 100MB/s being already enough to cause trouble). This runs okay at first, until after a while (where I assume data is written from the RAM to the drive), the system becomes unresponsive and the disk unaccessable (until the rather slow write is done).

The SSD (again Crucial CT500P1SSD8) is sitting on an MSI B450 Tomahawk Max with a Ryzen 7 3700X and 32GB DDR4-3200. This should be plenty for both zstd and encryption to reach proper speed.

For the setup I did the following:

cryptsetup luksFormat /dev/nvme0n1p2
cryptsetup open /dev/nvme0n1p2 archroot
mkfs.btrfs /dev/mapper/archroot

with the mount flags for the btrfs partition being rw,relatime,compress-force=zstd:3,ssd,space_cache,subvol=root

Also running the latest linux-zen kernel (5.13.x), with it happening since a few versions though, including linux and linux-lts
I also did a clean setup of the root file system a few weeks ago.

This happens on my laptop to a lesser extend too by the way, (Ryzen 7 4800U, also with 32GB DDR4-3200 but an SK hynix BC511 HFM512GDJTNI-82A0A) so I'd rule out hardware failure (though I'll test out the performance on an unencrypted partition to confirm tomorrow).

I can't be the only person experiencing this and I'm having difficulties in pinpointing possible reasons, so anything in this regard would be highly appreciated!

Offline

Board footer

Powered by FluxBB