Re: automatically running fstrim

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 24 May 2011, Phil Karn wrote:

> Now that the Linux 2.6.39 kernel is out, is there any reason I shouldn't
> run fstrim out of my crontab? It doesn't seem to slow down my system
> significantly while it runs.
> 
> As I understand fstrim, it walks through the file system free list
> issuing TRIMs for each entry, and except for whatever load the TRIM
> commands themselves generate (which is drive dependent) it shouldn't
> interfere that much with system operation. Correct? Is there any
> mechanism to issue these commands at a lower priority than regular disk I/O?

No, not that I know of. But why not to run fstrim from cron lets say every
day ? Note that you do not necessarily need to run it "all the time",
because if the drive firmware has a lot of space for doing
wear-leveling, there is no point of sending TRIM.

Also keep in mind that lot of newer SSD's has some "hidden" space just
for wear-leveling, so to get to the point where firmware will have hard
time doing it and the drive actually get slower takes even more writes
than just filling your drive up to max.

So doing fstrim once or twice a day (it really depends on your work
load) is more than enough.

Also, since we have all this in place we might talk to distributions to
add the infrastructure to actually recognise "discard enabled" devices
and add fstrim into cron job automatically. Or, since the filesystem
should know the best when is the "right" time to do this, we might try
to figure out some kernel logic to trigger it. However it might be a
little bit tricky, since every drive behaves differently...

Thanks!
-Lukas

> 
> Thanks for all the work you guys do on XFS. It is much appreciated.
> 
> Phil
> 
> _______________________________________________
> xfs mailing list
> xfs@xxxxxxxxxxx
> http://oss.sgi.com/mailman/listinfo/xfs
> 

-- 

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux