Page 1 of 1
booting from USB flash drive
Posted: Thu May 17, 2007 9:57 am
by jkbrand
With 8GB flash drives now under $50, I'm wondering if anyone has tried to load XP onto a flash drive and booting from it?
If so, it seems it would load considerably faster than from any HDD.
True?
If anyone's done this, I'd sure like to know the steps that were taken to make it happen.....
Jeff
Posted: Thu May 17, 2007 10:50 am
by pxa270
http://www.ngine.de/index.jsp?pageid=4176
Disclaimer: I've not actually tried this. Also, note that this is for installing to USB hard drives. Installing to USB flash should work the same, but if it writes (or swaps) a lot to the flash drive, it may shorten its lifespan considerably.
Posted: Thu May 17, 2007 2:42 pm
by jkbrand
Thanks for the informative link.....
Regarding your observation of limited read-write cycles: I've checked a couple sites about life expectancy but the evidence seems somewhat contradictory. It appears that most commercial sticks are warranted for at least a million cycles, but what might that mean to the casual XP user? Days of operability? Weeks? Months?
Another view (on the other end of the spectrum) indicates analysts have calculated that continuous memory writes can go on for over 50 years before the write-endurance limitation is hit.
Maybe the only way to know is simply to try it.....
Jeff
Posted: Thu May 17, 2007 3:25 pm
by rkawakami
Flash memory cells are rated anywhere between a minimum of 10,000 to 1 million erase/write cycles, depending upon the design, manufacturer, and endurance/reliability testing. By it's very nature flash memory will eventually wear out the more it is erased and re-programmed. Memories now days use a wear-leveling algorithm which tends to spread out the usage of each block of memory so that they are all used somewhat equally.
If this wear-leveling does not take place, here's some numbers to think about:
- assume that any particular flash memory sector (block) erases in 50 milliseconds (mS); some memories are as fast as 2mS, others take 100mS
- also assume that only one bit gets changed (written) which takes about 10 microseconds (uS)
- since the write time is next to nothing when compared to the erase time, let's just ignore it
- 10,000 erase cycles will take 500,000mS or 500 seconds or 8.3 minutes
- 1,000,000 erase cycles will take 50,000,000mS or 50,000 seconds or 833.3 minutes or 13.8 hours
These are worst case times it would take to make one flash memory sector go "bad" if it was continuously hammered on. Are the final products that you buy in thumb drives tested like this. No. Why? Doing so would render the memory useless. Is the 10,000/1,000,000 cycle number accurate? Probably, but there's no way to know for sure. During characterization of the new design/process some parts are endurance tested to see if they would meet the published erase/write cycle number. If they do, then as long as the wafer manufacturing process is monitored and in control, then future product should also meet the datasheet.
Knowing what I know about flash memory, I would not use it in a situation where it is being used quite frequently, say as a swap file container in a heavily used, under memory-supplied computer. For that type of usage I still trust rotating magnetic storage (with it's own shortcomings) over semiconductor memory (at least the flash variety).
Posted: Fri May 18, 2007 12:38 pm
by jkbrand
Ray,
Thanks for the input and the calculations.
One might infer, in the case of 1 million cycles) that the 13.8 hours is for each sector, correct? If so, the 13.8 hours doesn't seem to disqualify the flash because there are probably thousands or millions of sectots. I don't know how many sectors my 8GB flash drive might have, but I assume I could multiply at least half that number by the 13.8 to compute a theoretical half life of the flash.
If we assumed a sector size of 4KB, the number of sectors would be on the order of 2 million! Half of that number times 15.8 hours would be 15 million hours! So might one expect that half the drive could be calculated to survive (15million/[24x365]) over 1700 years! I wonder what numbers the analysts used (and assumed) to suggest that continuous writes would survive for 50+ years.
I'm not suggesting that half of a device's life is tolerable or useful, just using it as a basis to understand the significance of the numbers.
Finally, I recall reading of the forum the advisability of loading up on RAM to minimize (or eliminate) paging. I have 2GB of RAM on my X60, and I've disabled the paging file. I assume the life of a memory bit is the same for RAM as on the flash stick, although I assume the system memory is faster.
Jeff
Posted: Fri May 18, 2007 1:51 pm
by rkawakami
jkbrand wrote:One might infer, in the case of 1 million cycles) that the 13.8 hours is for each sector, correct?
Yes, although typically the eraseable memory unit for a NAND flash is really a "block". It gets confusing... stick with me...
jkbrand wrote:If so, the 13.8 hours doesn't seem to disqualify the flash because there are probably thousands or millions of sectots.
As an example, from a
Micron 16Gbit NAND Flash (2MByte) datasheet, there are 16,384 eraseable blocks. Contained in each "block" are 128K bytes (64 sectors or "pages" of 2KB). A block is the smallest unit of flash memory which can be erased and which is subject to the minimum number of erase/program cycles specification.
With the Micron part I have referenced, the block erase time is actually closer to 2ms and not 50ms. So in theory, assuming again that no wear-leveling takes place, your "half-life" calculation is something like this:
(mS for erase) * (minimum erase cycles) * (half # of blocks)
0.002 * 1,000,000 * 8,192 = 16,384 seconds or 273 minutes or 4.5 hours.
Note that I'm taking the very worst case numbers here but I think it points out some of the dangers that one may want to consider when using flash memory as a disk drive. I don't know of any multiplier or "rule-of-thumb" that one can use when determining the usefulness of the wear-leveling algorithms built into the flash memory controllers in thumb drives. If you assume a factor of 10,000, that means you would extend the half-life to about 5 years. Is that enough of a useful life? Probably. Would you notice any problems as the flash cells age and are marked as bad? No, as long as the flash memory controller does its job. You may notice that the drive is no longer as big as it used to be or that there are bad blocks, but the same can be also be said for hard disk drives.
jkbrand wrote:I have 2GB of RAM on my X60, and I've disabled the paging file. I assume the life of a memory bit is the same for RAM as on the flash stick, although I assume the system memory is faster.
You probably should have
some paging file just in case an application does not behave itself and tries to grab more memory than what you physically have. DRAM memory is not subject to the same life expectancy limits that flash memory is. Essentially DRAM does not wear out. Yes it's quite a bit faster than flash but at the same time, if you lose power, you lose data.