Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Traverse

macrumors 604
Original poster
Mar 11, 2013
7,724
4,511
Here
I know third party SSDs like samsung have 512MB or 1GB "caches" as does Apple's retina Macs (I just saw a forum post about it), but what purpose does the cache serve?

Forgive the ignorance, I'm trying to learn more about computer hardware.
 
I know third party SSDs like samsung have 512MB or 1GB "caches" as does Apple's retina Macs (I just saw a forum post about it), but what purpose does the cache serve?

Forgive the ignorance, I'm trying to learn more about computer hardware.

A cache holds data in memory for quicker access. Even on a HDD/SSD, items held in the cache have roughly the same access time as RAM, and both are faster than accessing from the drive itself. Cache can also be used as a buffer during I/O intensive activities to prevent drops in reading the data from the drive.
 
A cache holds data in memory for quicker access. Even on a HDD/SSD, items held in the cache have roughly the same access time as RAM, and both are faster than accessing from the drive itself. Cache can also be used as a buffer during I/O intensive activities to prevent drops in reading the data from the drive.

Oh okay. I know what caches are used for, but not in an SSD. A buffer for I/O tasks makes sense.
 
I know third party SSDs like samsung have 512MB or 1GB "caches" as does Apple's retina Macs (I just saw a forum post about it), but what purpose does the cache serve?

Forgive the ignorance, I'm trying to learn more about computer hardware.

Short answer is that writing data to a SSD can sometimes take longer to store permanently than the engineer would like. A cache is used in a similar way as a HD cache, to temporarily store some data so the OS can get on with its job while the drive permanently stores the data. Just about all SSDs have some kind of cache.

You need to spend a few weeks, perhaps in a library, studying SSD technology to fully understand how they work, the clever strategies to make them fast, and the side effects.
 
The buffer function for the Cache is actually not why SSDs have such big caches. Even the chip often has enough cache to buffer write operations.

The most important thing SSDs store in their cache is basically a b-tree that translates LBA (Operating System addresses) to whichever internal physical address the SSD stores a specific LBA and also to keep track of which LBAs are empty, deleted or fill with valid data.
This is the main reason a bigger SSD needs a bigger buffer. I once read you need about 512MB for 512GB and 1GB for the 1TB SSDs to store the tree for all the LBAs.

The cache is just a necessary part that keeps an SSD operational. It says nothing about performance and just needs to be big enough for the SSD capacity. If you look at SSDs of the same company they usually have 256MB cache for 240-256GB SSDs and 512MB for 512GB and so on.
Some small amount of the cache is probably used as an IO buffer but that part is really not the essential function here and depends on how the controller chip handles queing.

In theory the SSD would work without the cache but since most SSDs need to translate the address each time something is written or read it would be really slow if they had to gather the information stored on slow nand. Some really old SSDs did that and had atrocious random r/w performance (before SSDs got popular).
Sandforce use some different way to map address and don't need the big cache. No idea how exactly they do it but I guess the controller calculates the right address and doesn't randomize it like the others. They only have a small cache on chip for buffer operations.
 
Technically correct... but why do SSDs go to all this trouble and complexity in the first place... because writing to non-zero memory is slow. As we all know, except for those starting out to understand SSDs, currently writes are basically a two step process (first erase then write) but technology only allows erase on a relatively large memory block basis.... which leads to a wide variety of vendor specific and clever techniques that optimize performance... For some techniques, some vendors find a cache is useful.... not sure if Sandisk still depends on large amounts of cache.
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.