All about SSDs

Solid State Disks (SSDs) come in a variety of shapes and sizes and they work in a totally different way to a conventional hard disk. Whether you're replacing a failed SSD or upgrading from a hard disk, an understanding of these things will help you achieve a successful outcome.

Summary

This page is in two main sections: firstly we discuss the different shapes, sizes and types of SSD, and then we explain how they work and hence how they need to be treated differently from a hard disk.

But first let's get one thing straight: a Solid State Disk is no more solid than a hard disk, and it isn't even disk-shaped! (The only liquid state computer memory that has ever been invented was the mercury delay line, and those went out of fashion in the 1950's.) An SSD would be better called semiconductor, electrostatic, non-magneting or non-rotating memory, but we seem to be stuck with the name we've got.

Safety

Warning03.png
Always back up data before starting if you possibly can.

Shapes and Sizes

The commonest and perhaps the most familiar SSDs are direct replacements for hard drives, but modern ultra-thin laptops often use different sorts, and here it can start to get confusing.

2.5" SATA

These are identical in size and shape and in the type of connector to 2.5" hard drives, but they are lighter and usually only 7mm thick, whereas 2.5" hard drives can be up to 15mm for the higher capacities. Therefore you may need to add some kind of packing if upgrading a 2.5" hard drive to an SSD in order to retain it in its bay.

1.8" MicroSATA or μSATA

These are similar to 2.5" SATA drives but in a 1.8" form factor and with a smaller version of the SATA connector. They are sometimes used in smaller devices such as netbooks.

MiniSATA or mSATA

A size comparison of two SATA SSDs: mSATA (left) and M.2 SATA (right).

Considerably smaller still are mSATA SSDs, simply consisting of a small circuit board about the size of a business card. They have a gold plated edge connector fitting into a socket similar to a RAM socket, and two holes for fixing screws at the corners of the opposite edge.

The physical dimentions and connector are identical to a PCI Express Mini Card as used for older internal laptop WiFi adapters but the connections are different and so they are not interchangeable.

M.2

M.2 SSDs are slightly narrower than mSATA at (usually) 22mm, and coming in several standard lengths up to 110mm. Confusingly, there are two different flavours distinguished by a keying notch in the edge connector. This can be in one (or both) of two different positions, known as B-key and M-key. The terminology only adds to the confusion, and if that weren't enough, other devices such as newer laptop WiFi cards also come as M.2 devices.

The M.2 connector in fact has connections defined for supporting several different types of interface, in particuar, SATA (used for disks), PCIe (PCI Express: faster than SATA and used for disks, but not just disks), SMBus (used for managing peripherals) and USB. However, different M.2 cards support different combinations of these interfaces, and an M.2 socket may not be wired up for all of them. So for example, if you fitted an M.2 SSD to an M.2 WiFi adapter slot intended to accept a USB device it might work if the SSD supports USB in addition to SATA or PCIe, but an M.2 SSD slot, which might be wired only for SATA or PCIe devices, is less likely to accept a WiFi adapter which requires to be driven as a USB device.

NGFF is another name for M.2.

Beware: the B- and M-key positions are almost symetrically placed, which means that you may be able to force a B-key card upside down into an M-key connector (or vice versa) if you mistakenly purchased the wrong sort. Don't do it! There is a severe risk that you will kill both the M.2 device and the circuitry on the motherboard behind the M.2 slot.

B-key

B-key (left) and M-key(right) sockets (above) and edge connectors (below).

B-key cards (sometimes known as Socket 2) offer SATA and SMBus and may support USB. They are sometimes descibed as SATA rather than B-key. Optionally, they may also have the M-key and offer two PCIe channels (described in specifications as PCIe x2) for wider compatibility.

More recent laptop WiFi cards are frequently B-key devices, communicating with the motherboard using the USB connection.

M-key

M-key cards (sometimes known as socket 4) offer four PCIe channels (descrbed in specifications as PCIe x4) and SMBus. They can transfer data twice as fast as PCIe x2 devices and may be descibed as NVMe or PCIe rather than M-key. They may also offer SATA but do not support USB.

NGSFF or NF1

This is yet another type of SSD, slightly larger than M.2 but still using an M-key connector. However, they are not compatible and are mainly used in servers which might have a tray containing a number of such cards.

Under the Bonnet

Unlike a hard disk, an SSD contains no moving parts or delicate mechanisms and so is much more rugged and tolerant of physical shock, and also requires less power. But that's only the beginning.

The way in which an SSD works is radically different from a hard disk is several respects:

  • An SSD stores data as electrostatic charges on a silicon chip whereas a hard disk stores it as patterns of magnetism in a spinning magnetic disk.
  • When you write data to a hard disk it simply overwrites any previous data in the same location on the disk. But you can't write zeros to an SSD, you can only write ones. (All data consists of ones and zeros). Hence the area you want to write to has to be erased (set to all zeros) before you start.
  • You can't erase a little bit of an SSD here and a little bit there. It only allows you to erase quite a large block of memory at a time.
  • You can write to a hard disk as many times as you like without wearing out the magnetic surface, but writing to an SSD causes wear. An SSD will therefore choose for itself where to put your data and remember where that was, so as to spread out the wear. This is known as wear-levelling.

A consequence of all this is that as you create, edit and delete files, more and more blocks of storage will contain some data which is still current and quite a lot which is not (deleted and old versions of files, known as "stale" data). Eventually you would end up with no empty blocks to write new data to even though the SSD might only be half full of current data. To deal with this problem the operating system (Windows, MacOS or Linux) tells the SSD which data is no longer needed through a process known as TRIM. As a background task, the SSD then tries consolidate the current data into fewer blocks, freeing up blocks which can be erased and re-used. This process is known as garbage collection.

All this represents quite a lot of work for an SSD, keeping track of where it's put all your data and which bits of it are still needed and which aren't. So if anything goes wrong it can go very badly wrong, leaving the SSD totally confused and no longer able to operate. This might happen, for example, if power is suddenly lost or a power surge occurs while the SSD was in the middle of doing garbage collection. SSDs (certainly the better ones) are designed to cope with such an eventuality but it does occasionally happen. By contrast, when a hard disk fails it often does so more gracefully, giving increasingly frequent read errors and so allowing you more chance to recover your data. A hard disk may therefore be more suitable than an SSD for backup.

External links

  • External links (if any) as bullet points.
  • If non, delete this section.