Storage for SQL Server: gp3 vs io2, tempdb
-
Phase 0: Before you start
-
Phase 1: The foundation
-
Phase 2: Operations and security
-
Phase 3: SQL Server on AWS
-
Phase 4: Troubleshooting step by step
-
Phase 5: Final project and career
When someone says “the database is slow”, very often they mean the storage is slow, and on AWS that’s usually a limit nobody knew was there. SQL Server storage on AWS has three of them: the volume (gp3 or io2), the EBS bandwidth of the instance class itself, and the way SQL Server lays out its data, log and tempdb files.
You’ll look at saat-sql’s storage and instance limits, push real I/O through it, and read per-file latency inside SQL Server next to the matching CloudWatch metrics. After finding where tempdb lives and turning on storage autoscaling, you’ll run into two walls on purpose: io2’s minimum size and the 10 GB limit in Express.
| Time | You need | By the end you can |
|---|---|---|
| 50 minutes | You need Lesson 42 finished (saat-sql, Start-SqlLab.ps1, Stop-SqlLab.ps1) and your laptop signed in as saat-admin. The session costs about USD 0.20 and nothing gets upgraded. | You’ll read RDS storage settings and the instance’s EBS limits, generate SQL Server I/O and measure it with sys.dm_io_virtual_file_stats and CloudWatch, see how gp3, io2 and instance store tempdb differ, and set up storage autoscaling. |
What it is, in one line
SQL Server storage on AWS is the EBS volume type and size behind your database, limited by both the volume’s IOPS and throughput and the instance class’s EBS bandwidth.
In Simple Words
A water tank, a pipe and a tap
Think of a big water tank (the volume) with a pipe coming out of it (the instance’s EBS bandwidth). However big the tank is, customers opening their taps (queries) only get as much as the thinnest part lets through. On small instance classes that pipe is thin, though it can stretch wider for a few minutes before shrinking back, and once the stretch is used up everything slows down. tempdb is like the kitchen sink everyone uses at the same time, so giving it its own fast local tap (instance store) stops it dragging down the main supply.
Engineer's View
How storage really behaves for RDS SQL Server
gp3 comes with a baseline of 3,000 IOPS and 125 MiB/s, and since June 2026 on RDS for SQL Server it scales to 64 TiB, 80,000 IOPS and 2,000 MiB/s. io2 Block Express lets you provision up to 256,000 IOPS with sub-millisecond latency and 99.999% durability, but on RDS SQL Server it needs at least 100 GiB. Storage can grow and can never shrink, and after one storage change you have to wait (usually six hours) before you can make the next.
Each instance class has its own EBS bandwidth and IOPS limits. Burstable classes like db.t3 have a low baseline plus burst credits, and CloudWatch’s EBSIOBalance% and EBSByteBalance% tell you how much burst is left. Once they reach zero, I/O falls to the baseline no matter what the volume could deliver.
On RDS, data, log and tempdb all share the instance’s storage. The exception is classes with local NVMe instance store (db.m5d, db.r5d or db.x2iedn, for example), where RDS puts tempdb on the fast local disk. Inside SQL Server, sys.dm_io_virtual_file_stats shows read and write latency for each file, and as a rough guide, data under 10 ms and log under 2 ms is healthy. Storage autoscaling grows the volume when free space gets low, up to MaxAllocatedStorage.
How it works, step by step
These are the things that limit a single write from SQL Server.
1SQL Server issues the I/O
A transaction can’t commit until its log write finishes, so users feel log latency directly, while data writes happen in the background at checkpoints.
2The instance class carries it
db.t3.micro has a baseline of about 87 Mbps (roughly 11 MB/s) and 500 IOPS. It can burst much higher for a while, but the baseline is far below what even a basic gp3 volume can do.
3The volume serves it
gp3 gives you 3,000 IOPS and 125 MiB/s at no extra charge, so on a burstable instance raising the volume’s IOPS often makes no difference at all.
4Pick the right storage
This is how the options compare:
Before you pay for io2, look at the instance class limits and the burst balances. Often the cheapest fix is a non-burstable class with more EBS bandwidth, or a d class if the work is heavy on tempdb.
✅ Checkpoint: You can name the three I/O limits, explain burst balance, say where tempdb lives on RDS, and when io2 is worth it.
Hands-on lab: measure SQL Server storage on AWS
Before you run any command, double-check it
Read every command twice before you press Enter. Check the target: the system or account, the IDs, the names and the sizes. These commands are for learning and were tested in our lab, not on your system. At work, run the read-only list commands first, follow your change process, make sure a backup exists, and ask a second person to check anything that changes or deletes data. You run them at your own risk.
Sign in and start the SQL lab. If saat-sql is stopped it will start, which takes 5 to 10 minutes:
cd C:\aws-lab
aws login --profile saat-admin
$env:AWS_PROFILE = 'saat-admin'
.\Start-SqlLab.ps1You should see something like this:
Tunnel ready on 127.0.0.1,11433 for saatadmin (password is in SQLCMDPASSWORD for this window)1Read the storage and instance limits
Paste this whole block:
aws rds describe-db-instances --db-instance-identifier saat-sql --query "DBInstances[0].[DBInstanceClass,StorageType,AllocatedStorage,Iops,StorageThroughput,MaxAllocatedStorage]" --output text
aws ec2 describe-instance-types --instance-types t3.micro --query "InstanceTypes[0].EbsInfo.EbsOptimizedInfo.[BaselineBandwidthInMbps,MaximumBandwidthInMbps,BaselineIops,MaximumIops]" --output textYou should see something like this:
db.t3.micro gp3 20 3000 125 None
87 2085 500 11800The volume offers 3,000 IOPS and 125 MiB/s, but the instance underneath (db.t3.micro runs on the same hardware as t3.micro) has a baseline of only 500 IOPS and 87 Mbps, bursting to 11,800 IOPS and 2,085 Mbps while its credits last. MaxAllocatedStorage None tells you autoscaling is off.
2Push real I/O through SQL Server
Paste this whole block. It writes about 200 MB of rows, which takes one to two minutes on this small instance:
@'
SET NOCOUNT ON;
IF OBJECT_ID('dbo.Big') IS NULL CREATE TABLE dbo.Big (Id int IDENTITY PRIMARY KEY, Pad char(4000) NOT NULL DEFAULT 'x');
INSERT dbo.Big (Pad) SELECT TOP (50000) 'x' FROM sys.all_objects a CROSS JOIN sys.all_objects b;
CHECKPOINT;
SELECT COUNT(*) AS big_rows, CAST(SUM(DATALENGTH(Pad)) / 1048576.0 AS decimal(10,1)) AS approx_mb FROM dbo.Big;
'@ | Set-Content io-work.sql
sqlcmd -S "127.0.0.1,11433" -U saatadmin -C -d SaatShop -i io-work.sql -WYou should see something like this:
big_rows approx_mb
50000 190.73Measure latency inside SQL Server and in CloudWatch
Wait a minute or two first so CloudWatch has its datapoints, then paste this whole block:
@'
SET NOCOUNT ON;
SELECT DB_NAME(vfs.database_id) AS db, mf.type_desc, vfs.num_of_reads, vfs.num_of_writes,
CAST(vfs.io_stall_read_ms * 1.0 / NULLIF(vfs.num_of_reads, 0) AS decimal(10,1)) AS avg_read_ms,
CAST(vfs.io_stall_write_ms * 1.0 / NULLIF(vfs.num_of_writes, 0) AS decimal(10,1)) AS avg_write_ms
FROM sys.dm_io_virtual_file_stats(NULL, NULL) vfs
JOIN sys.master_files mf ON mf.database_id = vfs.database_id AND mf.file_id = vfs.file_id
WHERE vfs.database_id IN (DB_ID('SaatShop'), 2) AND mf.type_desc IN ('ROWS', 'LOG')
ORDER BY db, mf.type_desc;
'@ | Set-Content io-stats.sql
sqlcmd -S "127.0.0.1,11433" -U saatadmin -C -i io-stats.sql -W
function Get-RdsMetric([string]$Name, [string]$Stat = 'Average', [int]$Minutes = 15) {
$end = (Get-Date).ToUniversalTime(); $start = $end.AddMinutes(-$Minutes)
$vals = aws cloudwatch get-metric-statistics --namespace AWS/RDS --metric-name $Name --dimensions Name=DBInstanceIdentifier,Value=saat-sql --start-time $start.ToString('o') --end-time $end.ToString('o') --period 60 --statistics $Stat --query "Datapoints[].$Stat" --output text
if ($Stat -eq 'Minimum') { ($vals -split '\s+' | ForEach-Object { [double]$_ } | Measure-Object -Minimum).Minimum } else { ($vals -split '\s+' | ForEach-Object { [double]$_ } | Measure-Object -Maximum).Maximum }
}
"WriteIOPS max: $(Get-RdsMetric WriteIOPS Maximum)"
"WriteLatency max s: $(Get-RdsMetric WriteLatency Maximum)"
"EBSIOBalance% min: $(Get-RdsMetric EBSIOBalance% Minimum)"You should see something like this:
db type_desc num_of_reads num_of_writes avg_read_ms avg_write_ms
SaatShop LOG 12 51840 0.8 0.6
SaatShop ROWS 3311 26402 2.1 1.4
tempdb LOG 9 61 0.7 0.9
tempdb ROWS 40 88 0.9 1.2
WriteIOPS max: 2950.4
WriteLatency max s: 0.0021
EBSIOBalance% min: 71Latency looks fine because the instance was bursting, and even so, a few minutes of load used nearly a third of its I/O burst balance. A normal daytime workload on db.t3.micro would drain it and the same writes would start to queue, which is what’s behind a lot of “it was fast this morning” tickets.

