Udostępnij za pośrednictwem


Why Flash memory is good for your computer

Simply put, flash memory will enable a revolution in improving computer performance in daily utilization scenarios. Your computer will boot up faster. It will launch applications significantly faster. (Hey, it will shutdown faster as well.)

The problem

To see why we will have this dramatic performance improvement, let's remember how harddisks work: whenever you have a mixture of random I/O requests, the actuator moves across different tracks to read/write the corresponding data. Switching tracks is a slow operation. For an average SATA drive, this is around 9 milliseconds. This might not seem much, but a few milliseconds per seek means that you can have at most a few hundred random I/Os per second. And this feels like light-years compared with the performance of other components in the system like RAM access speeds or even CPU frequency. So, just to give you an example, a random I/O with 4 KB requests and average of 4 ms seek time per request would mean around 1000/4 * 4 KB = 1 MB per second disk transfer rate. Pretty small, don't you think? Especially when you compare it with sequential I/O, where you can get a much faster transfer rate (say, 60-70 MB/s on a regular harddisk, depending the rotational speed, data density, etc).  

One trick to alleviate this performance issue is to minimize seek time by reordering writes and/or serving reads from cached memory. Memory caches can greatly help in this regard, but here is a little problem: applications, the OS, and other components do not expect writes to be reordered. When you a write reordering is detected at the application level, then a data corruption can appear, especially when you reboot the machine in the middle of performingg a set of reordered writes.

For example the applicaiton is performing Write(block1) followed by Write(block2) in one thread, and Read(block1) followed by Read(block2) on a different thread. In the sequence above, the application expects block1 to be written always before writing block2. Having this guarantee simplifies for example applicaiton recovery semantics, assuming that the computer can crash between writing block1 and block2. But if we perform write reordering, and only write to the disk block2, then our application recovery logic cannot be done in any way. And so we get to corruption.

Still, storage controllers perform today all sorts of tricks like maintaining a write-through cache in volatile RAM, coupled with limited reordering. More advanced controllers, or SAN equipment use persistent caches (battery-backed volatile RAM) to perform write reordering, complementing advanced storage features like RAID configurations, etc.

The solution - why flash is good

By now it should be clear how flash can be used in this picture: you can use inexpensive flash as a persistent write-through cache for reads/writes. Also, the fact that this flash is persistent enables reordering I/O requests at an unprecedented level, therefore greatly reducing our nasty seek time bottleneck:

The new 2Gb OneNAND chip doubles the capacity of a OneNAND memory device (from 1Gb) and increases the chip's ‘write' speed from 9.3MByte to 17MByte per second.
”We're seeing a rapidly widening market for our OneNAND memory because of its outstanding performance and capacity that has become even more noteworthy with the application of 60 nm technology,” said Don Barnetson, Director, Flash Marketing, Samsung Semiconductor. [...]

Because of its exceptionally high performance, OneNAND can serve as a catalyst in the development of new product markets. A much-discussed example of this application-creating role is in how OneNAND memory is now being specified as the buffer memory inside a hybrid hard disk.
Samsung successfully demonstrated a commercial Hybrid-HDD prototype for the first time at the MS Developer Conference (WinHEC: Windows Hardware Engineering conference) in Seattle last month.

[source: https://www.physorg.com/news70899414.html]

Flash-based I/O optimizations - already present in Vista 

One more thing worth mentioning: Vista already benefits from Flash-based optimization. The feature is called EMD (External Memory Device), and can boost the performance of your computer by simply adding a USB thumbdrive and designate it as an EMD device. Under the cover, it works in a similar way with the technique described above.

Comments

  • Anonymous
    July 05, 2006
    You said "And this feels like light-years"  What factor do you use to convert between milliseconds (time) and light-years (distance)?
  • Anonymous
    July 05, 2006
    A 'light-year' is a measurement of distance, not time.
  • Anonymous
    July 05, 2006
    Everyone knows you can use parsecs to convert between milliseconds and light years.
  • Anonymous
    July 05, 2006
    But thats under Vista. XP won't get this. And that is a shame because I don't see a lot of people in Europe jump on the Vista bandwagon that quickly. (The firms I'm working for certainly not).
  • Anonymous
    July 05, 2006
    The comment has been removed
  • Anonymous
    April 03, 2008
    The comment has been removed