Where did the gigabytes I bought go?

When choosing a new computer or mobile device, we come across a large list of technical product specifications, model information and clock of processor, amount of memory, etc. which may not mean much to a lot of people. But a feature that we always check the storage capacity, to make sure that it will be sufficient to store the files we currently have and those we intend to have in the near future.

IPhones Capabilities

After starting to use their new device, however, many people eventually realize that the space available for storing personal files such as photos, music, videos, and documents called “user files” is less than the nominal storage space on the data sheet. specifications. But why this happen?

Capacity chart on smartphonesInfographic we originally published in January 2014.

(There are at troll filing suit on this)

This difference exists for several factors.

The first of these is that a storage device is either magnetic disks (HDDs) or flash memory chips (SSDs) must first receive a system with one or more partitions, and they must be given a structure where files can be stored. They are necessary for the operating system to be able to locate the files and obviously take up a small amount of space, so that the space available to a partition is always slightly smaller than the total capacity of the drive.

OS X Disk Utility

The second factor is that computers (and mobile devices) come with a pre-installed operating system to work, and it is made up of several files. These system files need to be stored and take up part of the available space on the partition.

OS X System Folder

But there is no use for a computer s with operating system, right? Computers and mobile devices come with a number of pre-installed applications, and we often install many others that, like the OS, consist of one or more files, which take up more of the space.

OS X Applications Folder

And after discounting the space occupied by storage systems, the operating system, and applications we finally have some space available for user files. This varies from device to device, depends on the total storage capacity, operating system, and the space it occupies can change from version to version and installed applications.

But two other common sources of difference between the nominal capacity of storage devices and the capacity available to the user remain to be considered.

Many computers today use NAND flash-based solid state drives (SSD) as storage, because access to them is much faster and is much more reliable than hard disk drives (HDD). This is the case with all of Apple's current line notebooks (MacBook, MacBook Air and MacBook Pro) and Mac Pro. iMacs and Macs mini can also be configured to come with SSD or Fusion Drive (which combines both technologies).

The space of the SSDs is divided into blocks, each occupying a small area on a chip made of silicon. Due to imperfections in silence, some of these blocks have a useful life far below average, which over time would cause decreased drive capacity and corruption of the files stored in these blocks. To avoid this, the SSDs come with part of the blocks set aside to replace the dying ones in the drive area.

Some manufacturers define the nominal capacity of the unit as the total capacity of the useful blocks, after the spare blocks have been discounted. 120GB SSDs, for example, actually have 128GiB = 137.44GB flash memory being 17.44GB (12.7%) reserved for replacement, while 240GB and 250GB SSDs generally have 256GiB flash with 12.7% and 9 % reserved, respectively. This is no problem, on the contrary, it is very good as it ensures long service life for SSDs. The problem is that some manufacturers, including Apple, sell SSDs at full capacity, without discounting the spare block capacity, which often confuses users, who will never see all 512GB of their SSD reported in the operating system.

MacBook Pro SSD with Retina DisplayThe MacBook Pro SSD sells as 512GB, but only has 500.28GB useful.

The MacBook Pro 512GB SSD in question actually has 512GiB (read on to understand this unit of measure), ie 549.76GB with 49.48GB being reserved blocks, 1.2GB being occupied by the file system, 9.79GB is occupied by the operating system and 58.98GB is occupied by currently installed applications, leaving only 430.31GB for user files.

That's all we need to know when using a Mac. Some operating systems, however, display the computer's storage capacity incorrectly, which often confuses the user. This issue affected OS X through version 10.5 Leopard and was fixed with the introduction of 10.6 Snow Leopard, but is present in all versions of Windows and even iOS.

Take for example an iPhone 6s 128GB. By checking its capacity in General Settings About, we will actually see 114GB:

IPhone's Adjustment Capability

And through iTunes on the Mac:

IPhone capacity through iTunes

Interestingly, even on OS X iTunes shows the wrong data probably because it pulls it straight from iOS and to avoid even more confusion about what the user sees on your iPhone.

Units of measure

O byte It is a unit of measure of very small amount of information, so it is very common to use prefixes like kilo, of symbol k, which is worth a thousand or 103, and express a value in kilobytesas we do with units of the International System of Units (SI) such as meter and kilometer, gram and kilogram, etc. Other prefixes multiply units by even larger values, such as mega (M), worth a corn or 106, jig (G) is worth 109, will have (T) is worth 1012, and so on.

The problem is that some operating systems, such as iOS and Windows, use other prefixes in base 2 instead of base 10. One kibibyte, of symbol KiB, worth 210 = 1,024 bytes. Other prefixes are the mebi (Mi) worth 220, comic book (Gi) is worth 230, tebi (Ti) is worth 240, etc. Below is a conversion table between values ​​expressed in decimal prefixes (base 10) defined by SI, and binary (base 2) defined by IEC (International Electrotechnical Commission).

1 Ki = 1.024k 1 k 0.9766 Ki
1 Mi 1.049 M 1 M 0.9537 Mi
1 Gi 1.074 G 1 G 0.9313 Gi
1 Ti 1,100 T 1 T 0.9095 Ti

That alone would be enough to confuse most users, who are used to the decimal system. The biggest problem is that, despite reporting storage capacities and file sizes using binary prefixes, these OSs use traditional decimal prefix symbols. The useful capacity of the iPhone in our example can be expressed as 122GB or 114GiB, but what we see in iOS 114GB is therefore false information.

Some operating systems use binary prefixes and appropriate symbols, such as Ubuntu, one of the most widely adopted Linux distributions on consumer desktop systems.

For those who want to delve further into the subject, I recommend this Wikipedia article and this Apple support article (its Portuguese version is very poorly translated).