4Find tempdb and turn on autoscaling
Paste this whole block:
sqlcmd -S "127.0.0.1,11433" -U saatadmin -C -d tempdb -W -Q "SET NOCOUNT ON; SELECT name, physical_name, size * 8 / 1024 AS size_mb FROM sys.database_files"
aws rds modify-db-instance --db-instance-identifier saat-sql --max-allocated-storage 100 --apply-immediately --query "DBInstance.PendingModifiedValues" --output json | Out-Null
Start-Sleep 30
aws rds describe-db-instances --db-instance-identifier saat-sql --query "DBInstances[0].MaxAllocatedStorage" --output textYou should see something like this:
name physical_name size_mb
tempdev D:\rdsdbdata\DATA\tempdb.mdf 8
templog D:\rdsdbdata\DATA\templog.ldf 8
temp2 D:\rdsdbdata\DATA\tempdb2.ndf 8
100Here tempdb shares the D: data volume. On a class with instance store, the same query would show tempdb on its own fast local drive. With autoscaling on, saat-sql now grows up to 100 GiB when space runs low, so the database doesn’t stop with “disk full”.

✅ Checkpoint: You read the gp3 volume and the much lower instance baseline, generated about 200 MB of writes, measured per-file latency and EBSIOBalance%, found tempdb on D:, and set MaxAllocatedStorage to 100.
Break It, Then Fix It
Here are two storage walls that cost far less to learn about now than to hit at work.
1Break it: switch a small volume to io2
Try moving the 20 GiB volume to io2 with 1,000 IOPS:
aws rds modify-db-instance --db-instance-identifier saat-sql --storage-type io2 --iops 1000 --apply-immediatelyYou’ll get this error:
An error occurred (InvalidParameterCombination) when calling the ModifyDBInstance operation: Invalid storage size for engine name sqlserver-ex and storage type io2: 20
io2 on RDS for SQL Server starts at 100 GiB, and the obvious fix hides a trap: if you grow the volume to 100 GiB so io2 becomes possible, you can never shrink it again and you’ll pay for 100 GiB from then on. Fix: check the limits before you change storage, and try io2 on a restored copy (Lesson 52) instead of the original:
$v22 = aws rds describe-db-instances --db-instance-identifier saat-sql --query "DBInstances[0].EngineVersion" --output text
aws rds describe-orderable-db-instance-options --engine sqlserver-ex --engine-version $v22 --db-instance-class db.t3.micro --query "OrderableDBInstanceOptions[?StorageType=='io2'] | [0].[MinStorageSize,MinIopsPerDbInstance]" --output textYou should see something like this:
100 10002Break it: grow a database past the Express limit
Try pre-sizing SaatShop’s data file to 11 GB:
sqlcmd -S "127.0.0.1,11433" -U saatadmin -C -Q "ALTER DATABASE SaatShop MODIFY FILE (NAME = SaatShop, SIZE = 11GB)"You’ll get an error like this:
Msg 1827, Level 16, State 1, Server EC2AMAZ-ABC123, Line 1
CREATE DATABASE or ALTER DATABASE failed because the resulting cumulative database size would exceed your licensed limit of 10240 MB per database.Express limits each database to 10 GB of data however big the volume is, and in production you find out at the worst moment, when inserts fail with error 1105 or 1827 as the database tries to grow. Fix: keep Express for small databases that don’t matter much, and move to Standard for the rest (Lesson 53 shows how to change editions with a snapshot restore).
Now remove the test data and stop the lab:
sqlcmd -S "127.0.0.1,11433" -U saatadmin -C -d SaatShop -Q "DROP TABLE dbo.Big; DBCC SHRINKFILE (SaatShop_log, 64);"
Remove-Item io-work.sql, io-stats.sql
.\Stop-SqlLab.ps1You should see something like this:
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
stopping
Close the tunnel window if it is still open.✅ Checkpoint: io2 was refused below 100 GiB and Express refused an 11 GB file. The test table is gone, autoscaling is on and saat-sql is stopping.
This happened at work
The faster disk that didn’t help
An accounting firm ran its month-end close on RDS SQL Server, a db.t3.xlarge with 500 GiB of gp2. Every month-end the reports would crawl after about 30 minutes, so the team bought io1 with 10,000 IOPS, which doubled the storage bill.
Month-end was still slow. When someone finally opened CloudWatch, the reason was right there: EBSIOBalance% and EBSByteBalance% fell to zero 30 minutes into the run, and after that the instance class’s baseline bandwidth capped everything, far below what the io1 volume could give. Read latency went from 2 ms to over 40 ms.
In the end they moved to db.r6i.xlarge (non-burstable, with much more EBS bandwidth) on gp3 with 6,000 IOPS, which cost less than the io1 setup, and month-end finished in under an hour. Since then they alarm on burst balance below 30 percent for every burstable database.
Common mistakes and troubleshooting
| Mistake | What happens | What to do |
|---|---|---|
| Buying volume IOPS for a burstable instance | No improvement after burst credits run out | Check EBSIOBalance% and the instance limits first |
| Growing storage to try io2 | It can never shrink back, so the cost is permanent | Test on a restored copy |
| Express for growing databases | Error 1827 at 10 GB | Standard or above for anything that grows |
| No storage autoscaling | Database stops on a full disk | Set MaxAllocatedStorage and alarm on FreeStorageSpace |
| Ignoring log latency | Slow commits for every user | Watch avg_write_ms on the log files and keep it low |
| tempdb-heavy work on non-d classes | tempdb contention on shared storage | Consider d classes with instance store tempdb |
Interview questions
Click a question to open it. Each one is worded the way an interviewer would ask it, and underneath you’ll find why they ask and one way you could answer in your own words.
Fresher level
1. What’s the difference between gp3 and io2 storage, and when would you pick each for SQL Server?
Why they ask this: They want to know you understand the main storage options and what they cost, since the storage choice affects both database speed and the bill.
How you might answer: gp3 gives you a baseline of 3,000 IOPS and 125 MiB/s, and you can scale IOPS and throughput separately at low cost. With io2 you provision IOPS for steady, very high performance and better durability, but you pay more for it.
For most SQL Server workloads I’d start on gp3 and only move to io2 when the latency needs call for it.
2. A developer says the database feels slow and asks if the disks are the problem. How would you check SQL Server file latency?
Why they ask this: It’s a basic DBA skill check. They want to see you measure first instead of blaming the storage straight away.
How you might answer: I’d query sys.dm_io_virtual_file_stats and divide io_stall_read_ms and io_stall_write_ms by the number of reads and writes for each file. That gives the average latency per file, so I can tell whether it’s the data files or the log files that are slow.
3. You gave an RDS instance far more storage than it needs. Can you shrink it back down?
Why they ask this: They’re checking you know RDS storage limits, because that decides how carefully you size storage at the start.
How you might answer: No, RDS storage only grows. If I wanted smaller storage I’d have to migrate the database to a new instance, which is why I size it carefully up front and let autoscaling grow it when it needs to.
2–5 years experience
4. Database I/O is slow, but the volume still has spare IOPS. What would you check next?
Why they ask this: They want to see you look past the volume settings, because a lot of I/O problems come from the instance class or the workload and not the disk.
How you might answer: I’d look at the instance class EBS limits and its burst balances, EBSIOBalance% and EBSByteBalance%, compare throughput against the IOPS limits and check the queue depth.
After that I’d see whether CPU or memory pressure is causing extra reads, and whether the workload is held back by log writes.
5. Where does tempdb live on RDS for SQL Server?
Why they ask this: They’re checking you know how RDS lays out SQL Server internally, since where tempdb sits matters for heavy workloads.
How you might answer: By default it’s on the data volume, the D: drive. On instance classes with instance store, RDS puts tempdb on the local NVMe disk, which is faster.
6. How would you explain storage autoscaling on RDS to a new team member?
Why they ask this: They want to know you can prevent full-disk outages, because a full disk takes a database down fast.
How you might answer: I’d tell them it keeps an eye on free space, and when that runs low RDS raises the allocated storage by itself, up to the MaxAllocatedStorage limit we set. So the database doesn’t go down just because the disk filled up overnight.
Senior level
7. You’re asked to design storage for a 4 TB OLTP SQL Server on RDS that peaks at 20,000 IOPS. How would you approach it?
Why they ask this: They want to see capacity planning that covers the instance, the storage and monitoring, and that you test the design instead of guessing.
How you might answer: First I’d pick a non-burstable instance class with enough EBS bandwidth for the peak throughput, because the instance can be the bottleneck even when the disk isn’t. For storage, gp3 with provisioned IOPS and throughput, or io2 if the latency SLAs need it.
Then I’d turn on autoscaling with some headroom, set alarms on latency, queue depth and free space, and load test on a restored copy before go-live.
8. Someone wants to move a database to io2 because it should be faster. How would you prove it’s worth the extra cost?
Why they ask this: io2 costs more, so they want to hear that you decide on evidence and test before you spend.
How you might answer: I’d restore a snapshot to a test instance and replay a captured workload on gp3 with tuned IOPS first, then on io2, and compare the latency percentiles and throughput.
I’d also check whether the instance class is what’s really limiting things, because if it is, io2 won’t help.
Quick quiz
Q1. What baseline does gp3 include?
- 100 IOPS
- 3,000 IOPS and 125 MiB/s
- 16,000 IOPS
- None
Show answer
B: gp3 includes 3,000 IOPS and 125 MiB/s.
Q2. Why might more volume IOPS not help a db.t3 instance?
- gp3 is broken
- The instance class EBS limit is lower
- SQL Server ignores IOPS
- Express blocks it
Show answer
B: burstable classes have low baselines.
Q3. What is the minimum io2 size on RDS for SQL Server?
- 20 GiB
- 50 GiB
- 100 GiB
- 1 TiB
Show answer
C: and remember storage can never shrink.
Q4. What limit did Express hit at 11 GB?
- Volume size
- 10 GB per database licence limit
- IOPS
- tempdb
Show answer
B — Error 1827.
Q5. Where does RDS put tempdb on d instance classes?
- S3
- Local NVMe instance store
- A second gp3 volume
- Memory only
Show answer
B: tempdb goes on the fast local disk.
Quick recap
- I/O is limited by the instance class, the volume and the file layout, and whichever is lowest wins.
- On burstable classes, keep an eye on EBSIOBalance% and EBSByteBalance%.
- gp3 is enough for most workloads. io2 starts at 100 GiB, and storage never shrinks.
- Measure latency with sys.dm_io_virtual_file_stats and CloudWatch.
- Turn on storage autoscaling, and remember Express stops at 10 GB per database.
Next lesson
Lesson 44: Secure RDS SQL Server: KMS, TLS, security groups → Next you’ll force encrypted connections, check the server certificate properly and lock down network access to saat-sql.
Further reading: SQL Server storage on AWS
Want to go deeper into SQL Server storage on AWS? Read Amazon RDS DB instance storage and Instance store support for the tempdb database on Amazon RDS for SQL Server. You can also see the full plan for this course on the AWS Cloud Administration course page.
