Skip to contentSkip to conversation

Bad performance with near-full FS

DISCUSSION Tovo Rabemanantsoa 4 participants 6 messages Jun 15, 2015 – Jun 16, 2015 Btrfs file system

lore
Share & tools
lore
#0 lore raw

Hi all,
By browsing this list's archive, I've found a thread initiated by Charles Cazabon entitled: "Oddly slow read performance with near-full largish FS."
Actually, I'm living the same experience but with a not so large FS (256GB on a SSD). Indeed, when I have less than 1GB of free space, the applications (thunderbird, thunar ...) on the machine become awfully slow but remain normal if I make some cleaning.
Is it due to the FS or because it's an SSD hard disk ? Thanks in advance

Signature · 6 lines
Tovo J. Rabemanantsoa
IT Manager
Quality correspondent
INRA - UMR ISPA [Interactions Sol Plante Atmosphère]
Villenave d'Ornon - Gironde, France
+33 5 57 12 24 09
#1 lore raw
Quoted 9 lines · Tovo Rabemanantsoa

Hi all,
By browsing this list's archive, I've found a thread initiated by Charles Cazabon entitled: "Oddly slow read performance with near-full largish FS."
Actually, I'm living the same experience but with a not so large FS (256GB on a SSD). Indeed, when I have less than 1GB of free space, the applications (thunderbird, thunar ...) on the machine become awfully slow but remain normal if I make some cleaning.
Is it due to the FS or because it's an SSD hard disk ?

1G of 256G is less than a percent. At this level of usage you can expect slowdown on any filesystem.

This could be caused by free space fragmentation and even on a SSD, this needs extra time to process. Higher number of fragments needs more structures to represent them and cost more CPU time, though this still might not be the worst impact.

AFAIK btrfs space handling logic needs to do more flushes of unwritten data when the accounted free space goes below some threshold (because COW needs to write the data twice before it switches to the new "root" pointer and can free the previous version).

#2 lore raw
Quoted 19 lines · David Sterba
Quoted 9 lines · Tovo Rabemanantsoa

Hi all,
By browsing this list's archive, I've found a thread initiated by Charles Cazabon entitled: "Oddly slow read performance with near-full largish FS."
Actually, I'm living the same experience but with a not so large FS (256GB on a SSD). Indeed, when I have less than 1GB of free space, the applications (thunderbird, thunar ...) on the machine become awfully slow but remain normal if I make some cleaning.
Is it due to the FS or because it's an SSD hard disk ?

1G of 256G is less than a percent. At this level of usage you can expect slowdown on any filesystem.

This could be caused by free space fragmentation and even on a SSD, this needs extra time to process. Higher number of fragments needs more structures to represent them and cost more CPU time, though this still might not be the worst impact.

Quoted 4 lines

AFAIK btrfs space handling logic needs to do more flushes of unwritten data when the accounted free space goes below some threshold (because COW needs to write the data twice before it switches to the new "root" pointer and can free the previous version).

Thanks for you reply,
If I really understand, it's always a good idea to keep more than 1% of free space. Right ?

#3 lore raw

Hi,

Quoted 3 lines

Thanks for you reply,
If I really understand, it's always a good idea to keep more than 1% of free space. Right ?

Usually the rule of thumb is 10-20%.

Br, Clemens

#4 lore raw
In reply to Tovo Rabemanantsoa
Quoted 20 lines · Tovo Rabemanantsoa
Quoted 19 lines · David Sterba
Quoted 9 lines · Tovo Rabemanantsoa

Hi all,
By browsing this list's archive, I've found a thread initiated by Charles Cazabon entitled: "Oddly slow read performance with near-full largish FS."
Actually, I'm living the same experience but with a not so large FS (256GB on a SSD). Indeed, when I have less than 1GB of free space, the applications (thunderbird, thunar ...) on the machine become awfully slow but remain normal if I make some cleaning.
Is it due to the FS or because it's an SSD hard disk ?

1G of 256G is less than a percent. At this level of usage you can expect slowdown on any filesystem.

This could be caused by free space fragmentation and even on a SSD, this needs extra time to process. Higher number of fragments needs more structures to represent them and cost more CPU time, though this still might not be the worst impact.

Quoted 8 lines
Quoted 4 lines

AFAIK btrfs space handling logic needs to do more flushes of unwritten data when the accounted free space goes below some threshold (because COW needs to write the data twice before it switches to the new "root" pointer and can free the previous version).

Thanks for you reply,
If I really understand, it's always a good idea to keep more than 1% of free space. Right ?

For almost any non-COW filesystem (ext4, XFS, JFS, etc.), 1% or 100MB (whichever is larger) is generally a good buffer. On BTRFS, I would say at least 5% or 1.5G (again, whichever is larger; and if performance is a concern, go for at least 10-20%), as BTRFS is known to have some rather poor behavior when running very close to full.

#5 lore raw
Quoted 7 lines · Austin S Hemmelgarn

For almost any non-COW filesystem (ext4, XFS, JFS, etc.), 1% or 100MB (whichever is larger) is generally a good buffer. On BTRFS, I would say at least 5% or 1.5G (again, whichever is larger; and if performance is a concern, go for at least 10-20%), as BTRFS is known to have some rather poor behavior when running very close to full.

I got it.
Thanks all !

T.