Mounting a NVME disk on AWS EC2
Master System Design with Codemia
Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.
Mounting an NVMe disk on an AWS EC2 instance can enhance performance significantly, especially in high-read/write scenarios where low latency and high throughput are critical. NVMe (Non-Volatile Memory Express) is a storage interface designed to take advantage of the low latency and parallelism of SSDs compared to traditional hard drives. When you launch specific EC2 instance types, AWS automatically provides NVMe SSDs as part of the instance store or EBS.
Understanding NVMe on AWS EC2
AWS provides NVMe interfaces for both EC2 Instance Store volumes and EBS volumes. It's important to understand the differences between these and how they are presented to your instance:
- Instance Store Volumes: These are temporary storage volumes that are physically attached to the host server. They offer very low latency since they are local, but they exist only during the instance's lifecycle.
- EBS Volumes: These are persistent block storage options available with AWS. When provisioned as NVMe devices, they can offer better performance over standard interfaces.
Key Considerations
When working with NVMe disks on AWS, keep the following in mind:
- NVMe devices are attached to instances using NVMe PCIe interfaces, providing lower latency and higher throughput.
- AWS EC2 instance types such as
C5,M5, andR5commonly use NVMe for instance storage. - Data on NVMe instance store volumes is ephemeral, hence ensure that data persistence is managed using EBS or S3, depending on your need.
- The device mapping can differ from the instance types using traditional block devices. Hence, using device names such as
/dev/sdfneeds to be adjusted to the NVMe interface.
Practical Steps for Mounting NVMe Disks
Step 1: Identify NVMe Devices
Use the lsblk
command to list all block devices and confirm the presence of NVMe devices:
- Read/Write Throughput: Measures in megabytes per second (MB/s).
- IOPS: Input/Output operations per second.

