User: Password:
|
|
Subscribe / Log in / New account

The second half of the 2.6.37 merge window

The second half of the 2.6.37 merge window

Posted Nov 6, 2010 4:13 UTC (Sat) by Lope (guest, #65656)
In reply to: The second half of the 2.6.37 merge window by slothrop
Parent article: The second half of the 2.6.37 merge window

The question of how often do you want to run fstrim on the whole filesystem is a little tricky, because it depends on what type of workload you are running. If you are able to fill up you disk within one day you probably should reclaim the space (discard) at least one time a day, but on regular desktop I very much doubt that.

So, what you probably want to do (if you want to be exact) is to watch the amount of data written to the filesystem (you can do that through /sys/fs/ext4/<device>/lifetime_write_kbytes assuming that on <device> is ext4 fs) and when it is going to reach some threshold (like 80% of device size) you would need to start doing the discard (note that FITRIM on ext4 will return amount of reclaimed space). But all of this may be an awful overkill for simple desktop:). And aside of that there are some very bad devices out there which are showing significant performance regression even at 50% fs saturation. And of course if you have more partitions on the same device ... it gets even more complicated :)

All that said, if you are ok with doing it once a day (and you are not even noticing it) it is good thing to do. But if it disturbs you, you probably would not want to do it so often, or at least do it per partes (which you can do with a little scripting) through a longer period of time.


(Log in to post comments)

The second half of the 2.6.37 merge window

Posted Nov 6, 2010 18:08 UTC (Sat) by slothrop (guest, #69834) [Link]

Good points,
I write ~30GB per week to my 30GB SSD (just one partition).
So I changed cron from running fstrim daily to twice a week.


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds