0

I have some question about TRIM command for SSDs.

First of all, mounting partitions with discard option vs. trim in crontab. I'm aware discard option forces immediate trim after every single file deletion, but why this should be not good?

Second, what about swap partition? Mounting swap with discard is the only available option?

This question is more about cron than trim by itself. If I schedule trim in cron daily, at what moment will be trim executed? May I schedule trim in crontab with 2-3 days frequency?

Thanks.

MadHatter
  • 481
  • 5
  • 17
  • 27

1 Answers1

1

Mounting with discard is not very good, because it affects performance, if you delete many files.

Swap is always trimmed automatically, as far as I know.

You can setup trim as you like in crontabs. In Ubuntu it is set by default to once a week.

Pilot6
  • 90,100
  • 91
  • 213
  • 324
  • Thanks. Can you link some authoritative source about automatic trimming of swap partitions? I'll accept your answer.. – MadHatter May 19 '15 at 14:06
  • Here is a Wikipedia link. https://en.wikipedia.org/wiki/Solid-state_drive#Swap_partitions. It is not too authoritative ;-), but correct. you can find some more info. – Pilot6 May 19 '15 at 14:11