In PC building, form factors, interfaces, and protocols are the three most important things for ensuring system and component compatibility. I have already differentiated M.2 NVMe vs M.2 SATA and M.2 SATA vs 2.5″ SATA SSDs. But, this one is dedicated specifically for M.2 drives. The confusion is between the interfaces and protocols. Regarding the M.2 form factor, everybody now knows that it has everything to do with the size and dimensions of the drive. The performance is determined by the interface and protocols.
The correct name for an NVMe SSD is M.2 PCIe NVMe. The interface through which the drive connects to the system is called PCIe. NVMe is the transfer protocol that determines how is this data going to be transmitted. PCIe provides a higher bandwidth but NVMe is how those high read/write speeds are achieved on our computer. NVMe is the way to get the most out of the flash memory which is used in SSDs.
AHCI, on the other hand, is a standard interface used to optimize the communication between the OS and SATA storage devices. It was primarily developed for hard drives. It allowed those drives to offer features like Native Command Queueing and hot-swapping. However, it was never developed and optimized for the high-speed performance of modern SSDs, specifically M.2 PCIe drives. For these modern drives, NVMe was introduced.
What is M.2 Form-Factor?
M.2 is a form factor. The Wikipedia definition of Form Factor is that “it is a hardware design aspect that defines and prescribes the size, shape, and other physical specifications of components, particularly in electronics“. But what does that mean in our context?
Well, M.2 allows the SSD and Motherboard manufacturers to manufacture the components (SSDs and M.2 ports) that are perfectly compatible with each other physically. I said physically because we are talking about the form factor which determines the physical aspects of our SSDs.
M.2 solid state drives come in five form factors i.e. 2230, 2242, 2260, 2280, and 22100. Take the most popular one for our explanation i.e. 2280. 2280 signifies that the M.2 drive will be 80mm long and 20mm wide. The same goes for the other form factors.
So, whenever you want to buy an SSD for your laptop or desktop, one of the key aspects to check for is its form factor. Most motherboards will allow 2280, 2260, and 2240 to drive on the same ports with different screw placements. However, the ports designed for smaller M.2 form factors will not support the larger M.2 drives.
The female port that you can see in the image is designed on M.2 specifications. Now, if you get any SSD from these three form factors, it will get installed on the system.
What is PCIe Interface?
PCIe or PCI Express is a motherboard interface that allows the PCIe components such as graphics cards and SSDs etc to transmit and receive data at very high speed. PCIe is also a form factor that is used to connect graphics cards, Wi-Fi Cards, Bluetooth cards, and other expansion cards to our system. But, in our context, the PCIe offers high-speed lanes (generally 4 lanes) to communicate with the system. These lanes are assigned to the M.2 PCIe ports on the motherboard.
With the help of PCIe lanes, the SSDs are allowed a higher bandwidth and throughput so that the storage bottlenecks are eliminated. It is a great leap forward in terms of storage as compared to other interfaces like SATA and AHCI. PCIe bandwidth depends on its generation and the total lanes used by the PCIe card such as the graphics card.
PCIe Generation | Year Introduced | Bandwidth per Lane (x1) | Total Bandwidth (x16) | Encoding Method |
---|---|---|---|---|
PCIe 1.0 | 2003 | 250 MB/s | 4 GB/s | 8b/10b |
PCIe 2.0 | 2007 | 500 MB/s | 8 GB/s | 8b/10b |
PCIe 3.0 | 2010 | 1 GB/s | 16 GB/s | 128b/130b |
PCIe 4.0 | 2017 | 2 GB/s | 32 GB/s | 128b/130b |
PCIe 5.0 | 2019 | 4 GB/s | 64 GB/s | 128b/130b |
PCIe 6.0 | 2022 | 8 GB/s | 128 GB/s | PAM4 (Pulse Amplitude Modulation 4) |
A lane in PCIe is like a pair of two roads one for sending and another for receiving data. There is a translation layer that handles the traffic and its packeting and de-packeting. There are limited lanes in each system and each port has assigned some of it. Normally, the ports nearest to the CPU like the PCIe x16 will have 16 lanes assigned to it. A PCIe lane could be connected directly to the CPU or through the chipset. Chipset-connected PCIe lanes are utilized by the SATA drives while NVMe drives make use of PCIe lanes that go directly to the CPU.
Most M.2 NVMe SSDs require x4 lanes to work at their full potential. So, the M.2 port on your motherboard will already have those. So, PCIe is like a wide road that allows a bigger amount of traffic as compared to the SATA road. The management of traffic is handled by NVMe which is our next concept.
What is NVMe Interface/Protocol?
So, when you connect your M.2 NVMe drive to an x4 PCIe M.2 slot, it is ready to interact with the host system. NVMe works on OS and SSD levels. The execution of NVMe is done inside the firmware and the operating system with the help of the NVMe driver. In this way, the limited lanes (x4) are utilized for more than what they can actually do.
See, SSDs are already capable of parallelization. It means that the NAND Flash memory inside the SSDs can be used to work on different tasks at a time. The SSD controller can be programmed in a way. But, to achieve that goal, NVMe is introduced. NVMe set aside some rules for the data transmission between the host and the storage. It streamlines the command set and a more efficient queuing mechanism. With this, NVMe enhances the SSD’s ability to perform numerous operations concurrently, significantly improving overall performance.
With the help of NVMe, the drives become capable of full-duplex data transmission. The queue depth increases to up to 65535 queues and each queue could handle up to 65535 commands. For comparison, the AHCI interface just had one command queue and up to 32 commands per queue.
This high queue depth means that a storage device is capable of sending multiple input/output requests. With the help of fast controllers, these I/O requests can be processed and data can be stored inside the NAND flash at a faster rate. So, this all becomes possible with the help of NVMe. There are systems that run on PCIe without NVMe standard, also known as PCIe with AHCI interface. On these systems, you can’t expect the performance that you get with the NVMe drives.
What is SATA Interface?
SATA is again an interface used to connect SATA devices such as SATA SSDs, optical drives, and hard drives to our systems. Unlike PCIe, SATA uses a one-way serial transmission method in which a single stream of data is sent or received. The top version of SATA is SATA 3 which has a bandwidth of 6.0 Gbps which actually translates to 600 MB/s in the real world.
SATA can work on AHCI or legacy modes. On the AHCI mode, SATA drives can provide you with features like hot-swapping and Native Command Queueing. SATA connections are managed by the chipset and are often used by slower devices as compared to other modern devices. SATA 3.0 was launched in 2009 but it is still here because is adequate performance with the SATA SSDs. SATA drives may be slow but they can come in bigger capacities at minimal prices. SATA drives are still relevant on low-end systems even as the primary drives.
You will find only M.2 SATA ports on some older laptops. Although the read/write speeds aren’t very high, they can still remove the storage bottlenecks created by the traditional hard drives.
SATA drives are perfect for high-volume raw data storage.
What is AHCI Interface?
I’m certain you haven’t heard much about AHCI among all the things we’ve discussed. It was launched back in 2004 by Intel to overcome the limitations of PATA (PATA used parallel communication). AHCI is a technical standard to determine how a SATA drive would communicate with the system. You can consider it as the NVMe protocol for PCIe drives.
The IDE (Integrated Drive Electronics) mode that was being used by the older PATA was improved with the advent of AHCI. The maximum speed offered by PATA was 133MB/s. But, with the help of SATA-3 and AHCI, we reached up to 600 MB/s. So, AHCI was a great innovation to allow our systems to have higher storage speeds.
AHCI is used on SATA-based laptops and desktops. Even if you are connecting an M.2 SATA drive to an NVMe port on your motherboard, its data communication will be handled by the AHCI through the chipset.
Also, because of its hot-swapping capabilities, AHCI is widely adopted in server environments.
There are some older motherboards with the M.2 NVMe ports but they might not support NVMe on the software level. In those situations, the AHCI can come into play to handle the data transmission, however, creates a bottleneck for the drives.
Conclusion
In a nutshell, M.2 is a set of specifications for the manufacturers to design their SSD’s physical elements in given manners. NVMe is a protocol that works together with the SSDs and operating systems to get the most out of the PCIe lanes and other capabilities of the NAND Flash memory. PCIe allows the PCIe drives much higher bandwidth with uni-directional communication through PCIe lanes even directly to the CPU.
SATA is an older but still widely adopted interface by M.2 SATA SSDs, 2.5″ SATA SSDs, hard disks, and optical drives for data communication. The speed is slow but because of the cheap price and higher storage capacities, it is still relevant. AHCI is what allows the systems to make the most out of the SATA devices.