AWS EBS GP2 → GP3: Live Volume Migration for Cost and Performance Gains
Decoupling storage performance from capacity is a recurring demand in AWS storage discussions. Many production systems still use GP2 (General Purpose SSD) EBS volumes, where IOPS and throughput scale linearly with volume size—inefficient for high-IO workloads that require modest storage. AWS addressed this with GP3, allowing volumes to be tuned independently for IOPS (up to 16,000) and throughput (up to 1,000 MB/s), regardless of size.
Why Upgrade Existing GP2 Volumes?
Feature | GP2 | GP3 |
---|---|---|
Price per GB | Baseline (legacy) | ~20% lower |
IOPS scaling | 3 IOPS/GB (up to 16K) | Up to 16K at any size |
Throughput | Up to 250 MB/s (scales) | Up to 1,000 MB/s (custom) |
Baseline included | Yes | Yes, with option to tune |
Avoid overprovisioning. Under GP2, reaching higher IOPS means oversizing the volume. GP3 eliminates this link, so you pay for the performance and capacity you actually consume.
For example, see a typical legacy DB volume:
- Old: 1 TB GP2 → default 3,000 IOPS, 250 MB/s throughput (can burst but not sustain).
- Needed: 1,000 GB, 8,000 IOPS, 500 MB/s.
- GP2 cost: Forced to add more capacity just for performance.
- GP3 cost: Directly assign 8,000 IOPS and 500 MB/s on 1 TB (and pay less).
Zero-Downtime GP2→GP3 Migration: Technical Steps
AWS “modify-volume” API supports in-place upgrades from GP2 to GP3 with no need to detach, stop, or snapshot—if you do it right.
Critical Prologue:
- Ensure a recent snapshot before any volume mutation (AWS guarantees safety, but Murphy’s Law applies).
- Review attached workload's tolerance for latency spikes (IOPS recalibration may temporarily lower performance).
Preflight Checklist:
- AWS CLI v2 (
aws --version
), ideally v2.7+, and IAM role with EC2 volume modify rights. - Volume isn’t in a pre-existing “modifying” state.
1. Enumerate Target Volumes
Identify all GP2 volumes, scoped optionally by tag or attachment:
aws ec2 describe-volumes \
--filters Name=volume-type,Values=gp2 \
--query "Volumes[*].[VolumeId,Attachments[0].InstanceId,Size,State]" \
--output table
Note any volumes with recent high I/O (monitor in CloudWatch): sudden type change under load might impact latency for seconds or minutes.
2. Initiate Conversion
Basic GP2 → GP3:
aws ec2 modify-volume \
--volume-id vol-0abc123def456ghij \
--volume-type gp3
To specify performance characteristics (recommended if workload exceeds default baseline):
aws ec2 modify-volume \
--volume-id vol-0abc123def456ghij \
--volume-type gp3 \
--iops 8000 \
--throughput 500
Defaults:
- IOPS: 3,000
- Throughput: 125 MB/s
3. Track Migration Progress
AWS processes these changes asynchronously (typically under 10 minutes, but spikes to 20+ aren’t rare during region-wide maintenance):
aws ec2 describe-volumes-modifications --volume-id vol-0abc123def456ghij
Watch for "ModificationState": "completed"
.
Note: Temporary optimizing
state is normal—throughput and IOPS may still gradually increase for up to 24 hours; production systems usually see minimal impact if baselines aren't exceeded.
4. Validate & Benchmark
Performance measurement is workload-dependent:
- Linux:
- Install
fio
or useiostat
. - Re-run pre-migration disk workload test for comparison.
- Install
- Watch for system logs like:
If observed, check volume status and AWS Health events—occasionally requiredkernel: blk_update_request: I/O error, dev xvdf, sector 32768
--block-device
re-initiation.
Example: Database with Steady High IOPS Demand
aws ec2 modify-volume \
--volume-id vol-08ba7eddc0f5abcd1 \
--volume-type gp3 \
--iops 12000 \
--throughput 700
No impact on storage size or block device reconfiguration required.
Gotcha: If using RAID/lvm over several EBS volumes, repeat for each brick; ignore nits about alignment unless you're resizing.
Post-Migration: Checklist & Reality Checks
- Update CloudFormation/Terraform:
Ensure new volumes referencevolume_type = "gp3"
and addiops
/throughput
as explicit parameters. - Monitor with CloudWatch:
Compare cost and latency trends month–over–month. Dramatic improvements should be measurable unless workload remains bursty. - Periodically review for further right-sizing:
AWS sometimes changes pricing or performance boundaries—monitor release notes.
Non-Obvious Tip
For ultra-high IOPS, ensure your EC2 type supports desired block device throughput (e.g., certain t3
/m5
limits may throttle actual EBS performance below GP3 capabilities). See AWS docs.
Side Notes
- If you must roll back, reverse the process with
--volume-type gp2
, but any performance gains will be lost and pricing will revert. - Spot-checked in production (>700 volumes): no data loss, but on 2 volumes,
optimizing
status lingered for hours—benchmark twice.
Direct volume modification removes the inertia of old choices. Skip the overprovisioning, and use tools that fit today’s performance requirements at the lowest cost. Migration to GP3 isn’t just a one-time tune-up—it’s a foundation for ongoing optimization as infrastructure or workload realities evolve.
Automation tip: For fleets, script migration using aws ec2 describe-volumes
piped into a simple shell loop. For Terraform-managed stacks, codify GP3 as your baseline and join the AWS Generation Shift.