How are gp3 and io2 billed on RDS?

On RDS, the storage type determines which dimensions you pay for. Both gp3 and io2 charge per GB-month of allocated storage. They differ in how they charge for performance.

Dimension gp3 io2
Allocated storage Per GB-month Per GB-month, at a higher rate than gp3
IOPS Baseline included; IOPS above baseline billed per IOPS-month Every provisioned IOPS billed per IOPS-month
Throughput Baseline included; extra billed per MiB/s-month Not billed separately; scales with provisioned IOPS
Cost shape Flat until you exceed baseline Linear in provisioned IOPS from the first unit

With io2, the IOPS line item grows linearly. Doubling provisioned IOPS doubles that charge, whether or not the workload uses the IOPS. You pay for the ceiling you reserve, not for the I/O you consume.

On RDS, the gp3 baseline is tied to allocated storage. Below a size threshold, the instance gets a fixed baseline of IOPS and throughput, and for most engines you cannot provision more. Above the threshold, the baseline rises to a higher fixed level, and you can provision additional IOPS and throughput on top. Because of this step, growing allocated storage past the threshold can buy more performance than paying for io2 IOPS at a smaller size, even if the extra space goes unused.

The thresholds, baselines, allowed ratios and per-unit prices vary by engine and region and change over time. Check the current RDS documentation and pricing pages for PostgreSQL in your region rather than relying on any figures in this article.

Snapshot and backup storage is billed separately and does not depend on whether the volume is gp3 or io2.

How do gp3 and io2 work under RDS?

Both storage types are SSD-backed EBS volumes that RDS attaches to the database instance and manages for you. You never attach or format the volumes yourself. You choose a storage type, an allocated size and, where allowed, provisioned IOPS and throughput, and RDS configures the underlying EBS storage to match.

gp3 is the general-purpose SSD type. Its performance is a fixed allocation: a baseline of IOPS and throughput, plus anything extra you provision above the size threshold. Unlike the older gp2 type, gp3 has no burst credit bucket. The volume does not run fast for a while and then fall back to a lower rate. It delivers up to its configured limits continuously, and requests beyond those limits queue.

io2 is the provisioned IOPS SSD type. You set an IOPS figure, and the volume is built to deliver that rate with more consistent per-operation latency than general-purpose storage. Throughput rises with provisioned IOPS rather than being configured on its own.

Three limits apply to every request Postgres makes, and whichever is reached first sets the effective ceiling:

  1. The volume's IOPS limit. Many small random operations, such as index lookups and WAL flushes, hit this limit first.
  2. The volume's throughput limit. Large sequential operations, such as sequential scans, vacuum and index builds, hit this limit first.
  3. The instance class's EBS limit. This applies regardless of what the volume could deliver.

When demand exceeds the active limit, requests wait. The waiting appears in CloudWatch as rising DiskQueueDepth and higher ReadLatency or WriteLatency. In Postgres it appears as sessions waiting on I/O. The volume type changes the limit and how steady latency stays near it. It does not change how much I/O Postgres generates. That depends on the workload and configuration covered in the next section.

What drives IOPS in a Postgres database?

Postgres generates storage I/O from four main sources. Each has a different shape, and that shape determines which volume characteristics matter.

Reads that miss memory. Postgres first checks shared_buffers, then the operating system page cache. A read that misses both goes to the volume. If your hot working set (frequently touched tables and indexes) fits in RAM, read IOPS stay low regardless of query volume. Once the working set outgrows memory, every random index lookup can become a storage read, and read IOPS rise with traffic. This is the most common reason a database suddenly "needs" more IOPS.

WAL writes. Every committed change is written to the write-ahead log and flushed before the commit returns. These writes are small, sequential and latency-sensitive. Commit latency follows storage write latency directly, so high-commit-rate workloads are often bound by latency rather than by IOPS.

Checkpoints. At each checkpoint, dirty pages are written from shared buffers to the data files. checkpoint_completion_target spreads this work across the checkpoint interval, but heavy write workloads still produce periodic surges. After a checkpoint, the first change to each page also writes a full page image to WAL, which temporarily increases WAL volume.

Maintenance. Autovacuum, CREATE INDEX and REINDEX on large tables read and write large amounts of data. They often cause throughput spikes rather than IOPS spikes.

Taken together, these sources describe a profile: baseline IOPS, peak IOPS, throughput and latency sensitivity. Measure that profile first, then choose the volume type that fits it.

How do you measure what your RDS Postgres instance actually needs?

