Judy@4pcba.com
7:30 AM - 7:30 PM
Monday to Saturday

M.2: A Compact SSD Form Factor and Fast Bus Interface

What is M.2?

M.2, formerly known as Next Generation Form Factor (NGFF), is a specification for internally mounted computer expansion cards and associated connectors. It replaces the mSATA standard, which uses the PCI Express Mini Card physical layout. M.2 is designed as a revision and improvement to the mSATA standard, allowing for larger printed circuit boards (PCBs) to be manufactured. This allows for more PCB area and increased storage capacity compared to mSATA with the maximum size allowed being 22mm × 110mm[1].

M.2 specifies a variety of module sizes and interfaces. Common lengths are 30mm, 42mm, 60mm, 80mm, and 110mm. Module width is 22mm for double sided and 12mm for single sided modules[2]. There are four interfaces: SATA, PCIe x2, PCIe x4, and USB 3.0. M.2 SSD modules are available in both SATA and PCIe/NVMe configurations. The PCIe/NVMe versions offer higher maximum speeds (up to 32 Gbit/s or 4,000MB/s vs 6 Gbit/s or 600 MB/s with SATA). The availability of multiple sizes and interfaces allows for flexibility to accommodate different devices.

M.2 Form Factor and Module Sizes

The M.2 specification allows for different module widths and lengths to provide flexibility. There are two base module widths – 12mm for single sided and 22mm for double sided modules. The most common lengths are:

  • 2230 (22mm wide, 30mm long)
  • 2242 (22mm wide, 42mm long)
  • 2260 (22mm wide, 60mm long)
  • 2280 (22mm wide, 80mm long)
  • 22110 (22mm wide, 110mm long)

The 2280 size is most commonly used in desktop and laptop PCs for high-capacity NVMe SSDs. The smaller 2230 and 2242 sizes are often found in ultraportable laptops, tablets, and embedded devices where space is at a premium. The 22110 size allows for the highest SSD storage capacities.

Here is a table summarizing the common M.2 module sizes:

M.2 Module Size Width Length Common Use
2230 22mm 30mm Ultraportables and tablets
2242 22mm 42mm Ultraportables
2260 22mm 60mm Laptops
2280 22mm 80mm Laptops and desktops
22110 22mm 110mm Highest capacity SSDs

M.2 Interface and Keying

M.2 supports multiple bus interfaces including SATA, PCIe x2, PCIe x4, and USB 3.0. The connector has 75 positions with up to 67 pins in use. Different subsets of pins are used by the various interfaces:

  • SATA uses pins 1-15
  • PCIe x2 uses pins 24-35
  • PCIe x4 uses pins 24-39
  • USB 3.0 uses pins 58-67

To prevent M.2 cards with incompatible interfaces from being plugged into M.2 slots, a keying notch system is used. M.2 modules have a “B” or “M” key notch that matches a peg in the appropriate M.2 slot to ensure only modules with supported interfaces are inserted.

  • B key supports SATA, PCIe x2
  • M key supports SATA, PCIe x4, USB 3.0

Some M.2 sockets support both B and M key modules for maximum compatibility with all interface types. Here is a diagram showing the pinouts and keying notch locations for the different M.2 interfaces:

M.2 SSD Performance

SATA vs PCIe x2/x4 NVMe

M.2 SATA SSDs use the same AHCI interface and protocol as 2.5″ SATA SSDs and are limited to ~550MB/s due to the 6Gbps SATA III bus speed. In contrast, M.2 PCIe SSDs using the NVMe protocol can achieve much higher speeds by leveraging the faster PCIe 3.0 or 4.0 interface:

  • PCIe 3.0 x4 allows for speeds up to ~3500MB/s
  • PCIe 4.0 x4 allows for speeds up to ~7000MB/s

So M.2 NVMe SSDs can be up to 6-12x faster than M.2 SATA SSDs in terms of peak sequential speeds. The actual performance difference in real-world use depends on the workload, as small random reads/writes are less affected by the interface speeds.

