Jump to content

What i hate about SSDs and HDDs

Go to solution Solved by MG2R,

Bottom line of this thread: advertisement on drives is correct, the number you see in Windows is correct, the unit you see in Windows is incorrect. This has been known for years and years, but should the software start mentioning GiB, MiB, etc... We would see numerous people flipping and asking what the hell those things are.

 

                                                                                                                                                                                         

 

EDIT: since this has been marked as best answer, I figure I should put the actual explanation for people who don't know enough with the first paragraph. Here goes...

 

Where lies the root of the discrepancy?

The problem with drive capacity numbers you see in different places arrives from the incorrect use of size units. In general,  following applies:

  • Drive manufacturers list drive capacity in kB, MB, GB, TB, ... These units are multiples of a B (byte). As is standard in metric, k stands for kilo (1,000), M stands for mega (1,000 k = 1,000,000), G stands for giga (1,000 M = 1,000,000 k = 1,000,000,000), and so on.
    The base multiplier is 1,000 (one thousand), which is a power of 10, which is the base of decimal counting.
  • Most computer software calculates capacities with a base multiplier of 1,024, which is a power of two, which is the base of binary counting.
    This means that one "kB" is actually 1,024 bytes. Obviously, one unit can't have two different definitions in a scientific field so the "kiB" (kibibyte) is born, together with its brothers Mi (mibi, 1,024 ki), Gi (gibi, 1,024 Mi), etc...
    The reason they do this is twofold:
    • it gives a more accurate representation of how much will actually fit on the drive, as hard drive sectors are always a power of two in size. And actual file sizes ON DISK will thus be a power of two (unless you have a file system with very intelligent padding and combining of small data blobs within one sector, but that's another talk altogether);
    • it's easier for a computer to calculate stuff with powers of two, because a computer is built upon binary logic and multiplying or dividing by powers of two is a matter of bit shifting, whereas multiplying or dividing by powers of 10 requires a whole lot of complex operations.
  • Windows lists drive capacities with a base multiplier of 1024 (so in kiB, MiB, GiB, TiB, etc...) but places the decimal units (kB, MB, GB, TB, etc...) behind the number.

But what does it all mean?

In the end it boils down to this:

  • Manufacturers are right: a 2TB drive can hold at least 2,000,000,000,000 bytes (two trillion bytes). And, in effect, it's actually more!
  • The number you see in Windows is right: a 2TB drive is 2,000,000,000,000 / (1,024 * 1,024 * 1,024 * 1,024) = 1.818989404 TiB = 1.82 TiB (tibibytes)
  • The UNIT listed in Windows is wrong. Windows calculates with binary units but displays the decimal units.

Why can't they just all do one standard unit thing?

For this, you have to look at history. Drive manufacturers in the good old days actually did the same thing as Windows is doing. Everyone listed capacities in "binary" (so base multiplier 1,024) but slapped the decimal unit behind it. Everyone and their dog knew that 1kB actually meant 1,024 bytes. RAM still does this, an 8 GB stick actually contains 8 GiB.

 

This was all fine and dandy until some clever marketeers came along and figured out that drive manufacturers could actually list the "decimal numbers" with the "decimal units" and get a bigger number on the box. So drive manufacturers started doing that, whilst the software always kept calculating the useful data.

 

So drive manufacturers are the enemy!

Well, that depends on your point of view:

  • On the one hand, they only started listing the correct number for the unit they were using.
  • On the other hand, if they changed anything, they should've just changed the unit they listed on the box to be actually correct (kiB, MiB, GiB, etc...)

I'm usually in for the "marketeers are a bunch of idiots" standpoint, but then again, they just came up with a clever way of making more with less. Plus, I'm glad they are at least using the correct number with the correct unit.

 

So, Windows is dumb?

Yes. Windows is dumb. It should list the correct unit.

 

Then again, imagine what happened if they all of a sudden started using the correct unit: tech forums all over the world would just explode with question about that weird i in their capacity listings.

 

On the other hand, most people probably just wouldn't care, if they even noticed it at all.

 

I'm still not sure how the whole thing works...

Well, uhm, I believe Linus made a video about it at some point. Can't seem to find it though.

 

TL;DR

Read first paragraph, way at the top, above the horizontal line.

 

                                                                                                                                                                                           

 

EDIT EDIT: I might as well address the RAM situation in a bit more detail...

 

Why doesn't RAM have this discrepancy?

As stated a bit earlier: RAM manufacturers still put the "binary number" on the box whilst listing the "decimal unit". One could argue their marketing team could do the same as the hard drive manufacturers did and make even more millions of billions of thousands of dollars $$$$! The difference is in the way both mediums operate and address the available space. Hold on to your panties!

 

RAM is binary

Ram uses digital chips which have a certain amount of addressable registers. Each register containing one (or possibly multiple) bytes. Since the address decoder on the DIMMs is binary, the number of addresses it can decode will always be a power of two. So it is practically impossible to end up with a DIMM size which is a power of a ten.

 

HDDs are analog-ish

HDDs store their data on physical platters (hence "hard DISK"). The data is organized in circular tracks around the center of the platter. Depending on the technology (materials) used, the size required to store one bit of data varies and thus, the amount of bits you can fit in one track will vary.

 

Now, the tracks on hard disks are split into sectors. These sectors are the smallest unit of data a drive will read or write. They consist of a header, a data section, and a footer, each with its own purpose:

  • Headers contain meta-data about the sector. This data is used in internal drive accounting.
  • Footers contain ECC data to protect the data in the sector from faults, or to know when data is faulty.
  • The data section is where data is actually stored. The size is always a power of two.

Because of the physical constraints it is not necessary that the actual amount of bits one can store on the disk is a power of two. The manufacturers make sure that the disk has enough room to fit at least the rated capacity in data sections, together with the necessary headers and footers.

 

There's also a portion of the drive that remains unused during normal operation. This is reserved for possible damaged sectors to be moved to. Damaged sectors occur during the life of every drive and are not a problem as long as there is still room to create a new sector which replaces it.

 

OK, all fine and dandy but what about SSDs?

Disclaimer: don't quote me on this chapter. I'm fairly sure this is quite accurate, but still...

 

Yes, it's true that SSDs have a very similar construction is very similar to RAM. They also store data in chips which have address decoders which can address a number of registers that is a power of two. This means that a 256 GB SSD will actually have room for at least 256 GiB!

 

The thing with SSDs is that they perform very complicated garbage collection and wear leveling algorithms. The more space they reserve for wear leveling, the longer the SSD will last. Thus, they reserve a portion of the flash chips for internal accounting and other mumbo-jumbo.

 

Even more TL;DR

See the other TL;DR.

 

                                                                                                                                                                                         

EDIT EDIT EDIT: and while we're at it: file systems! :)

 

But wait! There's more! (This thing called formatting)

The attentive reader might notice there still is a discrepancy between the actual usable number of bytes and the number of bytes that should be available even if you take all of the above into account. That's because we didn't talk about formatting.

 

Formatting?

Yes, formatting. All of the above is talking about the physical block device. Now, to keep things manageable, operating systems use file systems (stuff like FAT, NTFS, ext2/3/4, etc...) to organize files on the block device. These file systems are created by "formatting a drive". You do it when you install Windows, and Windows will ask to format brand new USB thumb drives if they come unformatted out of the factory.

 

File systems use all sorts of data structures to contain both the data you want to store and the accounting data about that data (called meta-data). Because of this, the actual usable formatted space will be less yet again. How much less depends on the file system used, and the settings used when creating the file system. The bigger the file system, the bigger the discrepancy... Usually.

 

While we are at it: size on disk vs actual size

The even more attentive reader might also have noticed that Windows lists both the "size" and the "size on disk", and might wonder what the hell is up with that. Simple...

 

Sectors

As stated before: disks will always read and write at least one full sector of data. Say you have a plain text file containing "hello world", stored in regular plain old ASCII (1 byte per character). The resulting file would be 11 bytes long. Since you always write at least one sector, that file would consume one sector and does have a minimum "size on disk" of one sector, usually 512 B or 4 kiB.

 

File systems

File systems also come into play here. File systems will separate your data in blocks of a specific size. Often, these blocks will actually be bigger than the physical sectors, in order to improve throughput and decrease processing overhead. A fine example would be a 2 kiB block size on a drive with 512 B sectors. This would mean that said 11 B file would take up 2 kiB on disk! That's nuts!

 

File system developers realize that's nuts and have invented clever ways of getting around this issue. The most popular these days is stuffing the files inside the meta-data structures, if the files are small enough.

 

Oh wait, I forgot about partitioning!

Clever readers might know that before you format a drive, you usually divide it up in partitions. These are separated spaces on your device in order to keep certain types of data away from each other. Creating partitions also costs you some overhead space in accounting- and meta-data.

 

Same goes for the ever more popular logical volumes that are created by things like LVM, or clever data redundancy stuff like RAID.

 

So I'm wasting precious space all the time?!?!

Yes. You are! Fortunately, the overhead data involved in partitoning and similar stuff is pretty much negligible. File systems are pretty optimized these days as well. All of these things also provide too many benefits to simply discard them.

 

One last thing

There's also space lost in data formats. For example, storing "hello world" in a Word document will result in a file way bigger than 11 bytes. This is because a .docx format has a lot of meta-data about things like colours, fonts, paper sizes, etc... This is so diverse and format specific, though, that I won't go into it any further.

 

Dude, stop typing already, you are TL;DR times three already!

Sowie :(

The one thing i hate about storage is that My Seagate Barracuda is 1TB but i can only use 931GB of it, and with my WD 2TB i can only use 1.81TB thats a total loss of 88GB of storage i could have used for games, It makes me feel ripped off that company's do this, if its a 1TB drive, make it a 1TB drive and not 931GB *Shakes fist at all the company's who make storage devices*

 

They need to start advertising their products correctly

"Life's too Short, Use Express Install" Express install subject to spying
                                        -Microsoft 2015

Link to comment
Share on other sites

Link to post
Share on other sites

Well, that's because the manufacturers size their drives off of: 1000B = 1KB, whereas windows and pretty much nay other OS sees it as 1024B = 1KB.

Specs: CPU - Intel i7 8700K @ 5GHz | GPU - Gigabyte GTX 970 G1 Gaming | Motherboard - ASUS Strix Z370-G WIFI AC | RAM - XPG Gammix DDR4-3000MHz 32GB (2x16GB) | Main Drive - Samsung 850 Evo 500GB M.2 | Other Drives - 7TB/3 Drives | CPU Cooler - Corsair H100i Pro | Case - Fractal Design Define C Mini TG | Power Supply - EVGA G3 850W

Link to comment
Share on other sites

Link to post
Share on other sites

The one thing i hate about storage is that My Seagate Barracuda is 1TB but i can only use 931GB of it, and with my WD 2TB i can only use 1.81TB thats a total loss of 88GB of storage i could have used for games, It makes me feel ripped off that company's do this, if its a 1TB drive, make it a 1TB drive and not 931GB *Shakes fist at all the company's who make storage devices*

 

They need to start advertising their products correctly

I think that is because of the difference between GB and GiB.

I believe it worked like: 1GB = 1000MB, but 1GiB = 1024MiB.

Together with some math, that would be the reason why those drives seems like they have less storage for you

"We're all in this together, might as well be friends" Tom, Toonami.

 

mini eLiXiVy: my open source 65% mechanical PCB, a build log, PCB anatomy and discussing open source licenses: https://linustechtips.com/topic/1366493-elixivy-a-65-mechanical-keyboard-build-log-pcb-anatomy-and-how-i-open-sourced-this-project/

 

mini_cardboard: a 4% keyboard build log and how keyboards workhttps://linustechtips.com/topic/1328547-mini_cardboard-a-4-keyboard-build-log-and-how-keyboards-work/

Link to comment
Share on other sites

Link to post
Share on other sites

1TB is 1TB in Windows, it's 931 because it's actually GiB....

1GiB=1.074GB

1000/1.074=931 (up to 1 decimal place)

That's why it's displayed 931GB in Windows..... It's actually 931GiB, not GB....

Where I hang out: The Garage - Car Enthusiast Club

My cars: 2006 Mazda RX-8 (MT) | 2014 Mazda 6 (AT) | 2009 Honda Jazz (AT)


PC Specs

Indonesia

CPU: i5-4690 | Motherboard: MSI B85-G43 | Memory: Corsair Vengeance 2x4GB | Power Supply: Corsair CX500 | Video Card: MSI GTX 970

Storage: Kingston V300 120GB & WD Blue 1TB | Network Card: ASUS PCE-AC56 | Peripherals: Microsoft Wired 600 & Logitech G29 + Shifter

 

Australia 

CPU: Ryzen 3 2200G | Motherboard: MSI - B450 Tomahawk | Memory: Mushkin - 8GB (1 x 8GB) | Storage: Mushkin 250GB & Western Digital - Caviar Blue 1TB
Video Card: GIGABYTE - RX 580 8GB | Case: Corsair - 100R ATX Mid Tower | Power Supply: Avolv 550W 80+ Gold

 

Link to comment
Share on other sites

Link to post
Share on other sites

Bought a 3TB hdd. Only 2794.52GB usable. 

 

Tell me about it  :unsure:, but that's the way computers work  ;)

i5 2400 | ASUS RTX 4090 TUF OC | Seasonic 1200W Prime Gold | WD Green 120gb | WD Blue 1tb | some ram | a random case

 

Link to comment
Share on other sites

Link to post
Share on other sites

1TB is 1TB in Windows, it's 931 because it's actually GiB....

1GiB=1.074GB

1000/1.074=931 (up to 1 decimal place)

That's why it's displayed 931GB in Windows.....

i want my 88GB 

"Life's too Short, Use Express Install" Express install subject to spying
                                        -Microsoft 2015

Link to comment
Share on other sites

Link to post
Share on other sites

We should get what we pay for

"Life's too Short, Use Express Install" Express install subject to spying
                                        -Microsoft 2015

Link to comment
Share on other sites

Link to post
Share on other sites

i want my 88GB 

Sorry, I meant 931GiB.

Where I hang out: The Garage - Car Enthusiast Club

My cars: 2006 Mazda RX-8 (MT) | 2014 Mazda 6 (AT) | 2009 Honda Jazz (AT)


PC Specs

Indonesia

CPU: i5-4690 | Motherboard: MSI B85-G43 | Memory: Corsair Vengeance 2x4GB | Power Supply: Corsair CX500 | Video Card: MSI GTX 970

Storage: Kingston V300 120GB & WD Blue 1TB | Network Card: ASUS PCE-AC56 | Peripherals: Microsoft Wired 600 & Logitech G29 + Shifter

 

Australia 

CPU: Ryzen 3 2200G | Motherboard: MSI - B450 Tomahawk | Memory: Mushkin - 8GB (1 x 8GB) | Storage: Mushkin 250GB & Western Digital - Caviar Blue 1TB
Video Card: GIGABYTE - RX 580 8GB | Case: Corsair - 100R ATX Mid Tower | Power Supply: Avolv 550W 80+ Gold

 

Link to comment
Share on other sites

Link to post
Share on other sites

You have 3TB of space and complaining about 88GB? It's not so bad tbh.

I would complain over 20GB, its almost a full game size

"Life's too Short, Use Express Install" Express install subject to spying
                                        -Microsoft 2015

Link to comment
Share on other sites

Link to post
Share on other sites

Hard drives will get to the point where a 60TB drive is only 58TB :\

"Life's too Short, Use Express Install" Express install subject to spying
                                        -Microsoft 2015

Link to comment
Share on other sites

Link to post
Share on other sites

We should get what we pay for

you get exactly what you pay for

 

if you're worried about the label then just take your 1TB drive, write 900GB on it and enjoy the 31 gigs that you get for free

Link to comment
Share on other sites

Link to post
Share on other sites

you get exactly what you pay for

 

if you're worried about the label then just take your 1TB drive, write 900GB on it and enjoy the 31 gigs that you get for free

but it will be a lie

"Life's too Short, Use Express Install" Express install subject to spying
                                        -Microsoft 2015

Link to comment
Share on other sites

Link to post
Share on other sites

We should get what we pay for

Well it's 1TB, it's just measured in GiB not GB.

GiB =/= GB

Where I hang out: The Garage - Car Enthusiast Club

My cars: 2006 Mazda RX-8 (MT) | 2014 Mazda 6 (AT) | 2009 Honda Jazz (AT)


PC Specs

Indonesia

CPU: i5-4690 | Motherboard: MSI B85-G43 | Memory: Corsair Vengeance 2x4GB | Power Supply: Corsair CX500 | Video Card: MSI GTX 970

Storage: Kingston V300 120GB & WD Blue 1TB | Network Card: ASUS PCE-AC56 | Peripherals: Microsoft Wired 600 & Logitech G29 + Shifter

 

Australia 

CPU: Ryzen 3 2200G | Motherboard: MSI - B450 Tomahawk | Memory: Mushkin - 8GB (1 x 8GB) | Storage: Mushkin 250GB & Western Digital - Caviar Blue 1TB
Video Card: GIGABYTE - RX 580 8GB | Case: Corsair - 100R ATX Mid Tower | Power Supply: Avolv 550W 80+ Gold

 

Link to comment
Share on other sites

Link to post
Share on other sites

You get exactly what you pay for. The disk has 1 TB=1000 GB. The manufacturer does everything 100% correct, nobody is being ripped off even a single byte.

 

Problem is Windows, while claiming to show GB, doesn't actually show GB (Gigabyte), but GiB (Gibibyte) instead - a slightly different unit, just wrongly labeled. So, instead of complaining about harddrive manufacturers, you should go and complain to Microsoft for making you see less space than you actually have.  ;)

[Main rig "ToXxXiC":]
CPU: Intel Core i7-4790K | MB: ASUS Maximus VII Formula | RAM: G.Skill TridentX 32GB 2400MHz (DDR-3) | GPU: EVGA GTX980 Hydro Copper | Storage: Samsung 850 Pro 256GB SSD + Samsung 850 EVO 1TB SSD (+NAS) | Sound: OnBoard | PSU: XFX Black Edition Pro 1050W 80+ Gold | Case: Cooler Master Cosmos II | Cooling: Full Custom Watercooling Loop (CPU+GPU+MB) | OS: Windows 7 Professional (64-Bit)

Link to comment
Share on other sites

Link to post
Share on other sites

They need to start advertising their products correctly

They are. It IS a 2TB or 2000GB drive. But Windows doesn't read in Gigabytes, it reads in Gibibytes. 

 

2000 gigabytes is 1861 gibibytes.

 

It's Windows that is reporting "wrong".

Link to comment
Share on other sites

Link to post
Share on other sites

They are. It IS a 2TB or 2000GB drive. But Windows doesn't read in Gigabytes, it reads in Gibibytes. 

 

2000 gigabytes is 1861 gibibytes.

 

It's Windows that is reporting "wrong".

and restricting me from using it all

"Life's too Short, Use Express Install" Express install subject to spying
                                        -Microsoft 2015

Link to comment
Share on other sites

Link to post
Share on other sites

and restricting me from using it all

No... It's like buying your fuel in liters and then complaining that your cars miles per gallon figure didn't work out in liters.

The drive is sold to you in Gigabytes, but Windows reports it in Gibibytes. If you'd prefer, the companies could sell it to you as 931GiB if you like, but the price per GiB or GB would be exactly the same, so you're not getting screwed out of capacity.

Link to comment
Share on other sites

Link to post
Share on other sites

and restricting me from using it all

 

You can still use it all. There is no restrictions at all. You are not losing any drive space.  You have 2TB to use, or 1.8TiB.  It's the exact same amount, they are just different units of measurement. 

Link to comment
Share on other sites

Link to post
Share on other sites

No... It's like buying your fuel in liters and then complaining that your cars miles per gallon figure didn't work out in liters.

The drive is sold to you in Gigabytes, but Windows reports it in Gibibytes.

I'm in Australia, we use the Metric system, so i use Liters

"Life's too Short, Use Express Install" Express install subject to spying
                                        -Microsoft 2015

Link to comment
Share on other sites

Link to post
Share on other sites

and restricting me from using it all

No, no, you can fill 2000GB of files there.

Where I hang out: The Garage - Car Enthusiast Club

My cars: 2006 Mazda RX-8 (MT) | 2014 Mazda 6 (AT) | 2009 Honda Jazz (AT)


PC Specs

Indonesia

CPU: i5-4690 | Motherboard: MSI B85-G43 | Memory: Corsair Vengeance 2x4GB | Power Supply: Corsair CX500 | Video Card: MSI GTX 970

Storage: Kingston V300 120GB & WD Blue 1TB | Network Card: ASUS PCE-AC56 | Peripherals: Microsoft Wired 600 & Logitech G29 + Shifter

 

Australia 

CPU: Ryzen 3 2200G | Motherboard: MSI - B450 Tomahawk | Memory: Mushkin - 8GB (1 x 8GB) | Storage: Mushkin 250GB & Western Digital - Caviar Blue 1TB
Video Card: GIGABYTE - RX 580 8GB | Case: Corsair - 100R ATX Mid Tower | Power Supply: Avolv 550W 80+ Gold

 

Link to comment
Share on other sites

Link to post
Share on other sites

I'm in Australia, we use the Metric system, so i use Liters

I'm from the UK so we do too, but we still use miles per gallon when calculating efficiency. Liters and gallons are different, just as gigabytes and gibibytes are different. Your drive IS a 1000GB drive, it's just that Windows thinks in gibibytes.

Link to comment
Share on other sites

Link to post
Share on other sites

Yeah, when I have 16 TB (Four 4TB drives) in RAID, my capacity is 14.533 TB.

 

But as others have stated, its just a difference in units. Windows uses GiB instead of GB. You are using all of the drive space, but just in a different unit of measurement.

Link to comment
Share on other sites

Link to post
Share on other sites

Bottom line of this thread: advertisement on drives is correct, the number you see in Windows is correct, the unit you see in Windows is incorrect. This has been known for years and years, but should the software start mentioning GiB, MiB, etc... We would see numerous people flipping and asking what the hell those things are.

 

                                                                                                                                                                                         

 

EDIT: since this has been marked as best answer, I figure I should put the actual explanation for people who don't know enough with the first paragraph. Here goes...

 

Where lies the root of the discrepancy?

The problem with drive capacity numbers you see in different places arrives from the incorrect use of size units. In general,  following applies:

  • Drive manufacturers list drive capacity in kB, MB, GB, TB, ... These units are multiples of a B (byte). As is standard in metric, k stands for kilo (1,000), M stands for mega (1,000 k = 1,000,000), G stands for giga (1,000 M = 1,000,000 k = 1,000,000,000), and so on.
    The base multiplier is 1,000 (one thousand), which is a power of 10, which is the base of decimal counting.
  • Most computer software calculates capacities with a base multiplier of 1,024, which is a power of two, which is the base of binary counting.
    This means that one "kB" is actually 1,024 bytes. Obviously, one unit can't have two different definitions in a scientific field so the "kiB" (kibibyte) is born, together with its brothers Mi (mibi, 1,024 ki), Gi (gibi, 1,024 Mi), etc...
    The reason they do this is twofold:
    • it gives a more accurate representation of how much will actually fit on the drive, as hard drive sectors are always a power of two in size. And actual file sizes ON DISK will thus be a power of two (unless you have a file system with very intelligent padding and combining of small data blobs within one sector, but that's another talk altogether);
    • it's easier for a computer to calculate stuff with powers of two, because a computer is built upon binary logic and multiplying or dividing by powers of two is a matter of bit shifting, whereas multiplying or dividing by powers of 10 requires a whole lot of complex operations.
  • Windows lists drive capacities with a base multiplier of 1024 (so in kiB, MiB, GiB, TiB, etc...) but places the decimal units (kB, MB, GB, TB, etc...) behind the number.

But what does it all mean?

In the end it boils down to this:

  • Manufacturers are right: a 2TB drive can hold at least 2,000,000,000,000 bytes (two trillion bytes). And, in effect, it's actually more!
  • The number you see in Windows is right: a 2TB drive is 2,000,000,000,000 / (1,024 * 1,024 * 1,024 * 1,024) = 1.818989404 TiB = 1.82 TiB (tibibytes)
  • The UNIT listed in Windows is wrong. Windows calculates with binary units but displays the decimal units.

Why can't they just all do one standard unit thing?

For this, you have to look at history. Drive manufacturers in the good old days actually did the same thing as Windows is doing. Everyone listed capacities in "binary" (so base multiplier 1,024) but slapped the decimal unit behind it. Everyone and their dog knew that 1kB actually meant 1,024 bytes. RAM still does this, an 8 GB stick actually contains 8 GiB.

 

This was all fine and dandy until some clever marketeers came along and figured out that drive manufacturers could actually list the "decimal numbers" with the "decimal units" and get a bigger number on the box. So drive manufacturers started doing that, whilst the software always kept calculating the useful data.

 

So drive manufacturers are the enemy!

Well, that depends on your point of view:

  • On the one hand, they only started listing the correct number for the unit they were using.
  • On the other hand, if they changed anything, they should've just changed the unit they listed on the box to be actually correct (kiB, MiB, GiB, etc...)

I'm usually in for the "marketeers are a bunch of idiots" standpoint, but then again, they just came up with a clever way of making more with less. Plus, I'm glad they are at least using the correct number with the correct unit.

 

So, Windows is dumb?

Yes. Windows is dumb. It should list the correct unit.

 

Then again, imagine what happened if they all of a sudden started using the correct unit: tech forums all over the world would just explode with question about that weird i in their capacity listings.

 

On the other hand, most people probably just wouldn't care, if they even noticed it at all.

 

I'm still not sure how the whole thing works...

Well, uhm, I believe Linus made a video about it at some point. Can't seem to find it though.

 

TL;DR

Read first paragraph, way at the top, above the horizontal line.

 

                                                                                                                                                                                           

 

EDIT EDIT: I might as well address the RAM situation in a bit more detail...

 

Why doesn't RAM have this discrepancy?

As stated a bit earlier: RAM manufacturers still put the "binary number" on the box whilst listing the "decimal unit". One could argue their marketing team could do the same as the hard drive manufacturers did and make even more millions of billions of thousands of dollars $$$$! The difference is in the way both mediums operate and address the available space. Hold on to your panties!

 

RAM is binary

Ram uses digital chips which have a certain amount of addressable registers. Each register containing one (or possibly multiple) bytes. Since the address decoder on the DIMMs is binary, the number of addresses it can decode will always be a power of two. So it is practically impossible to end up with a DIMM size which is a power of a ten.

 

HDDs are analog-ish

HDDs store their data on physical platters (hence "hard DISK"). The data is organized in circular tracks around the center of the platter. Depending on the technology (materials) used, the size required to store one bit of data varies and thus, the amount of bits you can fit in one track will vary.

 

Now, the tracks on hard disks are split into sectors. These sectors are the smallest unit of data a drive will read or write. They consist of a header, a data section, and a footer, each with its own purpose:

  • Headers contain meta-data about the sector. This data is used in internal drive accounting.
  • Footers contain ECC data to protect the data in the sector from faults, or to know when data is faulty.
  • The data section is where data is actually stored. The size is always a power of two.

Because of the physical constraints it is not necessary that the actual amount of bits one can store on the disk is a power of two. The manufacturers make sure that the disk has enough room to fit at least the rated capacity in data sections, together with the necessary headers and footers.

 

There's also a portion of the drive that remains unused during normal operation. This is reserved for possible damaged sectors to be moved to. Damaged sectors occur during the life of every drive and are not a problem as long as there is still room to create a new sector which replaces it.

 

OK, all fine and dandy but what about SSDs?

Disclaimer: don't quote me on this chapter. I'm fairly sure this is quite accurate, but still...

 

Yes, it's true that SSDs have a very similar construction is very similar to RAM. They also store data in chips which have address decoders which can address a number of registers that is a power of two. This means that a 256 GB SSD will actually have room for at least 256 GiB!

 

The thing with SSDs is that they perform very complicated garbage collection and wear leveling algorithms. The more space they reserve for wear leveling, the longer the SSD will last. Thus, they reserve a portion of the flash chips for internal accounting and other mumbo-jumbo.

 

Even more TL;DR

See the other TL;DR.

 

                                                                                                                                                                                         

EDIT EDIT EDIT: and while we're at it: file systems! :)

 

But wait! There's more! (This thing called formatting)

The attentive reader might notice there still is a discrepancy between the actual usable number of bytes and the number of bytes that should be available even if you take all of the above into account. That's because we didn't talk about formatting.

 

Formatting?

Yes, formatting. All of the above is talking about the physical block device. Now, to keep things manageable, operating systems use file systems (stuff like FAT, NTFS, ext2/3/4, etc...) to organize files on the block device. These file systems are created by "formatting a drive". You do it when you install Windows, and Windows will ask to format brand new USB thumb drives if they come unformatted out of the factory.

 

File systems use all sorts of data structures to contain both the data you want to store and the accounting data about that data (called meta-data). Because of this, the actual usable formatted space will be less yet again. How much less depends on the file system used, and the settings used when creating the file system. The bigger the file system, the bigger the discrepancy... Usually.

 

While we are at it: size on disk vs actual size

The even more attentive reader might also have noticed that Windows lists both the "size" and the "size on disk", and might wonder what the hell is up with that. Simple...

 

Sectors

As stated before: disks will always read and write at least one full sector of data. Say you have a plain text file containing "hello world", stored in regular plain old ASCII (1 byte per character). The resulting file would be 11 bytes long. Since you always write at least one sector, that file would consume one sector and does have a minimum "size on disk" of one sector, usually 512 B or 4 kiB.

 

File systems

File systems also come into play here. File systems will separate your data in blocks of a specific size. Often, these blocks will actually be bigger than the physical sectors, in order to improve throughput and decrease processing overhead. A fine example would be a 2 kiB block size on a drive with 512 B sectors. This would mean that said 11 B file would take up 2 kiB on disk! That's nuts!

 

File system developers realize that's nuts and have invented clever ways of getting around this issue. The most popular these days is stuffing the files inside the meta-data structures, if the files are small enough.

 

Oh wait, I forgot about partitioning!

Clever readers might know that before you format a drive, you usually divide it up in partitions. These are separated spaces on your device in order to keep certain types of data away from each other. Creating partitions also costs you some overhead space in accounting- and meta-data.

 

Same goes for the ever more popular logical volumes that are created by things like LVM, or clever data redundancy stuff like RAID.

 

So I'm wasting precious space all the time?!?!

Yes. You are! Fortunately, the overhead data involved in partitoning and similar stuff is pretty much negligible. File systems are pretty optimized these days as well. All of these things also provide too many benefits to simply discard them.

 

One last thing

There's also space lost in data formats. For example, storing "hello world" in a Word document will result in a file way bigger than 11 bytes. This is because a .docx format has a lot of meta-data about things like colours, fonts, paper sizes, etc... This is so diverse and format specific, though, that I won't go into it any further.

 

Dude, stop typing already, you are TL;DR times three already!

Sowie :(

Edited by MG2R
Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×