AWS Elastic Block Storage (EBS)
Looking to add some space to my server and so I am looking into Amazon EBS.
References
What is Amazon Elastic Block Store?
Amazon Elastic Block Store (Amazon EBS) provides scalable, high-performance block storage that can be used with Amazon Elastic Compute Cloud (Amazon EC2) instances. With Amazon Elastic Block Store, you can create and manage the following block storage resources:
- Amazon EBS volumes - These are storage volumes that you attach to Amazon EC2 instances. After you attach a volume in an instance, you can use it in the same way you would use a local hard drive attached to a computer, for example to store files or to install applications.
- Amazon EBS snapshots - These are point-in-time backups of Amazon EBS volumes that persist independently from the volume itself. You can create snapshots to back up the data on your Amazon EBS volumes. You can then restore new volumes from those snapshots at any time.
Features
- Multiple Volume Types - Volume types are divided into two major categories: SSD-backed storage for transactional workloads and HDD-backed storage for throughput intensive workloads.
- Scalability
- Backup and recovery - You can take snapshots of storage to restore.
- Data protection
- Data availability and durability -
io2 Block Express volumes provide 99.999% durability with an annual failure rate of 0.001%. Other volume types provide 99.8% to 99.9% durability with an annual failure rate of 0.1% to 0.2%
- Data archiving - snapshots provide a low-cost storage tier to archive copies of EBS snapshots
Definitions
- IOPS
- IOPS (input/output operations per second) (pronounced EYE-OPS) is the standard unit of measurement for the maximum number of reads/writes to noncontiguous storage locations.
- Measure of a device's read/write speed
- Provides a standard benchmark for measuring and accessing the performance of storage devices, like hard disk drives (HDDs), solid-state drives (SSDs), flash drives and storage area networks.
- IOPS is often measured with a Iometer
Without taking into account the data block size, I/O size, read/write activity or I/O stream, IOPS as a standalone measurement says little.
- Throughput
- Measures how many units of information a system can process in a period of time. It can refer to the number of I/O operations per second, but is typically measured in bytes per second.
- Latency
- Measures the time between issuing a request and receiving a response. With regards to IOPS, latency is a measure of the length of time it takes for a single I/O request to be completed from the application's point of view.
Differences Between SSD and a Hard Drive
Solid state drives (SSD) and hard disk drives (HDD) are data storage devices. SSDs store data in flash memory, while HDDs store data in magnetic disks. SSDs are a newer technology that uses silicon's physical and chemical properties to offer more storage volume, speed and efficiency.
SSDs contain non-volatile flash memory, which comprises a range of integrated circuits to store and retrieve data. Hard disk drives (HDD) have several mechanical parts that move together to store and retrieve data.
Key Differences
Both SSD and HDDs allow users to store files, but they work differently.
- Read Process
- The read process is how these storage devices retrieve data on their devices.
- SSDs have no moving parts.
- Write Process
- The write process is how HDDs and SSDs record new information.
- Performance
- SSDs run faster and use less energy than HDDs. SSDs can copy files at upwards of 500 MBps. HDDs only transfer at 30-150 MBps.
- SSDs are also faster for running applications. They conduct the read/write process at 50-250 MBps, while HDDs do the same at 0.1-1.7 MBps. HDD speed is limited by the platter rotation speed.
- Storage Capacity
- It is much more common to see larger HDDs as they are more cost effective. Data storage on an SSD can cost $0.08-0.10 per GB, while an HDD only costs $0.03-0.06 per GB.
- Durability
- SSDs are more durable as they have no mechanical parts.
- Reliability
- HDDs are easier to recover data from.
When to use SSD vs HDD
You should use a solid state drive when you need high speed or deal with frequent read/writes on large data volume. SSDs are a better choice for data analytics or gaming workloads.
A HDD is a better choice if you are dealing with data backups, data archives, or throughput-intensive workloads. SSDs are more cost-effective for storing high-volume data with infrequent access.
Amazon EBS Volumes
An Amazon EBS is a durable, block-level storage device that you can attach to your instances. After you attach a volume to an instance, you can use it as you would use a physical hard drive. EBS volumes are flexible. For current-generation volumes attached to current-generation instance types, you can dynamically increase size, modify the provisioned IOPS capacity, and change volume types on live production volumes.
- You can use EBS Volumes For:
- Primary storage for data that requires frequent updates, such as the system for an instance or storage for a database application.
- Throughput-intensive applications that perform continuous disk scans
- Amazon EBS provides the following volume types:
- General Purpose SSD (
gp2
andgp3
) gp3
volumes are the latest generation of General Purpose SSD volumes, and the lowest cost SSD volume offered by Amazon EBS. This volume type helps provide the right balance of price and performance for most applications.- Provides single-digit millisecond latency and 99.8 percent to 99.9 percent volume durability with an annual failure rate of no higher than 0.2 percent
- Performance of 3,000 IOPS, which is included in the price of storage
- You can provision additional IOPS with an additional cost at a ratio of 500 IOPS per GiB of volume size
- Throughput performance of 125 MiB/s, which is included in cost. You can provision additional
- The volume size if 1 GiB to 16 TiB
- Provisioned IOPS SSD (
io1
andio2
) - This was built for the purpose of meeting the performance requirements of the most demanding I/O intensive applications that run on instances built on the Nitro System.
- This is best for if you want to run a SQL database on EC2
- Sub-millisecond average latency
- Storage capacity up to 64 TiB
- Provisioned IOPS up to 256,000, with an IOPS:GiB ratio of 1,000:1.
- Volume throughput up to 4,000 MiB/s.
- Throughput optimized (
st1
) - Cold HDD (
sc1
) - Magnetic (
standard
)
- General Purpose SSD (
Amazon EBS Volumes and NVMe
Amazon EBS Volumes are exposed as NVMe block devices on Amazon EC2 instances built on the AWS Nitro system. All current generation AWS Windows and Linux AMIs come with AWS NVMe installed by default.
- The Nitro System is a collection of hardware and software components built by AWS that enable high performance, high availability, and high security.
- The Nitro System provides bare metal capabilities that eliminate virtualization overhead and support workloads that require full access to host hardware. Bare metal instances are well suited for the following:
- Workloads that require low-level hardware features
- Applications that require a non-virtualized environment for licensing or support
- The following components are part of the Nitro system:
- Nitro card
- Nitro security chip, integrated into the motherboard
- Nitro hypervisor - A lightweight hypervisor that manages memory and CPU allocation and delivers performance that is indistinguishable from bare metal for most workloads.
The device names are /dev/nvme0n1
, /dev/nvme1n1
, and so on. The device names that you specify in a block device mapping are renamed using NVMe device names (/dev/nvme[0-26]n1
). The block device driver can assign NVMe device names in a different order than you specified for the volumes in the block device mapping.
Amazon EBS Volume Lifecycle
- Creation Process: Create a volume from an Amazon EBS snapshot or create an empty volume.
- Attach it to an Amazon EC2 instance in the same Availability Zone as the volume
- You can attach multiple volumes to an instance.
- You can modify the size or performance of the volume at any time
- You can delete a volume to stop incurring the related storage costs.
The creation and deletion processes are kind of self explanatory / easy to do through the AWS console.