Why do SSDs have weird sizes?

82

15

Why do SSDs have sizes like 240 GB or 120 GB rather than the normal 256 GB or 512 GB? Those numbers make much more sense than 240 or 120.

Dudemanword

Posted 2014-04-28T19:52:23.733

Reputation: 913

45Why do those numbers make more sense? – Matthew Williams – 2014-04-28T20:00:30.157

8@MatthewWilliams I would think because they are fractional divisions of the larger storage measurement. 256 GB is 1/4 of a terabyte, 512 GB is 1/2, and so on. – Moses – 2014-04-28T20:13:51.630

44@MatthewWilliams I said that because of base 2 arithmetic: 2^8 = 256, 2^9 = 512, so on and so forth – Dudemanword – 2014-04-28T20:33:09.730

1@Moses | You can also buy 80GB units and a host of other sizes. Why pick on these numbers specifically? – Matthew Williams – 2014-04-28T20:34:39.460

180 is also a weird number. Anything that isn't radix 2 doesn't make sense from a non marketing standpoint – Dudemanword – 2014-04-28T20:40:37.220

What is really weird is that non-SSD drives have been non-standard sizes since forever. What is advertised as an 80GB drive might vary from exactly 80GB by many megabytes. Anyone who runs RAID arrays knows this. – Zan Lynx – 2014-04-28T20:43:32.407

