SATA, SAS and NVMe compared

Video 047 of 140 in Virtualization Foundations, in the unit “Storage devices, buses and network cards”. 3:32, with English and Hindi audio.

A server's disks connect to it in one of three common ways: SATA, SAS or NVMe. They look alike on a label, but they differ in speed and in how many tasks they can run at once. That difference matters for busy databases, where a slow link can hold back fast flash. This article compares the three, explains what a command queue is, and shows how to read the connection type of each disk from Linux.

What you will learn

Why the connection can hold back a disk

A flash drive can run no faster than the link it sits on. Many fast drives behind one slow path cannot all reach full speed, because they share that path.

Picture an order database for a warehouse. It makes many small reads and writes every second. A slow connection can hold it back, even when the flash inside is fast.

Note: You notice this when throughput stops rising as the load grows, even after you add more disks.

SATA and NVMe side by side

SATA was built for spinning disks first, and flash came later. It connects through a cable to a controller. Its single command queue holds thirty-two commands.

NVMe was designed for flash from the start. It talks straight over the PCIe bus, the fast road inside the server that cards plug into. It allows many queues, so many processor cores can send work at once.

SAS, the enterprise cousin of SATA

SAS stands for Serial Attached SCSI. It is common in enterprise servers, and it is the enterprise version of the SATA family.

Some SAS drives have two ports, so two controllers can reach the same disk. That helps when one controller fails. Whether a given drive has two ports depends on its model.

Check the connection type on Linux

Linux shows the transport of each disk in the TRAN column. Run the command below to see it.

Show the connection type of each disk
lsblk -d -o NAME,TRAN,SIZE,MODEL

Terms

SATA
A common disk connection, built for spinning disks first, with one command queue.
SAS
Serial Attached SCSI, a disk connection common in enterprise servers.
NVMe
A set of rules for talking to storage, made for flash and running over the PCIe bus.
Command queue
A line of storage commands that wait to be carried out.
Transport
The connection type a disk uses, which Linux shows in the TRAN column.

Check yourself

Why can a fast flash drive run slowly on a SATA link?

A drive can run no faster than the link it sits on, so the slow link holds the flash back.

What does NVMe connect through?

It talks straight over the PCIe bus, to the processor.

How can you see the connection type of a disk in Linux?

Run lsblk with the TRAN column, and read the transport value, such as sata, sas or nvme.

Previous: How an SSD works: flash, wear and TRIM. Next: PCIe: lanes, generations and slots.