Blog
4/1/1: 4 Random Thoughts from me, 1 tools to help Sales Engineers, 1 quote for motivation
AWS SAA C03 Novice Journey: Elastic Block Storage EBS
- August 24, 2023
By Ramzi Marjaba
When an EC2 instance is launched, storage is attached to it. However, this goes how the instance goes. If it’s shut down, you lose and no longer can access data. It’s like running a computer. As long as the computer is up, you get to access the data. It shuts down, you don’t.
So there is Elastic Block Store (EBS): These are usually called Volumes. They are like external drives, or more accurately network-attached storage (NAS) where they are not attached to a specific computer. So if one computer shuts down, you can access it from a different computer.
And there are different types of storage. Outside the cloud, there is Solid State Drive and Hard Drive. Same in AWS, you have two different types of SSDs called GP2 and 3, GP being General Purpose. For some reason, there is and never was GP1.
There are also IO1 and 2 if you have workloads that require a lot of Input and Output. These are called Provisioned IOPS SSD Volumes.
And with the HDs, you ST1 and SC1 for functions that require a lot of Throughput, but not necessarily input and output.
These are used for high availability, 5 x 9s. These are not dedicated Hard drives but are shared bits and pieces that you can scale up or down as needed, and can be attached to EC2 instances.
We can also separate the storage from the compute depending on the needs.
Throughput is the measurement of bits per second, as how many bits a hard drive can process per second, whereas IOPS is a measurement of how many actual read or write take place per second:
To open Windows Performance Monitor, run perfmon at the command prompt. IOPS and throughput data is provided by the following performance counters:
- Disk reads/sec + disk writes/sec = IOPS
- Disk read bytes/sec + disk write bytes/sec = throughput
Elastic Block Store, I think this table from the documentation speaks volumes (no pun intended)
Snapshots:
Snapshots are a way to back up your data or back them up to other regions. And if you’ve created an EC2 instance without encrypting your storage block, you can with the snapshots.
Snapshots are incremental. When you take the first snapshot, this will take some time and pretty much back up the entire volume that you are snapshotting, but after that, the snapshots are only of the difference. The AWS docs have a good example showing that. But as a brief explanation,
In the beginning, there exists a Volume with a total capacity of 15Gib, and 10G is actually used. When a snapshot is taken, it takes it of all 10G of the used portion of this volume.
Then, 4 of the 10G has been modified, so when another snapshot is taken, the 6G that was not changed is referenced in the new snapshot, and a snapshot of the 4G is taken.
The final stage of this example is that an additional 2Gs were stored on the volume, so now the 4G is referenced from the previous snapshot, the 6G from 2 snapshots ago, and the 2G is now “snapshotted” this time around.
Here’s the doc if you’d like to read it for yourself.
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSSnapshots.html
Stay in the loop
Subscribe to get our latest content by email.
Success! Now check your email to confirm your subscription.