@Dudemanword | I understand your premise using a power system as it applies to memory (http://bit.ly/1h7HkV8), but since HDDs have a host of sizes you can see why I make my original comment.

– Matthew Williams – 2014-04-28T20:45:11.427

@ZanLynx | This is true. For a host of reasons. Although the answer below covers some of this it fails to actually address the question of why changes have occurred. – Matthew Williams – 2014-04-28T20:46:40.463

@MatthewWilliams That would make a good question actually! Maybe I should integrate it into this question. – Dudemanword – 2014-04-28T20:55:26.923

17Expecting drives to be sized in a power of 2 is silly since drives have basically never been sized in powers of 2. A 1TB drive isn't 240 bytes, it is typically 1012 bytes. – Zoredache – 2014-04-28T21:06:02.850

7@Zoredache This makes sense for HDDs, but we are talking about SSDs. Its storage is basically transistors that can hold only 2 states. So, in my mind SSDs should always be radix 2. The answers helped clarify the ambiguity though – Dudemanword – 2014-04-29T01:58:02.717

Disk drives are, and have been for decades, sold in units of 10^9 bytes (GB). OSes like to size in 2^30 bytes (GiB). Get used to the new nomenclature. Own it. Love it. http://en.wikipedia.org/wiki/Binary_prefix

– Scott Leadley – 2014-04-29T13:17:38.473

4@Dudemanword The engineering and manufacturing processes involved in creating NAND flash chips have no respect for radix 2. We impose the binary units of sizing from the software side because it makes our life easier. The manufacturers humor us because we spend money. – Scott Leadley – 2014-04-29T13:24:00.563

3Transistors are grouped into gates and implement binary logic because it's very useful. How many transistors you can fit on a die has all sorts of physical and engineering constraints that are not related to radix 2. – Scott Leadley – 2014-04-29T19:57:32.810

You are correct, deleted that comment for being wrong – Dudemanword – 2014-04-29T20:02:34.870

"Disk drives are, and have been for decades, sold in units of 10^9 bytes (GB)." Not very many decades. Two decades ago, a 1 GB drive was a big deal. http://winsupersite.com/article/commentary/blast-buying-computer-1995-141723

– David Conrad – 2014-04-29T20:23:07.573

Is this question specifically about SSDs? It seems the "weird"-ness is just as relevant to HDDs. – None – 2014-04-30T00:05:17.860

2The physics (or engineering issues) of how much data you can squeeze onto a given platter have nothing to do with radix 2. In chips, makikng them in radix 2 related sizes makes sense due to how memory is addressed. The number of values a bit can hold has essentially nothing to do with it. The reasons would likely be the same if a memory unit could hold more values. Imagine quantum computing, which may have 3 values, but that would not force addressing to be in powers of 3. – WarrenT – 2014-04-30T17:05:10.377

@MatthewWilliams, Why do those numbers make more sense?, good point. It is like comment to the question What are the legitimate uses of the touch command - What are the illegitimate uses?

– VL-80 – 2014-05-01T19:11:33.100

Answers

101

While a lot of modern SSDs like the 840 EVO series do provide the sizes you’re used to like, the mentioned 256GB, manufacturers used to preserve a bit of storage for mechanisms fighting performance drops and defects.

If you—for example—bought a 120GB drive, you can be pretty sure that it’s really 128GB internally. The preserved space simply gives the controller/firmware room for stuff like TRIM, Garbage Collection and Wear Leveling. It has been common practice to leave a bit of space unpartioned—on top of the space that has already been made invisible by the controller—when SSDs first hit the market, but the algorithms have gotten significantly better, so you shouldn’t need to do that anymore.

EDIT: There have been some comments regarding the fact that this phenomenon has to be explained with the discrepancy between advertised space, stated in GigaBytes (e.g. 128x 10^9 Bytes) versus the GibiByte value the operating system shows, which is—most of the time—a power of two, calculating to 119.2 Gibibyte in this example.

As for as I know, this is something that comes on top of the things already explained above. While I certainly can’t state which exact algorithms need most of that extra space, the calculation stays the same. The manufacturer assembles an SSD that indeed uses a power of two number of flash cells (or a combination of such), though the controller does not make all that space visible to the operating system. The space that’s left is advertised as Gigabytes, netting you 111 Gibibyte in this example.

Patrick R.

Posted 2014-04-28T19:52:23.733

Reputation: 1 221

@ZanLynx: Also for SSDs using tri-level cells, presumably the native size is a multiple of three even before (over-)provisioning. – Nemo – 2015-11-18T22:07:33.863

2Except that some SSDs now use TLC (tri-level) states and actually need MORE reserved space than previous drives because of the higher error rates. The Magician software for my Samsung EVO drive recommended reserving more space when I did the setup. So instead of a terabyte its only 920 GB. – Zan Lynx – 2014-04-28T20:41:33.853

While you discuss the discrepancy in advertised to actual space (applies to both SSD and HDD) you don't actually address the question of why there appears to be a shift in the standard size model with SSD from their HDD counterparts as outlined in the question. – Matthew Williams – 2014-04-28T20:51:58.060

2Do you mean the Gibibyte vs. Gigabyte discrepancy? I understood the question differently, as this discrepancy comes on top of the 120 vs. 128GB phenomenon. Buying a SSD with 120GB advertised size will net you even less usable space displayed in the OS. – Patrick R. – 2014-04-28T20:59:25.823

@PatrickR. | I understand the phenomenon you refer to, but this is down to drives being advertised against a whole number byte rather than, for example, 1024 Mbytes to the Gigabyte and so forth. So we lose a % against the advertised depending on the size of the drive. Can you confirm this practice has stopped with the advent of SSDs? – Matthew Williams – 2014-04-28T21:17:39.937

4@Matthew Well, that was what I was trying to say - I can confirm this has not stopped. My 512G Samsung 840 nets me only a bit more than 465G usable space. Sorry for the confusion.

So, to sum this up, a SSD advertised as 120GB might physically have 128.000.000.000 Byte, 120.000.000.000 as space usable for partitions - leading to ~110 displayed by the OS. – Patrick R. – 2014-04-28T21:22:35.440

27The technical term is overprovisioning. – Ben Voigt – 2014-04-28T21:53:41.657

That last part: "but the algorithms have gotten significantly better, so you shouldn't need to do that anymore" Does that mean that the extra space is no longer needed? The entire drive may be partitioned? – Dudemanword – 2014-04-28T21:55:31.687

"manufacturers used to preserve a bit of storage" - 8 GB in a 128 GB drive, and 16 GB on a 256 GB drive is not "a bit" and certainly too much space for "mechanisms fighting performance drops and defects". I don't know where you're going with this but your answer appears grossly misinformed. The actual answer is the marketing gimmick conveniently designed to do false advertising (with the fine-print "1 GB = 1 billion bytes" for legal disclosure). – ADTC – 2014-04-29T04:57:41.180

1@ADTC Why should 8GB out of 128GB be too much? Especially multi-level cells tend to live not as long as you want them to. Since manufacturers do not want you to return your SSD within warranty time, it definitely does make sense to reserve that much space.

The false advertising has also been discussed before, this is something that comes on top. You buy 120GB advertised, you get 128x10^9 Byte, netting you ~110 Gibibyte displayed in the OS. – Patrick R. – 2014-04-29T09:40:33.477

1@ADTC There are a lot of things that need extra nand area but are not usable space. There is the out of bound area on the nand for consistency checking (holds hashes of the blocks). There are unused blocks to be replaced by the bad block recovery system. There may even be redundant nand chips in case of an internal failure to ensure data is not lost. Once, as said above the user needed to reserve some space for these purposes, now however the firmware just hides it completely from the OS. – Vality – 2014-04-29T10:07:28.083

`but the algorithms have gotten significantly better, so you shouldn't need to do that anymore.' - wait, I either missed some really significant advance in algorithms (and not sure how that would actually work) or this is wrong. I mean how exactly are you going to do wear leveling on a 99% full drive? – Voo – 2014-04-29T12:00:58.987

1@ADTC SSDs generally reserve between 7% and ~20% (enterprise drives) of their internal data size for wear leveling, etc., so no idea where you get the idea that that's "certainly too much space for those" considering you can very easily measure the performance and longevity benefits of having more free space. Yes the 7% free space drives just use the conversion from GiB -> GB to do so, but the others have extra chips on board. For a good primer on the whole topic search for the AnandTech articles. – Voo – 2014-04-29T12:01:59.620

@Voo: When SSDs hit the market, it was very advisable to leave some space free on top of the space that has already been made invisible by the vendor. I'll edit the answer once again since I really didn't frame that well. – Patrick R. – 2014-04-29T12:11:50.213

1

@Patrick Ah ok. Although the same is still true today. See eg here for some pretty new drives and the effects that a larger free space has on performance. The very first drives with horrible controllers (e.g. the pre-intel time pretty much) may also had to worry about running out of write cells though, so that hasn't been a worry for a long time now (may come back though)

– Voo – 2014-04-29T12:17:20.017

23

Both mechanical and solid state hard drives have raw capacity greater than their rated capacity. The "extra" capacity is held aside to replace bad sectors, so the drives don't have to be perfect off the assembly line, and so that bad sectors can be re-mapped later during use to the spare sectors. During initial testing at the factory, any bad sectors are mapped to the spare sectors. As the drive is used, it monitors the sectors (using error correction routines to detect bit level errors) and when a sector starts going bad, it copies the sector to a spare, then remaps it. Whenever that sector is requested, the drive goes to the new sector, rather than the original sector.

On mechanical drives, they can add arbitrary amounts of spare storage since they control the servo, head, and platter encoding, so they can have a rated storage of 1 terabyte with an additional 1 gigabyte of spare space for sector remapping.

However, SSDs use flash memory, which is always manufactured in powers of two. The silicon required to decode an address is the same for an 8 bit address accessing 200 bytes as an 8 bit address accessing 256 bytes. Since that part of the silicon doesn't change in size, then the most efficient use of the silicon realestate is to use powers of two in the actual flash capacity.

So the drive manufacturers are stuck with a total raw capacity in powers of 2, but they still need to set aside a portion of the raw capacity for sector remapping. This leads to 256GB of raw capacity providing only 240GB of usable capacity, for instance.

Adam Davis

Posted 2014-04-28T19:52:23.733

Reputation: 4 327

6

Simply put, all SSDs are, at base, not what they advertise. What they advertise is the "usable" disk space. For most drives with 120 "usable" GB of storage, the base drive actually is a 128 GB drive. 8 GB is reserved for some specific background management tasks, as stated before.

Now, technically they could slap another chip on the piece to give you 128 GB of "usable" space, but that costs more money. The companies making drives have realized that people care more about how big their drive is than whether its usable space is actually a multiple of 2.

Sidenote - there are actually a few ways of writing the required system code, which is why you'll see 120, 124, and 128 GB drives from different manufacturers. They all have 128 GB of "raw" space, but they handle the required background stuff differently. No version of the drive coding is so much better than the others that you'd notice it in most cases. You might notice a slight difference in performance benchmarks, but you're very unlikely to notice it unless your computer is doing some heavy lifting and you know what to look for.

user319078

Posted 2014-04-28T19:52:23.733

Reputation: 161

5not multiple of 2, but power of 2. – Keltari – 2014-04-29T19:49:50.717

2

Growing by powers of two is a strictly mathematical concept that makes it easy to take math shortcuts in a computer that's based on two states. That is to say that a computer can perform integer multiplication or division by a factor of two as easily as you can multiply or divide a number by 10. You simply shift the digits left or right without having to actually perform a calculation.

Every programming language has an operators for these simple operations, in C-like languages, they are n >> m aka shift n right m bits aka divide n by 2^m, and n << m aka shift left aka multiply n by 2^m. Inside the processor this operation generally takes one cycle and happens to the data in-place. Any other arithmetic operation, like multiplying by 3 requires invoking an ALU [Arithmetic Logic Unit] to spend an extra cycle or two marshalling the bits around and copying the result back to a certain register. Heaven help you if you need decimal point precision and the FPU [Floating Point Unit] gets involved.

Anyhow, this is why your computer likes to refer to everything internally as powers of two. If the machine had to go to an ALU operation every time it wanted to do some simple math to calculate a memory pointer offset you computer would be running an order of magnitude slower.

The growth of physical storage, on the other hand, is governed less by raw binary math than it is by physics, engineering, and *chokes on the word* marketing. With a spindle disk the capacity is determined by: the number of platters, the size of the platters, the size of the "cylinders", and the number of sectors that can fit into a cylinder. These are generally determined more by the physical capabilities of the hardware and the precision of the read/write heads than anything else.

I'm not as intimately familiar with the internal characteristics of SSDs, but I imagine that the scaling is based on: we can build an array of N x M NAND sectors, layer them K deep in a chip, and fit J chips them into a 2.5" HDD case. Reserve H% of them for performance optimization, round the number down to the closest multiple of 5/10/20, and that's the capacity of the drive we're going to print on the box.

Having any of those calculations work out to a neat little power of two will be a complete fluke and of little benefit to anyone.

Sammitch

Posted 2014-04-28T19:52:23.733

Reputation: 1 039

I would like to note that those shift operator's ease of use also depend on the padding behavior(0-pad or 1-pad) of the architecture you are targeting. Admittedly, this is not a problem with today's higher level languages – Dudemanword – 2014-05-01T21:43:16.930

From what I hear a good compiler will even go ahead and replace errant math operations like var = var / 256 with var >> 8 for you these days. – Sammitch – 2014-05-01T21:54:51.483

2Memory chips are always sized as powers of two, so that the number of valid addresses is exactly limited by the number of address signals. That obviates the need for a "chip selected by address out of range" error signal, and also makes size detection much easier. The overall drive might not be a power of 2 if the number of memory chips isn't (Early Intel SSDs used 10 channels each with 128Gb, for a total of 160GB, for a slight advantage over competitors' 128GB models) – Ben Voigt – 2014-05-01T22:55:17.570

-8

In older SSDs the capacity was in multiples of 8 because there are 8 "bits" (0/1) in a "byte". Just like with flash drives, this was at a time people did not see the benefit to an SSD, and every "bit" helped.

Now that consumers are more aware of SSD technology and also with the advances in the technology, the SSD manufactures are taking them back to the more familiar numbers by a combination "estimating" size, just as the HDD market did, and combining different size chips to get an even 10 number, (e.g. 6GB+4GB=10GB)

Charles Keisler

Posted 2014-04-28T19:52:23.733

Reputation: 1

Might you perhaps be confusing bits and bytes? – James McLeod – 2014-05-01T01:44:01.257