Poor performance using discard
Peter Grandi
pg_xf2 at xf2.for.sabi.co.UK
Tue Feb 28 17:58:37 CST 2012
[ ... ]
> /dev/mapper/ssdvg0-testLV on /media/temp type xfs
> (rw,noatime,nodiratime,discard) [ ... ] real 5m7.139s [ ... ]
> There where lockups where the system would pause for about a
> minute during the process.
> ext4 handles this scenerio fine:
> /dev/mapper/ssdvg0-testLV on /media/temp type ext4
> (rw,noatime,nodiratime,discard) [ ... ] real 0m0.943s [ ... ]
> xfs mounted without discard seems to handle this fine:
> /dev/mapper/ssdvg0-testLV on /media/temp type xfs
> (rw,noatime,nodiratime) [ ... ] real 0m1.634s [ ... ]
[ ... ]
> Any suggestions?
* Look at 'vmstat 1' while 'rm' is running.
* Learn how TRIM is specified, and thus why many people prefer
running periodically 'fstrim' which uses FITRIM to mounting
with 'discard'.
* Compare with my Crucial M4 flash SSD with XFS:
# time sh -c 'sysctl vm/drop_caches=3; rm -r linux-2.6.32; sync'
vm.drop_caches = 3
real 0m59.604s
user 0m0.060s
sys 0m3.944s
That's pretty good for ~32k files and ~390MiB. Probably the
TRIM implementation on the M4 is rather faster than that on
the Patriot.
More information about the xfs
mailing list