Start with the instance class, not the volume. Every RDS instance class has a ceiling on EBS bandwidth and IOPS, published in the AWS instance class documentation. If your measured peak already sits near that ceiling, provisioning more IOPS on gp3 or io2 buys nothing because the instance cannot drive them. In that case the fix is a larger instance class, possibly in addition to faster storage, and the cost comparison has to include it.

Next, pull the CloudWatch metrics in the AWS/RDS namespace for your DBInstanceIdentifier. These are ReadIOPS, WriteIOPS, ReadThroughput, WriteThroughput, ReadLatency, WriteLatency and DiskQueueDepth. Use aws cloudwatch get-metric-statistics with a 60-second --period over at least a full business cycle, typically a week or a month-end. Request Maximum and percentile values through --extended-statistics, not just Average. A five-minute or hourly average flattens a 30-second checkpoint burst into noise.

Then explain the spikes. Enable log_checkpoints and set log_autovacuum_min_duration so the logs show when each one runs, and match those timestamps against the metric peaks and your batch job schedules. Performance Insights confirms whether sessions actually waited on storage. Look for high IO:DataFileRead or WAL-related IO waits during the same windows. Rising DiskQueueDepth and latency together mean the volume is saturated. High IOPS with flat latency means it is coping.

Finally, pick a sizing target. Provisioning for the absolute maximum pays all month for a few minutes of load. Sizing to the average guarantees throttling. A p99 or p99.9 of one-minute samples is a common compromise. Be explicit about what that choice means: during the remaining bursts, queries will slow down. Decide whether that is acceptable, or whether you can move or spread out the job that causes those bursts.

#!/usr/bin/env bash
set -euo pipefail

DB_ID="orders-prod-db"   # placeholder DBInstanceIdentifier
DAYS=7
METRICS="ReadIOPS WriteIOPS ReadThroughput WriteThroughput ReadLatency WriteLatency DiskQueueDepth"

for metric in $METRICS; do
  for ((d = DAYS; d > 0; d--)); do
    start=$(date -u -d "-${d} days" +%Y-%m-%dT%H:%M:%SZ)   # GNU date
    end=$(date -u -d "-$((d - 1)) days" +%Y-%m-%dT%H:%M:%SZ)

    # Maximum shows true peaks; p99/p99.9 per minute are candidate sizing
    # targets. Average is kept only for contrast: it hides short bursts.
    aws cloudwatch get-metric-statistics \
      --namespace AWS/RDS \
      --metric-name "$metric" \
      --dimensions Name=DBInstanceIdentifier,Value="$DB_ID" \
      --start-time "$start" --end-time "$end" \
      --period 60 \
      --statistics Average Maximum \
      --extended-statistics p99 p99.9 \
      --output json > "${DB_ID}_${metric}_day${d}.json"
  done
done

Pulls one-minute Average, Maximum, p99 and p99.9 values for the RDS IO metrics, one day per call to stay under the 1,440-datapoint limit, so peaks can be matched to checkpoints, autovacuum and batch jobs.

Illustrative estimate: where does io2 cost more than gp3?

That compromise only makes sense once you've priced the alternative. The model below uses assumed unit prices so you can follow the arithmetic and plug in your own rates.

Illustrative estimate (assumed numbers, not a benchmark)

Assumed inputs, for one volume:

  • Storage size (S): 500 GB
  • gp3: $0.10 per GB-month, with a baseline of 12,000 IOPS included (B), and $0.02 per extra IOPS-month
  • io2: $0.125 per GB-month, and $0.10 per provisioned IOPS-month, with no included baseline
  • Throughput charges are ignored.

The formulas:

  • gp3 = S × gp3 GB price + max(0, IOPS − B) × gp3 IOPS price
  • io2 = S × io2 GB price + IOPS × io2 IOPS price
IOPS target gp3 monthly io2 monthly io2 premium
5,000 (low) $50 $562.50 $512.50
20,000 (moderate) $210 $2,062.50 $1,852.50
40,000 (high) $610 $4,062.50 $3,452.50

With these assumptions, io2 is never cheaper. It bills every IOPS at a higher rate and includes none for free, so the gap widens as IOPS rise. You can only get a crossover by changing the inputs. Check your actual per-IOPS rates, any tiered io2 pricing, and gp3's IOPS ceiling. If you need more IOPS than gp3 can provision, the cost comparison no longer decides anything.

Now apply this to a full topology. A Multi-AZ instance deployment keeps a standby volume, which roughly doubles storage and IOPS spend. Each read replica adds its own volume on top of that. Take the moderate case with Multi-AZ and two replicas sized like the primary, which gives four volumes:

  • gp3: about $840 per month
  • io2: about $8,250 per month

