If It Looks Like NVMe And Tastes Like NVMe, Well…
As users of the new Amazon EC2 C5 and M5 instance types are noticing, Amazon EBS volumes attached to C5 and M5 instances are exposed as NVMe devices. Please note that the link I just referred to spells this arrangement out as the devices being “exposed” as NVMe devices. Sometimes folks get confused over the complexities of protocol, plumbing and medium as I tend to put it. Storage implementation decisions vary greatly. On one end of the spectrum there are end-to-end NVMe solutions. On the other end of the spectrum there are too many variables to count. One can easily find themselves using a system where there interface for a device is, say, NVMe but the plumbing is, for example, ethernet. In fact, the physical device at the end of the plumbing might not even be an NVMe device but, instead, a SCSI (SAS/SATA) device and somewhere in the plumbing is a protocol engine mapping NVMe verbs to SCSI command blocks.
Things can get confusing. It is my hope that someday a lone, wayward, Googler might find this blog post interesting and helpful.
An Example
Consider Figures 1 and 2 below. In each screenshot I use dmidecode(8) to establish that I’m working with two different systems. Next, I used hdparm(8) on each system to get a quick read on the scan capability of the /dev/nvme1n1 device. As seen in figure 1, scanning the NVMe interface (/dev/nvme1n1 ) yielded 213 megabytes per second throughput. On the other hand, Figure 2 shows the nvme1n1 interface on the i3 instance delivered a scan rate of 2175 megabytes per second.
Both of these devices are being accessed as NVMe devices but, as the results show, the c5 is clearly not end-to-end NVMe storage.
Ask The Device What It (Really) Is
Figures 3 and 4 show how to use lsblk(8) to list manufacturer supplied details about the device dangling at the end of a device interface. As the screenshots show, the c5 instance accesses EBS devices via the NVMe block interface whereas in the i3 case it is a true NVMe device being accessed with the NVMe block interface.
What Kind Of Instance?
Figure 3 shows another thing users might find helpful with these new instance types based on the new Nitro hypervisor. Now the instance type is listed when querying the Product Name field from dmidecode(8) output.
Summary
Remember storage consists of protocol, plumbing and medium.
the way the CLI commands are presented is hard to understand. But once one reads twice it makes sense. Thank you for such a wonderful article.
thanks again
bless you