
On Wed, Dec 12, 2012 at 09:25:43AM +1100, Chris Samuel wrote:
On 12/12/12 01:18, Russell Coker wrote:
Does the Intel SSD just suck for the type of writes that BTRFS does when synchronising things or is there some way of tweaking it for performance?
1) Does dropping discard help (some SSDs are awful with that)
i've found (on xfs and ext4) that running fstrim regularly from cron (daily or weekly is frequent enough) is better for overall performance than turning on automatic trim using the ssd/discard mount options. I've just added fstrim commands to the bottom of my rsync backup scripts, so they get trimmed after every nightly backup run. BTW, fstrim is run on mounted filesystems. Note that when you run fstrim on an ext4 filesystem, ext4 remembers which blocks have already been trimmed, at least until the next time the fs is unmounted and remounted. xfs and btrfs (and presumably others) do not[1], they trim the entire unused block list every time. what this means is that the first trim on a freshly mounted ext4 fs will take much longer than subsequent fstrims. e.g. on an 80G ext4 partition on one of my SSDs, the first fstrim takes about 7 minutes, subsequent runs take seconds. for xfs and btrfs it always takes the same amount of time. [1] http://forums.fedoraforum.org/showthread.php?t=278532 craig ps: this is definitely still true for XFS. I haven't used btrfs in a while so i don't know if recent updates have improved fstrim for btrfs or not - the link above is from April 2012. -- craig sanders <cas@taz.net.au> BOFH excuse #295: The Token fell out of the ring. Call us when you find it.