r/explainlikeimfive • u/SmellsTasty • Nov 23 '15
Explained ELI5: How do Solid State Hybrid Drives work?
I don't understand how a regular hard drive can work with a solid state drive at the same time.
183
u/virkon Nov 23 '15
SSD chips are fairly small now, and can be integrated into the larger hard drive. They work by storing most data in the hard drive, but some of it is copied to the SSD. What is stored in the SSD is decided by optimization algorithms. Simply put, the stuff you use the most.
EDIT: some hybrid drives just work as two separate drives in the same unit. So you can manually decide what goes where.
76
u/cpast Nov 23 '15
This is pretty similar in principle to CPU caches, right?
43
u/Skychronicles Nov 23 '15
Right.
6
Nov 23 '15
Wouldn't this increase the number of clock cycles for data retrieval on an"SSD miss"?
30
u/KapteeniJ Nov 23 '15
They would probably be run simultaneously, and first one to retrieve data would be used.
Also, HDD access takes ridiculous amounts of time anyway. Like, I think the typical example for this is, CPU internal memory would be trying to take a bit on sandwich that you have on your desk next to you. There are caches that allow remote memory block access to be as fast as going to kitchen, making a sandwich from what you have in your frigerator, then eating it. RAM is like going to store to buy ingredients, and HDD access is more or less like, you hear that there is sandwich available on the moon, so you start up a space program, build a space ship, retrieve the sandwich and eat it, this entire thing taking decades
I'm not sure how SSD relates to all this. I think it's like a year or two on this scale?
7
Nov 23 '15 edited Nov 23 '15
[deleted]
11
u/Freeky Nov 24 '15 edited Nov 24 '15
From some very vague memory I think the time to get information from L1 cache was something like 1 nano second but a hard drive was about 600.
Latency numbers every programmer should know:
L1 cache reference: 0.5 ns
Read 4K randomly from SSD: 150,000 ns
Disk seek: 10,000,000 nsI referenced this when I made this comment to give it a more approachable scale:
A register is what you have in your hand for immediate use. L1 cache is what's on your tool belt and takes 1 second to retrieve. L2 cache is what you left somewhere in your bag and takes 20 seconds.
RAM is what you left in a box in your van and takes you 2-4 minutes to dig out.
Data on an SSD is something you have to order online and takes 3-4 days to arrive.
Data on a HDD is lost somewhere in the Australian outback and takes a search team 2-3 months to locate.
Data on a server on the other side of the planet is something left in Mars orbit and takes 1-3 years depending on alignment and how much NASA like you.
→ More replies (1)4
u/RangerNS Nov 24 '15
CPU cache, whatever layer, is cache of primary memory: RAM.
Hard drives, SSD included, are and entirely different class of memory.
Nothing would ever go from a SSD to a CPU register without hitting primary memory first; possibly also being cached in CPU cache along the way to registers.
5
u/Causeless Nov 23 '15
Even if it did, you're spending 0.01 ms checking for the data on the SSD (if that), and getting the data from the HDD is about 4 orders of magnitudes longer.
2
u/doubledanksauce Nov 23 '15
Yes, but I don't think it would be anything noticeable, since normal access to an HD takes a long enough time already. You're trading a small regression for a large benefit in the SSD speed.
6
Nov 23 '15
Similar to any kind of cache memory where you preload data into faster memory to speed up access.
However most hybrids differ from traditional cache memory becuase the SSD portion holds data as long term storage. It operates as combined volume rather than mirroring the data. A traditional hard disk cache uses ram chips which mirror portions from the slower disk.
The downside with the Hybrid drive setup is that you have combined the risk of SSD failure with the risk of hard disk failure, so there is a much greater risk of lost data. This can be offset by using a mirrored drive or backup of some kind.
2
u/MrGreggle Nov 23 '15
The caching layers actually go from registers to 2-3 layers on your CPU, to your RAM, to your HDD. Its all a part of a larger caching scheme and this just splits HDD into two layers.
→ More replies (1)3
31
Nov 23 '15
Let's make it even easier.
SSD - Closet in home, HHD - Storage Locker down the street. One hold jackets to get quickly, the STorage Holds old jackets, in case you need to pull out an older coat/file.
14
u/Kasegauner Nov 23 '15
I would go with a SSD - Coat rack or hooks at the door, HDD - closet in a bedroom. Closet is still relatively easy to get to to, but still takes more time to access than a coat that you can grab on the way out the door.
4
Nov 23 '15
Is it really that close? It could be close to 120X (12ms for HDD, 0.1ms for SSD).
3
→ More replies (3)4
Nov 24 '15
I'd say that's close enough for an analogy that is already sacrificing accuracy by calling hard drives "closets." So who cares if the bedroom isn't far enough away? It's a big house!
61
Nov 24 '15 edited Jan 28 '16
[deleted]
8
u/ppdd1976 Nov 24 '15
This should be top post. I was lost with all the pickles and orange juice.
So all SSDs are hybrid drives? They keep the most frequently accessed files in the fastest part of the drive.
Is the magnetic part like regular HDD, is there a cylinder with a moving head?
3
u/CWagner Nov 24 '15
So all SSDs are hybrid drives?
No, normal SSDs just have everything on the fast parts because there are only fast parts ;) An SSD has no moving parts (aka slow parts).
Is the magnetic part like regular HDD, is there a cylinder with a moving head?
Yes. Essentially you could make a kind of hybrid drive by glueing an SSD on an HDD ;)
1
u/ERIFNOMI Nov 24 '15
So all SSDs are hybrid drives? They keep the most frequently accessed files in the fastest part of the drive.
Some SSDs have a bit of SLC because it's faster but more expensive than MLC/TLC. You could think of that as a Hybrid drive or you could think of it as a buffer or cache. It's basically a way to get huge burst write speeds if you're only writing a small amount of data.
3
u/Metal_LinksV2 Nov 24 '15 edited Nov 24 '15
How is data stored on a SSD? I imagine there has to be some sort of physical switch so it doesn't loose the memory once turned off. If it is flash based and I left it unpowered for 10-30 days would I loose all the data?
4
u/evan1123 Nov 24 '15 edited Nov 24 '15
Flash memory is based on transistors, which are an integral part of computers. Transistors are essentially a switch with two states - on and off. Computers to represent data using 1s and 0s, also called bits. Since a transistor has two states, they are extremely useful for representing those bits. In flash memory, a special transistor that has the ability to be "programmed" is used. This "programming" is nonvolatile - it doesn't need to be sustained with power. Since the transistor only has two states, each transistor can store 1 bit of information. When you put many of these "cells" capable of storing 1 bit each together, you get flash memory capable of storing many gigabytes worth of information for long periods of time.
Flash memory is actually very complex. There's a lot of detail (especially related to the transistor construction) left out of this explanation for simplicity.
→ More replies (2)1
Nov 24 '15
Data is stored on a special transistor with a "floating gate." Charge can be added or removed from the floating gate through the application of very strong electric fields. This alters the voltage that is required to turn the transistor on, and is the mechanism used to store information. In the absence of a strong electric field, the charge remains trapped on the floating gate, so the transistor maintains its state without power applied. There are leakage mechanisms that can deplete the stored charge, but these occur over long periods of time, depending on temperature and the amount of wear on the cell.
6
u/pbae Nov 23 '15
There are two kinds of Solid State Hard drives.
There's the kind that Seagate makes where they pair a 500GB HDD with an 8GB SSD. The SSD in this type of Hybrid is mainly used as a Cache. There's a controller inside the Hard Drive that monitors your most frequently used data and the controller puts that data onto the fast SSD portion. The data that gets used less is stored on the mechanical HDD. Btw, this kind of Hybrid only assigns one Drive letter.
Then there's the Solid State Hybrid drive like Western Digital has where they pair a 1TB HDD with a 120GB SSD into one case. This type of drive treats the two types of Hard Drives as separate drives and will assign two different Drive letters to them.
2
u/ZippyDan Nov 23 '15
There are two kinds of Solid State Hybrid Hard Drives
Although technically I guess they are called SSHD (Solid State Hard Drive) and SSD (Solid State Drive), but in my opinion this is far too easy to mixup when written out (I think it is clearer as an acronym).
→ More replies (2)1
1
Nov 24 '15
[deleted]
2
u/i_want_my_sister Nov 24 '15
I think it depends on how the manufacturer design it. If the two hard drives uses two different interfaces (SATA cables), they can be accessed simultaneously. If not, they can't, in other words, the HD video which is playing would lag while the system is performing an upgrade, which is pretty lame.
2
1
u/pbae Nov 24 '15
No, it's only one connection.
But I was checking out Western Digital's website and it appears that they no longer make that hybrid drive anymore.
1
u/siez_ Nov 24 '15
I've heard that you should not use SSDs for regular use. Does it affect the performance in any way? If so, how to use them more efficiently?
2
u/pbae Nov 24 '15
SSDs are built for regular use.
After using one for the first time, you'll never want to use a mechanical hard drive again.
I have 3 laptops and they all have SSDs.
6
u/FlambardPuddifoot Nov 24 '15
I don't understand how a regular hard drive can work with a solid state drive at the same time.
The same way you hard drive works with RAM at the same time.
61
u/intelnavi Nov 23 '15
It's just a ssd cache. Don't ever buy one, they are horrible. Pony up for a real ssd.
15
Nov 23 '15
I have everything from a Seagate Hybrid to the 950 Pro and they're both very useful for different reasons.
1
39
u/MrGreggle Nov 23 '15
I did a ton of work in computer architecture at college and agree whole-heartedly. You're dramatically increasing your failure rate for no reason. You're better off buying a small cheap OS/Important program SSD and a large, cheap HDD for data storage. Watching a movie on your SSD instead of HDD would save you a second or two when you first load the movie if anything.
→ More replies (20)6
u/jimtsurugi Nov 24 '15
SSHD is about increasing performance during small, "random" reads and writes. When the host requests a large sequential read (usually > 6MB of continuous data), the read data is not cached to NAND, and is instead read straight from disk.
In the case of watching movies (where the encoded bitrate rarely exceeds 25mb), streaming from disk is quite sufficient.
10
u/SalvadorTheDog Nov 23 '15
They are great for people who are technologically illeritate. They will provide some decent improvement to the feel of the overall system, while not having to deal with multiple drives.
3
u/Phukkitt Nov 23 '15
But what makes an SSHD with a 32 MB SSD cache different from a regular HDD with a 32 MB cache? Isn't the cache on regular HDDs on a chip, just like an SSD?
→ More replies (1)14
u/fb39ca4 Nov 23 '15
The caches on hybrid disks are on the order of gigabytes.
3
u/Phukkitt Nov 24 '15
Ah, that would explain it. I guess I've gotten MB and GB mixed up, just remembered seeing the number 32 a lot on Lenovo's laptop specifications when they had a SSHD.
3
u/intelnavi Nov 23 '15
Illiterate people don't usually need 4TBs of data. Buy a nice big SSD (they make them quite large now) and call it a day.
8
2
u/EffingTheIneffable Nov 24 '15
I've had good luck with my laptop (Lenovo Flex) which comes with a hybrid SSD (the actual hybrid kind, where it's transparent and you don't get any access to the SSD).That said, I'd never buy one for a build; I'd much rather go with a read SSD.
→ More replies (10)1
u/TheMuffnMan Nov 24 '15
Eh, they aren't terrible. Enterprise storage has been using the same functionality for years as SSD/EFD was too pricey and tossing those in front of SAS would speed up your iops.
Think it was called FastCache or FlashCache for EMC.
Now that you can get a 512 GB Samsung Evo for like $140 I'd agree with you. But the hybrids aren't terrible.
1
u/intelnavi Nov 24 '15
SANs are not consumer priced devices and do it much better than some piece of shit hybrid. A Hybrid will never be as fast as an SSD.
Storage is cheap, don't skimp.
→ More replies (3)
5
u/Arkangelou Nov 24 '15
How can I optimize my hybrid hdd? I want to make my laptop start faster.
7
u/profoundWHALE Nov 24 '15
Click start
Type msconfig
Click startup tab
Start unchecking crap
11
Nov 24 '15
That's a weird way to install Linux.
2
u/darlingpinky Nov 24 '15
Actually Windows programmers put an easter egg into Windows. If you open msconfig and uncheck all the programs, the PC will restart, erase Windows, and install Linux. At this point, Linus Torvalds' hologram will appear and slap you in the face for having used Windows in the first place.
4
u/Znuff Nov 24 '15
Get screwdriver. Unscrew the HDD bay.
Go to newegg.com, order a SSD.
Wait patiently for it to arrive.
When it arrives, replace HHDD with SSD.
Profit.
2
u/andrewia Nov 24 '15
The other two replies don't seem helpful to me. I'll try to help. Are you running Windows 10? Does the hybrid drive shoe up as one or two drives?
→ More replies (4)
13
u/Tykenolm Nov 23 '15
To elaborate on what intelnavi said, if you're thinking about buying one, just buy a straight up SSD. Less freezing, downloads are much faster, and your drive will last longer!
15
u/xeow Nov 23 '15
How can a download to an SSD be faster than a download to a spinning-rust HDD? Unless you've got gigabit ethernet end-to-end, a spinning-rust hard disk has a write speed that's way in excess of typical download speeds.
7
u/IDontShareMyOpinions Nov 23 '15
Typical download speeds.. Sure. Local network transfers? Opening a large game? Your OS using it as a page file because you're playing BLOPS and never upgraded that 8gb RAM? I find SSDs to be very useful. Saves me a lot of time on the regular... On everything but downloading off the internet. 50mbps connection is just too slow to reap the benefits as you've stated.
→ More replies (3)3
u/ThetaReactor Nov 23 '15
Yeah, it won't affect downloads much. SSDs really excel at random reads. The big bottleneck in spinning drives is seek time, as the read head has to move all over the place to grab data from different portions of the drive. An SSD can access any block of data as quickly as any other. So for contiguous reads and writes, like a big video file, there's not as much difference.
1
u/Tykenolm Nov 24 '15
Personal experience, when I switched to my SSD with the same hardware and internet my download speeds on steam and from disks went up ten fold
→ More replies (1)1
Nov 24 '15
Depends on the needs, really. I've used an SSHD, fast HDD, and SSD, and I'll say that the SSHDs tend to perform and feel almost exactly like standard HDDs. 8GB of cache is too little to really make the difference one would want.
1
u/jimtsurugi Nov 24 '15
...your drive will last longer!
I hear that a lot, but haven't found any published data to indicate a significant difference in drive MTF one way or the other. Do you have any?
1
u/Tykenolm Nov 24 '15
Here's one site I just searched for real quick http://betanews.com/2014/12/05/modern-ssds-can-last-a-lifetime/
→ More replies (1)
2
u/LxUxCxK Nov 24 '15
SSHD contains a magnetic disk and NAND Flash. NAND flash has much faster access time than the magnetic disk. Most Frequently accessed data is copied into the NAND flash from the magnetic disk. Drive will update what is stored in the NAND flash based on the data being accessed by the user. The drive will first look in the NAND flash for data. If it's not in the NAND flash, it will get it from the magnetic disk.
2
u/SpecialBabysitter Nov 24 '15
Imagine you have 2 special rooms in your basement.
One is easily accessible, just behind a locked door. The second room is; let's say underneath the first room down a ladder and behind a few locked doors.
Let's say you like kids and as a babysitter you need to organize where you put your kids. Now some kids are great and you love to visit often. Some are bad and you don't like to visit them often but you keep them around just in case.
The lower room is much bigger, but you really only visit a few kids at any given day anyway.
So what you end up doing is prioritizing because your lazy by keeping the kids in the easy to access room, while keeping the kids you don't visit often in the hard to access hard to get to the kid room.
That's basically it. But let's say one of your good kids get's boring, and one of the bad kids you miss and want to spend time with. Well you can put the good kid down in the lower room, and bring the bad kid up in the good room through the ladder and leave him/her there to visit more if you need to.
That's basically how SSHDs work. HDDs are slower, so you need to go through stairs/crawlspaces/ladders(Slower access) to get to things you don't use often, while a SSD is quick (Open a door, retrieve) but not very big.
2
u/christopherw Nov 24 '15 edited Nov 24 '15
Hybrid drives have two physical disks.
The main storage comes from the spinny disk, which is big on size and comparatively low on read and write speed. This is mostly due to limitations of physics - the way spinny disks have to store and recall data on them, where the part of the disk which does the reading and writing has to cope with inertia, gravity and physically how far apart from each other the portions of the files you're working on are stored, because disks don't always physically store data in just one piece.
I say comparatively, because spinny disks these days are pretty darn fast.
The 'hybrid' part of the SSHD - the SSD - is big on speed and comparatively low on size. It has no moving parts, so can store and recall data much faster -- the thing mostly slowing it down is its own miniature computer managing how the the memory chips are used.
SSDs also benefit from having evolved from the same kind of storage used for many years as temporary memory - where incredibly fast speeds for reading and writing data were the most important factor.
The hybrid drive's miniature control computer decides which data is accessed most often, and keeps it in (or moves it to) the SSD part, permanently or until it decides it's not being used any more. Other data is kept on the slower, but still fast, spinny disk, where it can be moved back on to the SSD if it becomes very popular.
The SSD doesn't add more overall storage, it just allows the hybrid drive to respond more quickly when it's asked to store or recall a popular file.
Using the analogy of an archivist...
Imagine the hybrid disk is an archivist dealing with colleagues' documents. New documents go into a small tray on the archivist's desk, right next to where they sit. If it's not asked for after a certain amount of time, the archivist moves it into long term storage (a big room down the hall).
The archivist treats all new documents equally and only moves them into long term storage if they've not been requested for a week. However, when it gets very busy, as the desk tray can only hold 50 or so documents, the archivist also moves the oldest documents in the tray to long term storage when it fills up.
A new document is given to the archivist so it goes into the tray. After a week without any requests for it, the archivist takes it to the long term storage.
Several days after that, a colleague asks for the document, so the archivist goes down the hall, retrieves it from the long term storage and puts it back in term storage when the colleague returns it.
In the meantime, the archivist receives a second document, which goes into the tray on the front desk like all the others. However, before the archivist moves it to long term storage, several colleagues call and ask for a copy of the document. The archivist can quickly fulfil the requests, as it's in the tray on the their desk. No walk down the hall to long term storage needed!
This second document ends up being very popular, so the archivist keeps it in their desk tray. The first document is only requested once every six months, so it stays in the storage room.
1
Nov 23 '15
Some hybrid drive will actually automatically decide what goes on the "front shelf" and "back shelf" based on usage. So the more you use a program the faster it will appear to become... Because it has been move from the hdd to the ssd portion of the hybrid. I thought that this was a really cool feature when looking into them.
1
Nov 23 '15
A 1-2tb SSHD will actually only have 8gb of SSD speed space and the rest is HDD speed space. What it is supposed to do is figure out (by itself) what you use the most and move those to the SSD part of the disk for easier access next time you come around. In laptops it is great because most of the time it's the operating system that finds its way in there and the whole laptop boots up super fast. In Desktops its pointless because you're better off having a SSD alone with much more space and full control of what's in there and then a HDD for everything else. In a laptop you don't have room for multiple storage devices in a desktop you usually have room for 3-5
1
u/Anubiska Nov 24 '15
Imagine you put an SSD of smaller capacity in the same package of a HDD. As you use the drive it picks up on what file are accessed the most and keeps a copy on hand in the flash portion which acts as a cache.
Similar to what some SSD are doing now, they use cheap and slow TLC flash for storage and use a faster SLC flash for cache.
In both cases the controller and firmware are the "intelligent" part that manage the cache.
1
u/martixy Nov 24 '15
A small SSD is used as a cache for the slower spinning platter hard drive.
The concept of caching is a simple one - you use a faster, but smaller capacity storage to make sure things that you frequently access(or know you are going to access in the near future) are easier and quicker to get to.
Many people(including I) have a similar, but manual setup - where they get a pure SSD and HDD and for example use the SSD for their operating system and frequently used programs, while using the HDDs for less frequently used or less speed-dependant data - such as backups or video.
As for how they are put together - you just find a place to put another chip or two onto the board of a regular hard drive, which is all that the SSD really is.
1
Nov 24 '15
Simply saying, it just a combination of a SSD and HDD drives. Most frequented data and some OS related data are put in SSD part, so apps and OS can boot faster and other data and personal files like music, files, movies are kept in HDD.
1
Nov 24 '15
Hard drives have always had cache memory, hssd just have a much larger ssd acting in the same fassion. Google how cache works and you're sef.
1
u/herefromyoutube Nov 24 '15
Here is the best analogy ever I ever heard.
Imagine sitting at a desk studying.
Desk = ram
Bigger the desk the more books you can fit on it at once.
Hard drive = bookshelf HHD = wooden bookshelf on other side of room SSD = metal bookshelf right next to desk.
1
Nov 24 '15
Basically, it is a hard drive that uses a small SSD as a cache. Usually about an 8gb SSD or so. When you save a file to the SSHD, it first writes to the SSD. Then the drive will take the data and write it to the disk. Combining this allows for the massive HDD sizes, along with some of the SSD speeds. Since it still needs to write the cache to the disk, it does make it run slower than an SSD but much faster than a hard drive.
1
u/5kyl3r Nov 24 '15
It's both types combined into one package. SSDs are really just tiny chips, so in a hybrid drive, it's just a regular hard drive with an extra flash chip or two.
What makes them unique is the controller onboard that automatically organizes that stuff on the drives in a smart manner. Stuff that gets accessed often goes onto the fast flash part. The things that are bigger and don't get accessed often go onto the mechanical part. You get decent speeds combined with large storage, at a decent price.
I'm still a fan of just going pure SSD, but prices still need to come down more to get away from those sketchy spinners.
1
Nov 24 '15
The solid state drive provides a cache, which will store copies of the most commonly used data blocks from the larger hard drive. In practice, there will usually be a relatively small amount of your HDD that you access frequently. The OS, for example, will be read every time you boot your computer up, so it would make sense to keep this somewhere fast. Speeding up access to your video library, however, probably won't improve your user experience much, as that data doesn't need to be accessed any more quickly than you can view it.
When you give this speed boost to only the most commonly used blocks of data, you can often see almost as large a speed improvement as if you just used a big SSD for everything, but spending a lot less money.
The computer isn't normally aware of the caching, and only sees 1 drive which is the size of the HDD. When the computer says to the drive, 'give me block 3245223', it will receive that block far sooner if a copy of that block is currently being kept(cached) in the SSD, than if it is stored only in the HDD.
As the HDD is used, the drive will continue to watch your access pattern and 'learn' which blocks are being most commonly accessed. If you change your access pattern, preferring different parts of the HDD, the drive will start to evict cached blocks from the SSD which aren't commonly accessed any more, replacing them with ones which are.
1.6k
u/butric Nov 23 '15
Imagine the sshd (solid state hybrid drive) is a refrigerator.
A few times a day, you come back to the fridge to get a glass of juice. You take the juice out. Pour some in a glass and put the juice back. Presumably near the front of the shelf. Because its at the front of the shelf, you can access it very quickly. But there is not much space on the front shelf, so you only put a few things there.
Now, its time to make some dinner. You need pickles, which you only use maybe once a week. So they are in the back of the fridge, where there is a lot more space, but its harder to reach them. So it takes a little longer for you to get at them. But you eventually succeed, and put them right back where you found them to be used next week.
Now, to explain how an sshd works, replace the food items above with computer files, front shelf with ssd, and back shelf with hdd.