You may be able to provision replicas with fewer IOPS. Do not reuse these figures as quotes; price your region and engine with current rates.

 Illustrative estimate (assumed prices): 500 GB and 20,000 IOPS per volume
 gp3/vol = 500 x $0.10  + (20,000 - 12,000) x $0.02 = $210.00
 io2/vol = 500 x $0.125 + 20,000 x $0.10             = $2,062.50

 +--------------------------+        +--------------------------+
 | Primary instance (AZ-a)  |--sync->| Multi-AZ standby (AZ-b)  |
 | Volume 1: 500 GB         |        | Volume 2: 500 GB         |
 | gp3 $210 / io2 $2,062.50 |        | gp3 $210 / io2 $2,062.50 |
 +--------------------------+        +--------------------------+
              |
              +-----------------------------------+
              | async                             | async
              v                                   v
 +--------------------------+        +--------------------------+
 | Read replica 1           |        | Read replica 2           |
 | Volume 3: 500 GB         |        | Volume 4: 500 GB         |
 | gp3 $210 / io2 $2,062.50 |        | gp3 $210 / io2 $2,062.50 |
 +--------------------------+        +--------------------------+

 +--------------------------------------------------------------+
 | Topology total, 4 volumes (illustrative, not a quote)        |
 |   gp3: 4 x $210.00   = ~$840 / month                         |
 |   io2: 4 x $2,062.50 = ~$8,250 / month                       |
 +--------------------------------------------------------------+

Illustrative estimate using assumed unit prices: in a Multi-AZ deployment with two read replicas at the moderate 20,000 IOPS target, each of the four volumes is billed separately, so the per-volume gap between gp3 ($210) and io2 ($2,062.50) is multiplied by four.

What are the alternatives to buying more provisioned IOPS?

Before changing volume type, check whether the workload needs that many IOPS. Each of the following fixes reduces the I/O that Postgres sends to storage.

Start by finding the queries that read from disk. In pg_stat_statements, sort by shared_blks_read (blocks not found in shared buffers) rather than by execution time. In pg_statio_user_tables, compare heap_blks_read with heap_blks_hit to find tables that keep missing cache. The SQL appears below.

Fix What it reduces Example change Holds as data grows?
Larger instance class (more RAM) Read IOPS, because more of the working set stays cached Move to a class with roughly double the memory Only while the hot data fits in memory
Checkpoint tuning Write spikes, because dirty pages are flushed over a longer window Raise max_wal_size and set checkpoint_completion_target near 0.9 Mostly, though recovery after a crash takes longer
Autovacuum tuning Bloat, so scans touch fewer dead pages Lower autovacuum_vacuum_scale_factor on large tables and raise autovacuum_vacuum_cost_limit Yes, if you review it as write volume changes
Index fixes Sequential scans and index bloat Add missing indexes, drop unused ones, rebuild bloated ones with REINDEX CONCURRENTLY Needs revisiting when query patterns change

None of these fixes is free. Each one takes engineering time to diagnose and test. A RAM upgrade can also cost more than the extra IOPS it replaces. Growth in data or traffic can undo the gains.

Repeated storage changes also take time. RDS restricts how soon you can modify storage again, and every change needs planning and monitoring. Lowering I/O demand first means the next IOPS purchase is sized to the real workload, which makes it less likely you will need to resize again soon.

-- 1. Queries that read the most blocks from disk (not from shared_buffers).
-- Requires the pg_stat_statements extension (in shared_preload_libraries on RDS).
SELECT
  left(query, 80)                       AS query_start,
  calls,
  shared_blks_read,                     -- blocks fetched from storage or OS cache
  shared_blks_hit,                      -- blocks served from shared_buffers
  round(100.0 * shared_blks_hit
        / nullif(shared_blks_hit + shared_blks_read, 0), 1) AS hit_pct
FROM pg_stat_statements
ORDER BY shared_blks_read DESC
LIMIT 10;

-- 2. Tables whose heap and index pages keep missing the cache.
SELECT
  schemaname,
  relname,
  heap_blks_read,
  heap_blks_hit,
  round(100.0 * heap_blks_hit
        / nullif(heap_blks_hit + heap_blks_read, 0), 1) AS heap_hit_pct,
  idx_blks_read,
  idx_blks_hit
FROM pg_statio_user_tables
ORDER BY heap_blks_read DESC
LIMIT 10;

-- 3. Example per-table autovacuum override for a large, write-heavy table:
-- vacuum after ~2% of rows change instead of the 20% default.
-- (Cluster-wide settings such as max_wal_size, checkpoint_completion_target
-- and autovacuum_vacuum_cost_limit are set in the RDS parameter group.)
ALTER TABLE public.orders SET (autovacuum_vacuum_scale_factor = 0.02);

