ext4 slow write performance after file system is 90% full

0

I'm using Ubuntu 18.04. My observation for ext4 file system is, once I cross the 90% of data usage the write performance crawls. We have a RAID6 configuration over 12 disks, total 90TB file system. For 81TB we experience 1400 MBps. Post that it drops down to 100 MBps. This drop is very sharp. Is there a way to make it less severe?

I'm exporting my ext4 volume as NFS share. To avoid write crawling after 90% usage, is there any way to force ENOSPACE error on NFS clients post filesystem crosses 90% usage.

Ashish Khurange

Posted 2020-01-22T11:41:03.247

Reputation: 105

1Same here (though it more like the last 1%). I suspect this is due to fragmentation, there is no continuous space big enough so your files get scattered all over the disk and you get a lot or arm movements. – xenoid – 2020-01-22T13:58:29.697

Answers

0

You can use the tune2fs -m to change the reserved blocks percentage. The default is 5%; you can change it 15% or 20%. Note that df subtracts out the reserved blocks. So when you see "100%" in df, if the default reserved blocks is 5%, it's actually 95% full. Root is allowed to use the reserved space; but non-root users will get ENOSPC when they try to write beyond "100%". So for example, with the reserved blocks set to 25% (tune2fs -m 25 /tmp/foo.img), df will report:

% df -h /mnt
Filesystem      Size  Used Avail Use% Mounted on
/dev/loop0       27M   19M  2.0K 100% /mnt

Theodore Ts'o

Posted 2020-01-22T11:41:03.247

Reputation: 401