Here is a table comparing typical performance of M.2 SATA vs NVMe PCIe 3.0/4.0 SSDs:

M.2 SSD Type Interface Peak Seq. Read Peak Seq. Write 4K Random Read 4K Random Write
SATA SATA 6Gbps 550MB/s 520MB/s 90K IOPS 85K IOPS
PCIe 3.0 x4 NVMe PCIe 3.0 x4 3500MB/s 3000MB/s 500K IOPS 450K IOPS
PCIe 4.0 x4 NVMe PCIe 4.0 x4 7000MB/s 5000MB/s 800K IOPS 700K IOPS

As you can see, moving to a PCIe NVMe SSD provides substantial performance benefits in both sequential throughput and random IOPS compared to SATA SSDs. PCIe 4.0 drives can approach 7GB/s reads and 1 million IOPS in highly parallel workloads.

SLC Caching and DRAM

Many higher-end M.2 NVMe SSDs incorporate two key features to boost performance:

  1. SLC caching – A portion of the NAND is dynamically allocated as fast single-level cell (SLC) cache to absorb bursty writes. This increases sustained write speeds.

  2. DRAM cache – An external DRAM chip (e.g. 512MB or 1GB) is used to cache the translation/mapping and metadata tables stored on the NAND. This significantly improves random read/write performance at low queue depths.

Budget-oriented drives often omit the DRAM cache to reduce costs and instead use a portion of the NAND in SLC mode as a cache to improve performance. This is called a DRAMless SSD. While not as fast as a DRAM-based SSD, DRAMless drives still offer good performance for many use cases at a lower cost.

Here is a table comparing typical sustained performance of entry-level DRAMless vs high-end NVMe SSDs:

M.2 NVMe SSD Type DRAM Cache Sustained Seq. Write 4K Random Read QD1 4K Random Write QD1
Entry DRAMless No 800MB/s 12K IOPS 50K IOPS
High-end with DRAM Yes 2000MB/s 60K IOPS 200K IOPS

The use of SLC caching and DRAM allows high-end drives to maintain high sequential write speeds even after the SLC cache is exhausted. The DRAM also provides a big boost to random performance at low queue depths which benefits desktop/laptop usage. However, entry-level DRAMless SSDs still offer a big upgrade in performance over SATA SSDs for a lower cost.

M.2 SSD Capacities and NAND Types

M.2 SSDs are available in a range of capacities from 128GB to 8TB and beyond. The maximum capacity depends on the module length and number of NAND chips that physically fit on the PCB, as well as the density of the individual NAND dies.

Lower capacity drives in the 128GB to 512GB range often use just one or two NAND chips, while higher capacity 2TB+ models can have 4-8 NAND packages each containing 4-16 dies. The use of high-density 3D TLC and QLC NAND with 256Gb to 1Tb dies has enabled multi-TB capacities in the compact M.2 form factor.

Here are the approximate maximum capacities for each M.2 length when using 512Gb TLC dies:

  • 30mm – 256GB
  • 42mm – 512GB
  • 60mm – 1TB
  • 80mm – 2TB
  • 110mm – 4TB+

In terms of NAND types, most consumer M.2 SSDs use 3D TLC (triple-level cell) NAND. TLC stores 3 bits per cell which provides a good balance of cost, performance, and endurance for client workloads. For higher capacities, QLC (quad-level cell) NAND storing 4 bits per cell is used. This increases the capacity per die but at the cost of slower write speeds and lower endurance.

Some high-end drives designed for heavier workloads or extreme performance use MLC (multi-level cell) NAND which stores 2 bits per cell. MLC offers higher write speeds and endurance than TLC NAND but has lower density, resulting in lower capacities or higher cost per GB. SLC (single-level cell) NAND storing 1 bit per cell offers the highest speeds and endurance but is very expensive, so it is typically only used as a small cache in consumer SSDs rather than for the entire capacity.

Here is a summary of the most common NAND types used in M.2 SSDs:

