Linux Support for Hybrid Hard Drives?
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?"
Why aren't the drives designed in a way that the drive technology worries about the details of retrieving and writing files, and sends them the way USB, IDE, SATA, or SCSI drives already do? Why would these drives need special drivers?
Saskboy's blog is good. 9 out of 10 dentists agree.
Hard drives go at a certain speed. Adding NAND or more cache boosts speeds for transfering data because it's held in the Cache or NAND.
Am I the only one who thinks this is pointless? When writing this is delaying when data is committed to the hard drive but it gives the feeling that it's faster. I understand the point for reading but when I save a file to my hard drive, I want it committed immediately. I don't want it to "feel" faster because it's still in the cache and hasn't finished actually writting to the disk.
Am I the only one who thinks we should be focusing more on complete data storage solutions using solid state memory? It would give huge advantages over mechanical hard drives especially for laptop users.
I'm sure they will be support for it by the time it is really *needed*. If it is an open and available spec, support could be coding before these things start becoming popular. Otherwise, as the linux community doesn't enjoy the advantages of MS, it will be reverse engineered after release as someone's need dictates. Honestly, how is this a useful question? These drives seem to have limited use outside of laptops and there shouldn't *Need* to be special support, as other posters have said. It should adhere to already existing SATA standards or what not and handle everything on the inside.
If they don't even the writes across the media, bits will wear out faster at say the beginning of the memory. Go through a few million writes in a hurry. No thanks for me! Or am I wrong about that?
The question is not whether Linux will support the drive -- someone will eventually write one. The question is what files to put in there to make it boot faster. Perhaps should be done is to put the entire swap partition in there, and put those "hibernation" files in the swap. So it would resume fast, and would also make normal operations faster with the faster swap.
You shouldn't have to wait for the drives to come out. Laptop drive controllers can address a master and a slave, they just don't have a slave drive connected in normal usage. I was just looking for an adapter to let me put a pair of CF cards in place of a 2.5" hard drive. (I can only find the single-card version in a 2.5" form factor, all the dual-card ones are for 3.5" mounting.) I figure, put a solid-state card in one slot and a microdrive in the other, and I've got a hybrid-drive laptop, right?
I just got rid of an old toughbook cf-25 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.
With all of the improvements in RAM, on-die cache and processor speed, the bottleneck in performence is HD speed. Anything that helps boot that is a welcome improvement.
Just HD partitioning should be enough really.
.EXE to be changed by the program that uses it. (STUPID but I've seen it done.) This is evidenced in my mind by the common fact that you can't copy a file that is currently being used as a running program. I'd be pretty surprised if that was the case in Linux. That might be the reason it would take some special tricks to make it work well under VISTA since the drive itself might think it's writing to the OS files when it's really not... or perhaps it really is when it shouldn't need to. (Linux is more ROMable than Windows for sure.)
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 know why the memory needs to be flash at all? For me, I can see adding a couple of memory cards from a laptop into slots on the drive unit and at power-up, the drive just copies that window of the drive into its memory. It would take just slightly more time over the amount of time to spin up. Since an OS wouldn't be controlling that action, it would be quick, simple and sequential (fast). After that, so long as OS files in that area aren't changed you're gold.
I can't speak for Linux, but I know that when Windows opens files for execution, it keeps them open for write access because there's always that possibility for a
But anyway, I think conventional RAM would be just fine and wouldn't need to boost the price much over conventional hard drives either since dynamic RAM itself doesn't cost that much in comparison to non-volatile RAM devices. So beyond the additional hardware to support dynamic RAM, all that's needed is firmware code to support the new configuration. Having 1GB for just OS files might even be a little excessive for many systems and 2GB would be enough to hold all of the most commonly used software too. Both RAM amounts are conceivable today.
It would rock for laptops. It could conserve a LOT of power to be sure.
I'm not sure if write caching in the flash chips is a good idea...
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.
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.
I am feeling fat and sassy
So I see a completely different picture here. There are a lot of files on the HDD that are never rewritten. System files, etc. This is where having hybrid drives really helps. Put the main boot files, executables and libraries which are accessed when staring things up in there. So no fast saves, but no load time.
If I understand Dirac correctly, his meaning is this: there is no God, and Dirac is his Prophet. -Pauli
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 kernels, you can also run the 'update' progrem which will periodically flush the cache. (RH5.2 probabably was old enough to need this). On the most recent kernels, this capability is now supposed to be built in.
Free Software: Like love, it grows best when given away.
I haven't seen the details yet- has anyone? One way to do it would be by LBA- a certain group of blocks could be the FLASH RAM, and the rest mechanical disk. By careful fdisk-ing/ partition administration, one could be sure files like /bin, /etc, /usr/bin, or documents, or whatever you want for the application, were in FLASH area. (Some FLASH is presumably used by the drive for lazy write cache.)
Another way, which I'd LOVE to see someone make, would be a dual drive- the primary ATA could be a flash drive, and secondary could be the hard disk (or vice versa.) Two ATA devices in one. Again, intelligent use of fdisk/ partition allocation, directory placement, etc. Maybe keep documents on the FLASH drive, or whatever.
Windows doesn't open executables for writing when you run them. In fact, when you run a program, it prevents writing entirely. Windows loads executables through the memory-mapped file interface. It does this so it can share code pages between different processes, and get away with paging out part of a program without actually writing to the page file first.
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 move one. You rename yourself then you make a new copy of yourself with the desired changes. When you're done, you execute the new copy and terminate yourself so that the new copy can delete you.
Melissa
"Screw Sun, cross-platform will never work. Let's move on and steal the Java language." - Visual J++ Product Manager
I'd like to see linux have support for (and have hardware makers create) what SUN used to call NFS Accelerators. Basically add-on NV (or battery backed) memory sufficent to transparently cache write information. On my laptop I'd put it in my ExpressCard(tm) slot.
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" flush interval (more than the default five seconds) could accomplish essentially the same thing.
I wonder what the flash wear rate would be...? Do they make NAND SD cards?
(etc. od nausium. ahmen.)
Innocent people shouldn't be forced to pay for inferior software development.
--"Code Complete" Microsoft Press
Seeing as I can't buy one of these drives from my usual shopping websites, why would I care? Obviously the technology is very new. I would much rather let Samsung and Windows sort out all the defects at their cost and embarrassment than risk buying a kludgey piece of hardware for my linux computer.
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 will just update the RAM location when a partition table is written that includes the special partition type code). Alternatively, bypass the partition program's overlap inhibit and let the specially coded partition overlap whatever is being RAM-ified to avoid ever being in a state where you have an unusable partition table. BSD and Linux users can just use ordinary tools after reading the directions on how to do this. Windows users might have to get a special tool or a modified partitioning program (I'm sure all the commercial ones would pick up on this quickly).
The hybrid drive controller would simply monitor writes to the partition table and check for the special code in a partition entry. If no code, do nothing special (but of course, write the data if partition table writing is not otherwise inhibited). If the code is present, check that partition table entry for sanity, and if valid, perform the steps needed to make the change (lock RAM, store RAM data to platter in old location, fetch new location data to RAM, save new location sector numbers, unlock RAM).
The driver won't need to know because it will still just behave as usual, issuing standard commands for its drive interface type (SCSI, IDE/PATA, SATA) for any sector. So the driver won't need to be changed.
This method won't have to rule out also including other methods that can do the deed by other means. I would suggest a jumper spot on the drive hardware to inhibit changes so you can be sure your changes stay permanent regardless of software upgrades, installs, viruses, trojans, etc.
now we need to go OSS in diesel cars
An even simpler solution pretty much on the same lines as your thinking but slightly different: Just have a certain range of cylinders right at the beginning of the drive set aside as the flash memory. When you partition your hard drive, partition that range of cylinders to install your operating system on, and it will all be in flash and load super-fast for boot. Then, install the rest of your junk to the other partition that is regular hard drive. It will separate the data perfectly.
Its not a hybrid drive, but the clever one I saw was a hard disk-backed 2 gig "solid state" drive. It was a board in a 1U rackmount box with 2 gigs of regular ram, a battery and a 2 gig hard disk.
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.
Moderating "-1, Disagree" is simple censorship. Have the guts to post your opinion.
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 would fit various needs in various operating systems, including that one with the largest market.
now we need to go OSS in diesel cars
Most common source of data loss.
Laptop hard drives: the new floppy
There are no trails. There are no trees out here.
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.
www.linuxpenguin.net
i use a 12 hp dot matrix and stone tablets [modified] ive had some of my bakups for 15+ years and no deterioratin equivalent to 100000rpm hdd read 35000 write
how about 'boot state' recorder to flash.. as in, unless you install software or add hardware, your system memory at bootstate can be written to a flashchip the same size as your ram, and you can boot, or reboot, as fast as you can re-dump the chip into ram.
add new hardware? fine, as soon as yer system is booted for real, save it to the bootchip.
every day http://en.wikipedia.org/wiki/Special:Random
Pretty much nobody wilfully uses a flash medium for swap space or transaction logs. Remember, each sector is only good for a limited number of write cycles, so they're only well suited for mostly read-only data (like system binaries or audio/video playback).
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.
The HD is ofcourse used for other things as well... it has to get done writing something and then seek.. yada yada...
/. had an article on why vista won't suck.. and the ability to use a usb thumb drive for system purposes was mentioned.
/boot be flash.. I might make some databases be part flash...
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 RAM already, and stuff that isn't read often.. we could wait for... unless it's a critical low latency item...
So, for those things infrequently read, but needing low latency, the first part of the file ( or most critical to be read) could be stored in the flash section... and the hd could fill it's cache with the rest of the file between seeks, or just go and read the file...
I though flash was inappropriate for swap.. because of it's limited writability.. however, there filesystems for flash take this into account.
In linux, I might make
I'd have to say that the whole hybrid drive could be done without anymodification of the drivers...
The hard drive controler would do analysis of what files get changed little... er sectors or what-not.. and read frequently... it would then copy the files, or initial parts of the files to flash. I would think that it would be more prudent to "copy" rather than "move" the part of a file... just because it makes error recovery a bit easier.
I'd just like to get a hard drive that takes sticks of sdram and has a battery backup... so that when the power goes off, it sits there still spinning writing the ram to disk and safely parking it's heads before shutting down.. it wouldn't take that big of a battery!
Remember that our 3 1/2 inch drives are half height!!! I had a 300mb scsi disk that was full height.. and I asked my dad... why is this double height?! and I was told... back in the day son...
anyway... we could have hd's with ram sticks, battery, and cooling solution if we just let the dogs be a bit bigger.
-AP
Please use [ informative / summarizing ] SUBJECT LINES
Flame me here
As long as your ram has a battery, no worries.
Some ( all? ) SAN devices have write cache, as well as read.
---- Booth was a patriot ----
I just want to know if I can get one of these to put in my HDTV. Then I could have an HHDDHDTV.
I would think the easiest way to accomplish the goal of HHDDs is to simply have 2 drives, one made of Flash RAM and one traditional.... You use the flash drive for your OS and programs, and then store all your data on the traditional drive.
"A truly wise man realizes he knows nothing."
Am I the only one who smells a large DRM rat in the very idea of a lot of RAM memory in a hard drive, and the need for special software in a future 'operating system' to 'access it'. My guess is that it is for use of the DRM artists and pigopolists and not at all by we users who will be its victims. I will buy all the hard drives that I will need for the next thirty years in the next year and never buy nor allow into any of my systems any of these pieces of DRM garbage.
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.
Free Software: Like love, it grows best when given away.
I did have a full height 9GB SCSI disk. I was like a very large and heavy brick.
When it failed it lived under my desk for a while, and saw occasional usage as a door-stop.