Reputation: 3861
I have been combing through AWS webpages but am not sure exactly what the NVMe storage is used for.
From my research NVMe stands for non volatile memory express but it also seems like NVMe does not persist through stopping of the instance? Kind of confusing naming.
Why would one use NVMe over regular SSD storage?
Upvotes: 11
Views: 23309
Reputation: 179284
Ephemeral disks -- also called Instance Store volumes -- whether NVMe or SATA SSD or HDD -- don't persist across an instance stop/start because that action deallocates the hardware associated with the instance on stop and reallocates it on start. The instance store is also wiped, so that the next instance to receive that hardware can't access what you stored. In EC2, content on NVMe drives is also transparently encrypted, with service-managed keys, and the encryption keys are wiped when the instance is stopped.
These volumes do persist across a normal reboot, just not a stop/start. When you "stop" an EC2 instance, the billing for the instance also stops, because a stopped instance exists only logically -- not physically. A stopped EC2 instance is assigned to no physical equipment.
Some instance types use NVMe or SATA-based solid state drives (SSD) to deliver high random I/O performance. This is a good option when you need storage with very low latency, but you don't need the data to persist when the instance terminates or you can take advantage of fault-tolerant architectures. For more information, see SSD Instance Store Volumes
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html
NVMe is very high performance, but instance store volumes are (by design) not fault tolerant and not intended for use with data that can't be replaced (though of course, you can RAID them on machine types with more than one ephemeral disk). Unlike EBS volumes, which are network-attached storage (offering both SSD and magnetic types), are redundant, and support snapshots, the instance store is physically inside the host machine and these don't support snapshots. Kind of a classic trade-off. They're excellent for swap space and temporary files as well as other purposes mentioned at the links above.
As noted in the EC2 documentation, not all instance types offer ephemeral disks. On many smaller instance types, this isn't a choice that you need to make.
The "non-volatile" in NVMe is a name given to the technology in the storage industry, not really applicable to the way they are used in EC2.
Upvotes: 15