Linux Support for Hybrid Hard Drives? 86
christoofar asks: "HHDD (Hybrid Hard Disk Drive) technology has been receiving some buzz lately. The concept is not new, but Samsung has been working on a consumer version of HHDD that everyone can use. HHDDs are disk drives that carry onboard RAM (in this case, NAND flash) which is non-volatile and offers to speed boot times and writes to the disk. This carries enormous benefit to laptop users who need to keep their disk activity to a minimum in order to preserve battery life.
Given that Microsoft is adding support for Hybrid Hard Drives in their upcoming Windows Vista release, what efforts are being undertaken in the Linux realm to use this new storage technology?"
It should just work (Score:5, Insightful)
Re:It should just work (Score:5, Insightful)
Or if you've got a laptop, you maybe want to cache writes to the flash if you're using the battery, but write directly to the disk if you're hooked up to the mains. Since the operating system knows about this but the drive doesn't, the operating system needs to control the drive.
Re:It should just work (Score:2)
Still sounds pretty much like disk caching. During bootup, the system's going to be asking for the OS anyway*, so if you've got a big enough amount of RAM to load it into, you can just do that, can't you?
*I realize that this does not explain current boot times. Windows, Mac OS X et cetera are obviously spending some amou
Re:It should just work (Score:2)
Simple solution ... still no special driver needed (Score:2)
The simple solution is to just make a specific part of the hybrid drive be RAM based. It would default to being sectors starting at sector 0. Then the method to change it would be to partition the drive with a special partition code for a partition that will change the sector locations to be in RAM to what they are for that partition, up to the end of the partition or the RAM capacity, whichever is first. Then RE-partition it back to what the OS needs, which will not make changes on the hybrid drive (it
Re:Simple solution ... still no special driver nee (Score:3, Insightful)
Maybe someone doesn't want their operating system on the RAM-ified part. Maybe they want swap space there instead. Maybe they want the reserved journal space of a journaling filesystem that is frequently updated to be there. Of course all of these needs could be addressed in some way (at least I know some journaling filesystems let you put the journal in a different partition). You'd have to choose which sectors (don't think in cylinders anymore, it's all fake anyway) would be RAM-ified in a way that wo
Re:Simple solution ... still no special driver nee (Score:1, Insightful)
Cameras resort to using flash as a space and power tradeoff, and they can only get away with it because users don't fill and erase the same card ten thousand times.
Re:It should just work (Score:2)
You could easily have a drive that appears to the OS as two drives; one "drive" would always write to NAND, while the other would be the real disk, with any free space on the NAND part being used as the persistent cache. It
Re:It should just work (Score:4, Interesting)
Today's operating systems try to do exactly what this drive is doing by pumping all reads and writes through the paging system. The problem is that the OS can't take a full performance boost from this or data will be lost in a crash or power loss. You may remember that EXT2FS could easily lose all the data you'd recently written if it wasn't unmounted properly. (It ticked me off when I tried to move RedHat 5.2 packages to a special partition, then found out that they had all disappeared on reboot because I hadn't explicitly unmounted the disk. *grumble*)
Since this technology has little to no chance of losing data in a power failure, the OS can be modified to write the blocks immediately. This could easily result in a performance increase of 2 to 3 times what you normally see today. The improvements in writing meta-data alone could easily provide this increase.
sync (Score:2)
The SYNC command forces the system to flush all buffers to disk. Once it returns, you know that all currently cached data has been at least scheduled to be written to disk. (current documentation claims that it doesn't return until the data has actually been written). Once data goes to the HD, it may still take a second or more for it to clear out of the internal drive cache.
for older kern
Re:sync (Score:2)
Having flash in front of the platters will allow this same
Re:sync (Score:2)
Between the horrific speed differences between RAM and disk and the importance (nay -- criticality) of permanent storage, disk caching is an especially touchy space to work the tradeoffs.
If you don't cache at all, then you get horrific speed hits. If you cache too eagerly, th
Re:sync (Score:2)
Re:sync (Score:2)
Re:sync (Score:2)
Which is how most businesses are set up these days...
Re:sync (Score:1)
Re:sync (Score:2)
Very nice!
Is that the new 10Gig-E or fiber? (Or 10x1G NICs trunked together?
Re: hd faster than network unless... (Score:1)
I'd think that most email systems are multi-threaded so that a mail message waiting to be put on disk wouldn't block another one from comming...
I would think that the flash would be used for moderately frequently read items... (because superfrequently read stuff would be in
Re: hd faster than network unless... (Score:2)
Most people are no longer aware that a regular CD-ROM is half-height for a 5.25" disk bay. About the last thing that I've seen that took a full-height 5" slot was 8mm tape drives.
Re:It should just work (Score:2)
It would not kill performance at all. It might fail to improve it if the OS is paying no attention to what is going on with the drive. If the OS queues the writes to the RAM-ified sectors, then you get the old performanc as if this was not a hybrid drive. Reads can't get better if the page is already in system RAM anyway. But I could argue that an OS that queues writes for a reason other than the drive being busy or powered down is doing queueing badly, anyway. If the drive is idle and a process writes
Re:It should just work (Score:2)
I have a hunch (this is unsupported by data; you'd want to do some profiling before making a decision to do this) that you would want swap reads and writes to go right to the platter rather than flash. One reason is that flash does "wear out" after a while, and moving swap so that it doesn't use the flash would likely increase its lifetime su
Re:It should just work (Score:1)
Re:It should just work (Score:2)
Currently Windows reports 920 MB pagefile usage. I think that's probably total memory use, not the amount that's swapped out, but I can almost guarantee that there's something on disk. Windows seems to be very bad with swapping; before I added another GB of RAM (for a total of 1.5) it paged fairly frequently. After coming back from work and unlocking it, it would take probably 10 seconds to page everything in from disk.
A laptop (
Re:It should just work (Score:1)
Re:It should just work (Score:2, Interesting)
--Neth
Re:Is it me or does this seem pointless? (Score:2)
Re:Is it me or does this seem pointless? (Score:3, Insightful)
Re:Is it me or does this seem pointless? (Score:3, Interesting)
Seriously, the NAND flash memory stores the data immediately. It is a perfect write cache, because it does not forget the data. Almost perfect, because its write cycles are limited. But a more reliable file system would do the trick, too. Journaling is one way of making things more reliable. But, you have a good point. It is important that some data get written ASAP onto the medium. Unfortunately Linux file systems are not exactly the right choice i
Re:Is it me or does this seem pointless? (Score:3, Insightful)
First of all, you know that right now your writes are cached in your computer's memory for up to 30 seconds before they are flushed to disk. This is done so that synchronous read calls are less disrupted by writes.
It's possible that this new technology would allow the OS to commit writes to disk immediately (or at least much sooner). The disk writes to NVRAM or flash, at which point it should be stable through power loss or crash. The disk doesn't need t
Re:Is it me or does this seem pointless? (Score:1)
Re:Is it me or does this seem pointless? (Score:2)
Flash memory lasts quite a while - even longer than a hard drive, from what I've heard.
The Mybrid drives load commonly-used files into their flash memory - not only for faster access, but also to prevent wear-and-tear on the hard drive's cylinders.
Whatever is in this flash memory is already committed to the flash memory, and it'll stay there until it's overw
Write cache isnt bad (Score:2)
Some ( all? ) SAN devices have write cache, as well as read.
How is This an Ask Slashdot? (Score:1, Insightful)
What I'd rather see anyway. (Score:3, Interesting)
Then again I have been considering using an SD type card to contain the journal for my ext3 file system.
Actually, that combination; an ext3 file system in full data write-back journal mode, a solid-state flash device for that journal, and a "large
Re:What I'd rather see anyway. (Score:2)
ian
Re:What I'd rather see anyway. (Score:2)
Random writes needed? (Score:1)
Re:Random writes needed? (Score:2, Insightful)
What to put in there? (Score:5, Interesting)
Re:What to put in there? (Score:2)
If you're swapping while running normal applications, something is wrong with your system. If an increase in swap speed is immediately noticeable as better system performance, you need more memory. I do like the idea of suspending to flash though.
For the pendantic: sure, OCCASINALLY you might have to dip into swap. And sure, OCCASIONALLY you'll have to pull in some really stale pages. But these are supposed to be rare events. But if these ar
Re:What to put in there? (Score:2, Funny)
If you're swapping while running normal applications, something is wrong with your system.
Either that, or you're just dirt poor and trying to surf the net on 5-year-old equipment.
suspending to flash (Score:2)
add new hardware? fine, as soon as yer system is booted for real, save it to the bootchip.
Re:What to put in there? (Score:2)
And of course, memory is free, so we'll just all run out and solve that problem right away.
Re:What to put in there? (Score:1)
Oh, and it's a very bad idea to put swap in a Flash device, unless you want to wear out the sectors pretty quickly and render the chip useless.
Re:What to put in there? (Score:2)
Re:What to put in there? (Score:2)
When a DLL is loaded into memory from disk, it's only relocated if there's already another DLL loaded in the same slot in virtual memory. If there's no conflict with the DLL, it's not relocated; code pages are read directly from disk and never written back. Instead, when they're swapped out (it the machine doesn't have enough RAM), the page is simpl
Why wait? Hack one up yourself! (Score:5, Interesting)
I just got rid of an old toughbook cf-25 [wikispaces.com] that would've been perfect for this, as the drive mounting is gel and would easily accomodate an oddly shaped adapter instead of a regular drive. Or for the truly insane, a CF card piggybacked on a regular 2.5" drive! All I need is the ability to home-brew those little flex cables, and I'd be in business.
Re:Why wait? Hack one up yourself! (Score:1)
If you hard disk is working, then you have two hds.
Partitioning CF cards is also useful. On my Portege I run a Damn Small Linux frugal install on the first partition and storage in the second.
Nice to see (Score:3, Insightful)
Re:Nice to see (Score:1)
No need for anything special really (Score:1)
There are two ways that RAM can speed up a HD: as cache and as mirror. According to what I've read, it serves both purposes but mostly as mirror. And since mirror will represent a specific, unmoving window of the drive, a partition scheme that fits the situation is all that's really needed to best take advantage of it. Now deciding WHAT works best in that area of the drive is a matter for the really smart people. I'm not one of them...
But that said, I don't k
Re:No need for anything special really (Score:1)
Windows doesn't open executables for writing (Score:2)
Windows programs that modify their own EXE have to do some crazy tricks. While you cannot modify or delete a running program, you *can* rename or mov
Write caching in flash... (Score:2, Interesting)
Flash chips write at around 1Mb per second. Tops. Modern harddrives write around 50Mb per second. You'd need quite a lot of flash chips in parallel to top that.
Of course, you can cache acouple of writes on the laptop drive to prevent having to spin up the disk. But it is not going to be a speed issue.
Re:Write caching in flash... (Score:1)
The sustained write speed does not really matter for the small block operations.
Re:Write caching in flash... (Score:2)
Re:Write caching in flash... (Score:5, Informative)
They also spec 100,000 erase cycles before it's worn out. As was noted by an underrated poster the last time [slashdot.org] this came up, intelligent flash controller designs like this can cope with bad bits and assuring level usage of the memory much better than what you normally see in random hunk of flash.
An analysis at http://www.sudhian.com/printdocs.cfm?aid=686 [sudhian.com] suggests 33 years of usage for a typical worker. When you run the numbers it doesn't sound that difficult to create a design that would likely outlast the mechanical parts of a standard hard drive.
Re:Write caching in flash... (Score:2)
Re:Write caching in flash... (Score:2)
Other good uses for this (Score:4, Interesting)
I know this just adds another point of failure to the mix with the addition of flash memory. However, with the apparent improvements in the quality of flash memory, I would expect one of these drives to outlast a current laptop drive by at least 50%. (Note: this is just idle speculation, but I don't know of any solid real-world statistics on laptop hard drive lifespan. I'm guessing laptop makers don't want us to know, either.)
I think that the point of drivers is, therefore, valid. There needs to be some sort of intelligence behind this system to allow frequently needed files to be held in cache in order for this to work effectively. Sure, you could build a drive that could try this on its own, but odds are you would totally throw out any performance or power advantage by doing so.
loss prevention (Score:3, Funny)
Laptop hard drives: the new floppy
Re:loss prevention (Score:2)
Another use? (Score:3, Insightful)
Re:Another use? (Score:2)
1. power consumption (alot)
2. less wear on the HD
nothing else.
Re:Another use? (Score:1)
*eats cookie*
Hype? (Score:2)
solid state hard drives (Score:2)
All reads and writes are to the ram. The hard disk isn't even running. When power is lost for more than 15 seconds, the hard disk spins up and the contents of the ram are written out to disk. When power comes back on, the drive spins up, the contents of the disk are loaded back in to ram and operation resumes.
It looks like the answer is "yes" (Score:3, Informative)
Here's the description:
"Memory Technology Devices are flash, RAM and similar chips, often used for solid state file systems on embedded devices. This option will provide the generic support for MTD drivers to register themselves with the kernel and for potential users of MTD devices to enumerate the devices which are present and obtain a handle on them. It will also allow you to select individual drivers for particular hardware and users of MTD devices."
It's got options for a whole bunch of things, such as "FTL (Flash Translation Layer)", "NFTL (NAND Flash Translation Layer)", and "INFTL (Inverse NAND Flash Translation Layer)".
Given that it says the hard drives will use "a one-gigabit OneNAND flash chip" (according to the article), it sounds like it will work.
Re:It looks like the answer is "yes" (Score:1)
Re:It looks like the answer is "yes" (Score:2)
use something else (Score:1)
Re:use something else (Score:1)
Do we really need Hyrbid Drives? (Score:2)