No subject
Thu Oct 6 05:08:24 CDT 2011
https://patrick-nagel.net/blog/archives/337
"I did it three times with and three times without the =E2=80=9Cdiscar=
d=E2=80=9D
option, and then took the average of those three tries:
Without =E2=80=9Cdiscard=E2=80=9D option:
Unpack: 1.21s
Sync: 1.66s (=3D 172 MB/s)
Delete: 0.47s
Sync: 0.17s
With =E2=80=9Cdiscard=E2=80=9D option:
Unpack: 1.18s
Sync: 1.62s (=3D 176 MB/s)
Delete: 0.48s
Sync: 40.41s
So, with =E2=80=9Cdiscard=E2=80=9D on, deleting a big bunch of small =
files is 64
times slower on my SSD. For those ~40 seconds any I/O is really
slow, so that=E2=80=99s pretty much the time when you get a fresh cup=
of
coffee, or waste time watching the mass storage activity LED."
Also the 'man' page for 'fstrim':
http://www.vdmeulen.net/cgi-bin/man/man2html=3Ffstrim+8
"-m, --minimum minimum-free-extent
Minimum contiguous free range to discard, in bytes.
(This value is internally rounded up to a multiple of the
filesystem block size). Free ranges smaller than this will be
ignored. By increasing this value, the fstrim operation will
complete more quickly for filesystems with badly fragmented
freespace, although not all blocks will be discarded. Default
value is zero, discard every free block."
Note the "By increasing this value, the fstrim operation will
complete more quickly for filesystems with badly fragmented
freespace", which implies that FITRIM is also synchronous or slow
or both.
More information about the xfs
mailing list