One of the major responsibilities for anyone who manages their company’s cloud workloads is keeping costs down. I’m constantly looking at alternative EC2 instance types (Virtual Machines for Azure), to see if I can move to newer and cheaper compute. While spinning up a new instance I recently noticed that the default storage is set to gp2. Why, when the newest type is gp3? Not only is gp3 newer it’s less expensive and faster. In this blog post I’ll show you how to convert your existing EBS volumes from gp2 to gp3 and compare the two.
Before we convert this EBS volume let’s compare the features of gp3 and gp2.
Type | gp3 | gp2 |
Baseline throughput | 125 MB/s | Throughput limit is between 128 MB/s and 250 MB/s, depending on the volume size. |
Baseline IOPS | 3000 | 3 IOPS/GB (minimum 100 IOPS) to a maximum of 16,000 IOPS |
Max throughput/volume | 1,000 MB/s | 250 MB/s |
Pricing | $0.08/GB-month 3,000 IOPS free and $0.005/provisioned IOPS-month over 3,000; 125 MB/s free and $0.04/provisioned MB/s-month over 125MB/s | $0.10/GB-month |
While the pricing for gp2 is straight forward, the pricing for gp3 is a little confusing, but if you go with the standard IOPS and throughput you’ll get your per GB price down to 8 cents. If you decide to increase either IOPS or throughput that will of course bite into the savings.
Now that we know a little about gp3 EBS volumes let’s convert one. You have two options, convert from the console or cli.
Console Method
Cli Method
You can run the CLI from your desktop or an easier way is to open it from the console. (before entering the CLI make not of the volume ID)
Once in the CLI type the following command (replace the 1’s with your volume Id)aws ec2 modify-volume –volume-type gp3 –volume-id vol-11111111111111111
In this post we went over the comparisons between gp2 and gp3 EBS volumes and demonstrated the ways in which you can convert existing gp2 type volumes to gp3. I hope this helped you save a little money!