NAND Type Bits per Cell Relative Density Writes, Erases Best Uses
SLC 1 1x 100K Caching
MLC 2 2x 10K High-end, prosumer
TLC 3 4x 3-5K Mainstream, client
QLC 4 8x 1K High capacity, archival

M.2 SSD Reliability and Endurance

M.2 SSDs offer higher reliability and endurance compared to hard drives due to a lack of moving parts. However, NAND flash memory does wear out over time as cells are erased and programmed, leading to reduced performance and eventual failure as “bad blocks” develop.

SSD endurance is typically measured in terms of drive writes per day (DWPD) or total bytes written (TBW) over the warranty period (typically 5 years). For example, a 1TB drive rated for 600TBW can withstand 600TB of data being written before the warrantied write endurance is consumed.

The actual endurance required depends on the workload – read-heavy client usage is not very write-intensive, while content creation, caching, or hosting VMs/databases involves more writes. Higher capacities also increase the overall endurance as there is more NAND to spread the writes across.

Here are some typical endurance ratings for consumer and prosumer M.2 NVMe SSDs:

Capacity Consumer TBW (0.3 DWPD) Prosumer TBW (1.0 DWPD)
250GB 150 TBW 500 TBW
500GB 300 TBW 1000 TBW
1TB 600 TBW 2000 TBW
2TB 1200 TBW 4000 TBW

Most current M.2 NVMe SSDs also feature end-to-end data protection, including LDPC ECC, RAID-like parity, and PLP capacitors to prevent data loss or corruption in the event of sudden power loss. Premium SSD controllers have additional reliability features like SLC caching, NAND Bad Block Management (BBM), and heat/temperature monitoring.

In general, quality M.2 SSDs from reputable brands are highly reliable for their intended use case and can be expected to last well beyond their warranty period in client systems. However, regular backups are still recommended to protect against data loss from other causes like malware/ransomware, theft, or physical damage.

Frequently Asked Questions (FAQ)

1. What is the difference between M.2 and NVMe?

M.2 refers to the physical form factor and connector, while NVMe is a logical device interface and protocol. M.2 SSDs can use either SATA or NVMe, but most modern M.2 SSDs use NVMe for higher performance. NVMe can also be used with other form factors like add-in cards or U.2 drives.

2. Can I replace a SATA M.2 SSD with an NVMe M.2 SSD?

It depends on the capabilities of your M.2 slot. If it has a B+M key and supports PCIe x2 or x4, then it should support NVMe SSDs. Check your motherboard manual or look for printed labels next to the M.2 slot to determine what interfaces it supports. Note that an NVMe SSD also requires NVMe driver support from your operating system.

3. What is the lifespan of an M.2 NVMe SSD?

This depends on the capacity, NAND type, and write amplification of your particular usage, but most consumer M.2 NVMe SSDs are rated to write hundreds of terabytes over a 5 year warranty. This equates to 30-50GB per day for a 500GB-1TB SSD, which is more than sufficient for typical client workloads. With average consumer usage, an M.2 NVMe SSD can be expected to last 10+ years before failing due to write endurance.

4. Do M.2 SSDs need cooling?

High-performance PCIe 4.0 M.2 SSDs can generate significant heat under heavy sustained loads which may cause thermal throttling without adequate cooling. Using the motherboard’s integrated M.2 heatsink (if available) or attaching an aftermarket heatsink is recommended for the best performance, especially in thermally constrained environments like a laptop or small form factor case. Many drives also have onboard thermal pads and throttling firmware to prevent overheating.

5. Are M.2 SSDs worth it over 2.5″ SATA SSDs?

M.2 NVMe SSDs offer substantially higher performance than 2.5″ SATA SSDs for a wide range of workloads. The difference is especially noticeable in sequential speeds and random I/O at low queue depths, resulting in a snappier overall user experience. M.2 SSDs also simplify system builds by eliminating extra power and data cables. However, SATA SSDs are still a good option for budget-constrained builds or secondary/bulk storage where maximum performance is not required. The M.2 form factor itself does not offer a significant benefit over 2.5″ for SATA SSDs.