-- 4. Rebuild a bloated index without blocking writes (Postgres 12+).
REINDEX INDEX CONCURRENTLY public.orders_customer_id_idx;

Diagnostic queries against pg_stat_statements and pg_statio_user_tables to find disk-heavy queries and cache-missing tables, followed by an example autovacuum override and a concurrent index rebuild (public.orders and its index are placeholder names).

When should you choose io2, and when should you avoid it?

io2 earns its price when tail latency is the requirement. The clearest case is latency-sensitive OLTP with high, sustained random I/O: many concurrent point lookups and small writes, a working set larger than shared buffers and the page cache, and WAL flushes on every commit. gp3 can deliver its provisioned IOPS, but under heavy load its per-operation latency tends to vary more. A few slow reads or fsyncs per second are enough to push p99 query times past an SLO even when the averages look fine. io2 is designed for more consistent latency, and AWS also documents higher volume durability for it. Check both claims in current AWS documentation before you rely on them.

This is why cost per IOPS misleads when used alone. If a missed p99 target means timeouts, retries, or a breached contract, compare the cost of each option against the cost of those failures, not against the other volume's price sheet.

Situation Better fit Why
Sustained high random I/O, strict p99 SLO io2 More consistent latency under load
Modest or spiky load gp3 Baseline IOPS absorbs it at lower cost
Sized after a one-off spike (migration, backfill) gp3 Provisioned IOPS are billed every hour, not only during the spike
Provisioned IOPS above the instance's EBS limit Neither, resize first The instance cannot use IOPS beyond its limit

The last row is the most common source of waste. Every instance class has a maximum EBS throughput and IOPS, so any IOPS you buy above that limit are paid for and never delivered. For most Postgres workloads, gp3 remains the default. Move to io2 when measured tail latency, rather than a single peak, shows that gp3 can't meet the SLO.

Who should use gp3, who should use io2, and who should run this analysis?

This comparison is for engineers who own RDS for PostgreSQL instances and their bills: application teams running their own databases, platform and DBA teams managing a fleet, and anyone reviewing a storage line item that has grown faster than the data. It applies to RDS instances that use EBS storage. Aurora PostgreSQL uses a different storage and billing model, so the gp3 versus io2 choice does not apply there.

gp3 fits most teams. That includes:

  • Teams running general OLTP, SaaS backends and internal tools.
  • Teams running reporting databases and staging or test environments.
  • Teams whose working set mostly fits in memory.
  • Teams whose latency targets tolerate occasional slower I/O.

If you have not measured tail latency against an SLO, you are in this group by default.

io2 fits a narrower group. These are teams whose measurements show sustained high random I/O and a strict p99 or p99.9 latency target, where a breach has a real cost such as timeouts, failed payments or contractual penalties. These teams should also have already confirmed that the instance class is not the bottleneck.

Run the measurement and tuning steps in this article if any of the following is true:

  • You are deciding a volume type for a new production database.
  • You are about to raise provisioned IOPS.
  • You inherited an io2 instance and do not know why it was chosen.
  • You are planning Multi-AZ or adding read replicas, which multiplies every per-volume decision.

How can this approach save engineering time?

Most of the time cost in storage decisions comes from rework, not from the change itself. A wrong IOPS figure leads to another modification, another cooldown, another monitored storage-optimization window, and sometimes an incident. Allocated storage that was raised unnecessarily can only be reclaimed through a dump and restore. Working through the steps in order cuts down that rework.

  • Measure once and reuse the results. The CloudWatch script and the pg_stat_statements queries are reusable. Run them before every storage change and at each capacity review. They answer "do we need more IOPS?" with data, not with a debate about which graph to trust.
  • Rule out the instance limit first. Checking the instance class's EBS ceiling before touching storage avoids a storage migration that cannot help.
  • Fix the cause before buying capacity. Cache misses, checkpoint surges and bloat can often be fixed with configuration and index changes, and these do not trigger a storage cooldown. Any later IOPS purchase is then sized to the real workload, not to a symptom.
  • Plan migrations instead of firefighting. Rehearsing on a snapshot restore tells you how long storage optimization takes for your data size. You can then schedule the production change in a known window. Starting it during an incident adds load while the database is already struggling.
  • Make the decision explicit. Write down the sizing target (for example, p99 of one-minute samples), the reason for the volume type and the instance class limit. The next engineer can then review the choice without repeating the whole investigation.

