Re: Installing into a SSD
Dabl and Patb are both right to be advising special steps to be taken when installing in small flash memories where the endurance of the flash memory is not known. (Not advertised).
I would imagine that the endurance of the EeePC's 4001MB SILICONMOTION SM would be a lot more than the 10000 writes per cell, (the figure that rozojc quoted in Dabl's eeeuser.com web forums link.
Most flash memory these days has an endurance of between 100000 and 1000000 write-erase-cycles per cell, and of course with 'wear leveling', we're not able to keep on writing the the same cells repeatedly even if we wanted to.
(Presuming the 4001MB SILICONMOTION SM uses wear leveling. I think it would need to).
I have been taking a closer look into flash memory wear and I found the following interesting web site, Accurately judging endurance for solid-state storage - EDN, 1/19/2006 - Gary Drossel
I took the equation found in that web page and made a spreadsheet for it, and it's great fun to play with the numbers in it.
There were a number of areas of concern cited in the eeeusers.com forum about using a standard Linux installation in the flash memory, and in other websites I researched.
One worry was the file system journal.
I tried to find out how much data is written and how often and I've come up with a value of 1 kb of data 60 times per minute, (although I have read in another website that the file system journal is updated only every five seconds).
Even only a 1 kb write would force the flash memory to re-write an entire cell though, and the size of these cells can vary between brands and types of flash. I picked 128 mb for the size of each cell for use in Gary Drossel equation.
For system logging in /var/log/messages, I took a look in mine and my system has been up for 8 hours, with 35 messages, forcing a minimum write of 128 mb each time. Let's just say 100 disk writes per 24 hours for a round number okay?
For firefox, I emptied my firefox cache and visited 12 random websites, (includung a youtube video), and found 48 files, all but three were under 128 mb. I'm counting 52 disk writes for that.
Okay, let's say we're going to visit 100 websites per day. 55/12 x 100 = 458 disk writes per day.
I read that Email messages average about 11kb in length. Each one means a 128 kb erase block anyway, so the size doesn't matter. 12 emails per day = 12 disk writes.
I have no idea how many disc writes 'atime' would be responsible for, but I did find a site which said that in Hardy Heron and later, we use 'relatime', so it might not be important to edit /etc/fstab with 'noatime'.
I don't know much about blkid.tab and mtab either, but they are also supposed to be responsible for some disc writes.
To convert the all except the file system journaling values from writes per day to writes per minute, they each need to be and divided by 24 and then by 60.
I really don't know how much the swap area would be worth. That would very a great deal depending on the other hardware and what programs are used and so on. I just picked a random number for that, (well, I took a guess, if anyone has an idea about how to do better could they please let me know). I used .8 kb per minute.
EDIT: The iostat command should be able to give an idea of how much an operating system writes to the swap area.
Something like, 'iostat -k -d /dev/sda5 5 100 >> swap-report' should work,
I picked a value of .48 kb per minute for the user's normal work, like saving files, updates and so on.
iostat -k -d /dev/sda5 5 100 >> swap-report
WIth those added up, I divided by 8 to convert from kb to mb.
The end result is, I figure that with a normal installation, we'd be writing an average of around 1.13 mb per minute to the flash.
Okay, I do realize a few of my figures pretty wild, but I'm doing my best.
Now, running that through the equation I linked you to earlier, for a 4 GB flash memory, with an endurance of 100000 and 80% full of static data, average 1.13 mb file size, 60 time per minute comes to a predicted life of 2.3 years.
If we use all the tricks to reduce disk writes, /var/log/messages by eliminating swap, web browser caching, file system journalling, and so on, I make it down from 1.13 mb/min to just 0.06 mb file size, average. The spreadsheet indicates now a predicted lifetime of 43.29 years.
Now, going back to our worst case scenario, with the 1.13 mb average per minute, for a predicted 2.3 year lifetime for a 4 GB drive, let's see what happens when we change the drive size parameter.
Entering 120 GB instead of just 4 GB increases the life of the flash to 68.96 years.
Now, take into consideration that an OCZ flash memory would have an endurance of at least 1000000 rewrites per cell, and we can expect to do our worst to the 120GB OCZ Core Series V2 Solid State Drive for an expected lifetime of around 7 centuries.
I don't care if my mathematics is a bit rough. You at least get the idea that it will be a long time right?
Actually, OCZ doesn't advertise the endurance as a number of rewrites per call, they just say,
That actually only comes to about 171 years of continuous use.
Designed for ultimate reliability, Core V2 SSDs have an excellent 1.5 million hour mean time before failure (MTBF)
So you see,there's a big difference between a 4 GB EeePC flash memory and a 120GB OCZ Core Series V2 Solid State Drive. My main point is that you need to look at the particular flash memory in question and not just think that all flash memory is the same.
Making special changes to Ubuntu may be appropriate for some kinds of flash memory, but it might not be necessary for others.
...and once again, sorry for the wild figures, if anyone can ways to get figures that would be more accurate or can run the equation themselves and see how their results compare with mine it should be interesting. I'm not much of a mathematician, (please accept my apologies for that).
Last edited by Herman; October 18th, 2008 at 11:39 AM.
Ubuntu user since 2004 (Warty Warthog)