LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Best practices to prolong the life of flash drives? (https://www.linuxquestions.org/questions/linux-hardware-18/best-practices-to-prolong-the-life-of-flash-drives-604245/)

ewolf 12-03-2007 06:14 PM

Best practices to prolong the life of flash drives?
 
Hello,

I recently attained a laptop with an on board solid state drive instead of a hard drive. Since flash-based storage will expire after a certain number of writes, I have found that people generally recommend:

1] mounting the drive with the 'noatime' flag
2] using a non-journaling filesystem (ext2 instead of ext3)
3] not using a swap partition or swap file

However, I am wondering if there is anything else people might be doing to get more 'bang for their buck' out of their flash-based storage devices. Any suggestions?

I have of course also heard from some people that it doesn't matter much, but please humor me! I like to be conservative about the power and material I use up in my computing.

dracolich 12-03-2007 06:53 PM

Other than the points already mentioned, I would throw in:

1. Keep files that you modify often, such as word processor documents, on a separate disk.
2. If you do any gaming and the game keeps cache and save files in a . directory in your home, move them to a separate disk and replace the directory with a symlink.
3. If you haven't already, setup /tmp to use tmpfs.
4. If /var/log/messages and syslog rotate a lot you can change it to rotate less often based on time or filesizes.
5. If you have a cron job to run updatedb often (mine runs every day at 6:30pm) you can change the frequency, the time or even turn it completely off.
6. Update and install packages only when you want or need to. Be careful allowing automatic updates and when installing things you're not sure you want or need. Depending on your distro dependencies can easily turn 1 packages into 10.

That's all I can think of right now.

ewolf 12-05-2007 11:54 AM

Thanks very much! I've gone ahead and mounted /tmp as tmpfs, which is an elegant way to deal with temporary data.

I've seen recommendations to mount with the 'nodiratime' flag as well.

Also, I am mounting /var/log as tmpfs. There are some disadvantages to this, but I can always turn this off if I need to do some serious debugging. It's a laptop, so I am less concerned about logs than if this was a server.

michaelk 12-05-2007 01:14 PM

The newer memory devices write/erase cycles are in the order of 1,000,000. In addition the solid state drives have some built in wear level technology which should prevent single cells from being "worn out" to soon. So in a nutshell with the steps you have already taken you should be ok.

You could also try jffs or yaffs which are filesystems designed just for flash memory.


All times are GMT -5. The time now is 10:56 AM.