Illustrative estimate (assumed inputs, not a measured result). Assume one storage modification cycle costs an engineer about half a day: planning, applying, watching the storage-optimization window and checking latency afterwards. Assume an unmeasured sizing guess needs two follow-up corrections. Under those assumptions, a guess costs about a day and a half of engineering time across three cycles. A measured decision that lands correctly the first time costs the half day of the single change plus the time to run the measurement scripts. Substitute your own team's figures. The pattern holds whenever corrections are more likely without measurement.

How do you migrate an RDS Postgres instance between gp3 and io2?

The change itself is a single aws rds modify-db-instance call: set --storage-type to io2 or gp3, pass --iops (and --storage-throughput when targeting gp3 above its baseline), and choose between --apply-immediately or waiting for the maintenance window. The instance stays available, but the call only starts the work. RDS then moves the volume's data in the background. On a large database this can take hours, sometimes longer, and I/O latency can rise while it runs. That is why this is a planned change, not something to reach for during an incident. If the database is already struggling, the migration adds load at the worst moment.

Two constraints make mistakes expensive:

  • A cooldown between storage modifications. After a change, RDS blocks further storage modifications until optimization finishes and a minimum waiting period (documented as six hours) has passed. If you pick the wrong IOPS figure, you keep paying for it, or suffering under it, until the cooldown ends.
  • Allocated storage generally cannot be shrunk. If you raise allocated storage to meet an io2 or gp3 requirement, the extra gigabytes stay on the bill. Getting them back means dumping and restoring into a new instance, which takes far more engineering time than the original change.

Rehearse the migration on an instance restored from a recent snapshot. This tells you roughly how long optimization takes for your data size and how much latency your workload sees during it. In production, schedule the change well ahead of peak traffic. While it runs, watch the instance status in describe-db-instances until it leaves storage-optimization. Also track ReadLatency, WriteLatency and DiskQueueDepth in CloudWatch, along with Postgres-side query latency.

#!/usr/bin/env bash
set -euo pipefail

SNAPSHOT="orders-db-2026-11-07"
REHEARSAL="orders-db-io2-rehearsal"

aws rds restore-db-instance-from-db-snapshot \
  --db-instance-identifier "$REHEARSAL" \
  --db-snapshot-identifier "$SNAPSHOT" \
  --db-instance-class db.r6g.xlarge
aws rds wait db-instance-available --db-instance-identifier "$REHEARSAL"

aws rds modify-db-instance \
  --db-instance-identifier "$REHEARSAL" \
  --storage-type io2 \
  --iops 12000 \
  --apply-immediately

START=$(date -u +%Y-%m-%dT%H:%M:%SZ)
while true; do
  STATUS=$(aws rds describe-db-instances --db-instance-identifier "$REHEARSAL" \
    --query 'DBInstances[0].DBInstanceStatus' --output text)
  echo "$(date -u +%H:%M:%S) status=$STATUS"
  # Wait for at least one non-available status first so the loop does not exit early.
  [[ "$STATUS" == "available" && -n "${SEEN_CHANGE:-}" ]] && break
  [[ "$STATUS" != "available" ]] && SEEN_CHANGE=1
  sleep 300
done

aws cloudwatch get-metric-statistics --namespace AWS/RDS --metric-name WriteLatency \
  --dimensions Name=DBInstanceIdentifier,Value="$REHEARSAL" \
  --start-time "$START" --end-time "$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
  --period 300 --statistics Average Maximum --output table

A bash rehearsal script that restores a snapshot, switches the copy to io2, waits for storage optimization to finish while timing it, and then pulls CloudWatch write latency for that window.

How OneEnv can help

Disclosure: OneEnv is the product behind this blog.

OneEnv (oneenv.io) is a workspace-based governance platform for the things services share — environment variables, database structure, API routes and validation rules. A change to a shared value is staged on a branch, reviewed once, and then every affected service explicitly approves or rejects it before it goes live, so you can see who a change touches before it ships instead of finding out in production.

Applied to rds gp3 vs io2, this is where it helps:

Saves time

  • Every service that inherits a shared value is listed in one place, so nobody searches repos and chats to find out who is affected.
  • One review per branch replaces coordinating each team separately; each service still keeps its own approve/reject.
  • Changing a shared variable is one edit and one review instead of editing every service's .env by hand.

Saves cost

  • Fewer production incidents and rollbacks caused by a shared value, route or column changing under a consumer unannounced.
  • Less duplicated configuration to maintain: one shared definition inherited by many services.
  • A wrong or stale value is caught at review time by the services it affects, not by a failed deploy.
  • OneEnv has a free plan (1 workspace, unlimited services and members, full governance), so trying it costs nothing.

These are qualitative benefits, not measured results — how much you save depends on how many services share the value.

Want to try it? Start at oneenv.io.