Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Hardware
User Name
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?


  Search this Thread
Old 12-03-2007, 06:14 PM   #1
LQ Newbie
Registered: Dec 2007
Location: Chicago, USA
Distribution: Debian, NetBSD
Posts: 25

Rep: Reputation: 15
Best practices to prolong the life of flash drives?


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.
Old 12-03-2007, 06:53 PM   #2
Senior Member
Registered: Jul 2005
Distribution: Slackware
Posts: 1,231

Rep: Reputation: 57
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.
Old 12-05-2007, 11:54 AM   #3
LQ Newbie
Registered: Dec 2007
Location: Chicago, USA
Distribution: Debian, NetBSD
Posts: 25

Original Poster
Rep: Reputation: 15
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.
Old 12-05-2007, 01:14 PM   #4
Registered: Aug 2002
Posts: 21,610

Rep: Reputation: 4168Reputation: 4168Reputation: 4168Reputation: 4168Reputation: 4168Reputation: 4168Reputation: 4168Reputation: 4168Reputation: 4168Reputation: 4168Reputation: 4168
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Monitor your drives to extend their life LXer Syndicated Linux News 1 11-05-2007 01:01 PM
Life time of USB compact flash satimis Linux - Hardware 4 03-17-2006 02:19 PM
Formating flash drives Gogul Linux - General 3 11-29-2005 10:10 AM
Flash Drives skidmarc General 1 10-22-2003 08:34 AM
Flash drives Stephanie General 7 02-07-2003 10:44 PM > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 07:18 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration