SurferCloud: VPS Hosting in Los Angeles and S
SurferCloud is a leading provider of Virtual Private Se...




Write amplification is a setting you choose, not a property of the disk you rent — and on the SurferCloud UHost line, where a dedicated-vCPU cloud server with 40 GB of system disk starts at $24.25/mo and the 120 GB tier is $49.11/mo, the difference between those two rows is often the difference between a database that fits its own log and one that does not. The gap is not corruption, not a leak, and not a bad drive. It is full page images, emitted on a checkpoint schedule you configured and probably never looked at again, and it can turn a few hundred megabytes of daily row changes into nine gigabytes of daily disk writes.
That is why this article starts with the plan table rather than ending on it. A primary database needs two things no configuration can invent: disk headroom for the log, the base files and temporary sorts at the same time, and bandwidth that is not shared with a neighbour's checkpoint flush. The promotional pricing table is organised around exactly those two, and the arithmetic below tells you which row you actually need — including the one row you should skip even though it is the cheapest.
Storage is sold on IOPS and throughput, both measured with a synthetic workload that writes large sequential blocks. A transactional database does not write large sequential blocks. It writes short append-only records to a log, then forces that log to durable media before telling the client the transaction committed. The cost of that force is one flush, and the number of flushes per second is bounded by how fast the media acknowledges a flush — a completely different measurement from the 4K random-write figure on the datasheet.
So there are two independent multipliers, and neither is a property of the disk:
Both are decisions. Fixing the first is a configuration change and costs nothing. Fixing the second is a code review. Buying a faster disk fixes neither, which is why the same "slow database" complaint survives an instance upgrade roughly as often as it survives a reboot — and why the platform's own positioning on that page is worth reading literally: it declines to compete on being the cheapest and instead claims it does not oversell or inflate benchmarks. On a write-bound database those are the properties that matter, because a shared allocation makes your checkpoint flush depend on someone else's traffic at the exact moment you need predictability.
PostgreSQL's storage unit is an 8 kB page. A crash can interrupt the write of a page mid-flight, leaving the on-disk version with a mix of old and new bytes — a torn page. Row-level change records cannot repair a torn page, because they describe a delta against a base that no longer exists in a consistent form. The fix is blunt: write the entire page into the log before modifying it, so recovery has an authoritative copy.
The documentation is explicit about the trigger and the cost. With full_page_writes on — and the default is on — the server writes the entire content of each disk page to WAL during the first modification of that page after a checkpoint, storing the full page image "at the price of increasing the amount of data that must be written to WAL."
| Component | Bytes | Notes |
|---|---|---|
| Row delta record | ~150 | Tuple data plus record header, order of magnitude |
| Full page image | 8,192 | One 8 kB page, emitted once per page per checkpoint cycle |
| Total WAL for that change | ~8,342 | Amplification of roughly 55× against the 150-byte delta |
The important word is first. A page pays for its image once per checkpoint cycle, not once per update. Touch the same page two hundred times between checkpoints and the image amortises to forty bytes per change. Touch it once and you pay full price. Amplification is therefore not a constant you can look up: it is a function of how many distinct pages your workload touches per checkpoint, divided by how many times it touches each one.
Two consequences follow, and they pull in opposite directions, which is the whole difficulty:
Because the image is per distinct page per checkpoint, the write rate from page images alone is:
| Term | Expression |
|---|---|
| Bytes per checkpoint | distinct pages touched × 8,192 |
| Bytes per second | that total ÷ checkpoint interval in seconds |
| Bytes per day | bytes per second × 86,400 |
checkpoint_timeout defaults to five minutes; checkpoint_completion_target defaults to 0.9, which spreads the flush across almost the entire interval. Take three plausible hot-set sizes — 1,000, 4,000 and 10,000 distinct pages, meaning 8 MB, 32 MB and 80 MB of actively written data — and evaluate the floor at three intervals:
| Pages touched per cycle | At 5 min (default) | At 15 min | At 30 min |
|---|---|---|---|
| 1,000 (8 MB hot set) | 2.36 GB/day | 0.79 GB/day | 0.39 GB/day |
| 4,000 (32 MB hot set) | 9.44 GB/day | 3.15 GB/day | 1.57 GB/day |
| 10,000 (80 MB hot set) | 23.6 GB/day | 7.86 GB/day | 3.93 GB/day |
Read the middle row against the 40 GB of disk on the $24.25 tier. A 32 MB hot set, changing a few hundred megabytes of rows a day, is asked to write 9.44 GB a day of page images — not accumulating, because segments are recycled at checkpoint, but passing through the same volume at a sustained rate. Move the interval from five minutes to fifteen and that becomes 3.15 GB, a two-thirds reduction from one number in a configuration file. On the 120 GB row it is immaterial; on the 40 GB row, headroom has to absorb this plus the base files plus temporary sorts, and that is the calculation the cheaper tier quietly skips.
The trade should be stated rather than buried: max_wal_size and checkpoint_timeout bound how long recovery takes after a crash. A thirty-minute interval means up to thirty minutes of WAL to replay before connections are accepted. If your recovery time objective is two minutes, you cannot take this trade and you should be paying for write headroom instead of reducing writes. That is a legitimate reason to spend money.
One honest caveat about disk space, because this is where people buy capacity they do not need. Steady-state WAL usage is bounded by max_wal_size — 1 GB by default — since segments are recycled at checkpoint. Nine gigabytes a day does not mean nine gigabytes accumulate. What accumulates without bound is WAL that cannot be recycled: the documentation names heavy load, a failing archive_command or a high wal_keep_size as conditions under which WAL exceeds the soft limit. A stalled archiver is a far more common cause of a full disk than amplification is, and its failure signature is one of the four distinct failures behind "No space left on device".
Until last month you could count page images but not weigh them. pg_stat_wal had wal_fpi — total number of full page images generated — and you multiplied by 8,192 to estimate. That was close enough to be useful and wrong enough to be embarrassing in a capacity review, because it silently assumed every image was a full block and ignored compression.
PostgreSQL 19 was released on 19 November 2026, and its release notes contain this item: "Add reporting of the bytes written to WAL for full page images (Shinya Kato)", accessible through the pg_stat_wal view and the pg_stat_get_backend_wal() function. The view now carries wal_fpi_bytes, described as "Total amount of WAL full page images in bytes". The same measurement was added to VACUUM and ANALYZE logging and to EXPLAIN (ANALYZE, WAL) output, so amplification can be attributed to a single maintenance operation instead of to the cluster as a whole.
| Column | Type | Documented meaning |
|---|---|---|
wal_records |
bigint | Total number of WAL records generated |
wal_fpi |
bigint | Total number of WAL full page images generated |
wal_bytes |
numeric | Total amount of WAL generated in bytes |
wal_fpi_bytes |
numeric | Total amount of WAL full page images in bytes |
wal_buffers_full |
bigint | Number of times WAL data was written to disk because WAL buffers became full |
stats_reset |
timestamp with time zone | Time at which these statistics were last reset |
The single number worth watching is wal_fpi_bytes / wal_bytes. If page images are a third of your log volume, you have a configuration problem worth about a third of your write bandwidth. If they are two-thirds, the workload is wide and shallow and the interval is too short for it, and no disk will make that go away. Sample twice, ten minutes apart, and divide the deltas — the view is cumulative since reset, so raw values tell you almost nothing.
Note also that the flush counters moved. Older releases exposed wal_write, wal_sync, wal_write_time and wal_sync_time on this view; in current releases the equivalent per-object figures live in pg_stat_io, where rows with object = 'wal' carry fsyncs and fsync_time, and the timing columns populate only when track_wal_io_timing is enabled. That is why half your panels go blank after an upgrade.
Amplification decides how many bytes reach the device. The commit path decides how many times you stop and wait for the device to acknowledge them. Both matter, and they are routinely confused.
On Linux the default wal_sync_method is fdatasync; the documentation notes the default is not necessarily ideal and may need changing to achieve a crash-safe or optimal configuration. What you want is the average flush acknowledgement time on your specific volume, and PostgreSQL ships a tool for it: pg_test_fsync reports average file sync operation time in microseconds for each method. Its own documentation is blunt about the limits — differences shown "might not make any significant difference in real database throughput, especially since many database servers are not speed-limited by their write-ahead logs."
Take that sentence seriously before optimising. On a store acknowledging a flush in 200 microseconds, a single-threaded commit stream caps near 5,000 commits per second no matter how much CPU you add — and if your workload issues 800 commits a second, you were never limited by flush latency at all. The formula is one division:
sustainable commits per second ≈ concurrent committers ÷ flush latency
The numerator is where the leverage is, and it is why the hourly line on this platform is priced the way it is. Group commit raises the numerator by letting transactions that arrive during an in-flight flush ride along with it; commit_delay — default zero — deliberately holds the leader for a configured interval so more can join, and applies only when at least commit_siblings others are active (default five). Since version 9.3 the first process ready to flush waits the interval while later arrivals wait only until the leader completes, which is why the setting is far more useful now than historically. PostgreSQL 19 added wait events for commit_delay and for WAL write and flush LSNs, so the wait is visible in pg_stat_activity instead of inferred.
If commit latency is the complaint, determine whether sessions wait on a flush or on a lock before touching storage. The distinction between a commit that is slow because the device is busy and one that is slow because a standby must acknowledge it is not cosmetic — the cross-region case is a round trip, and it is treated as a commit ceiling in the replication lag budget article.
Almost every amplification investigation starts with a metric that has already been misread. These six account for most of them, and each has a counter that settles the question in one query.
| What you observe | What it usually is | What settles it |
|---|---|---|
| iowait spikes at a fixed interval, roughly every five minutes | The page-image wave immediately after each checkpoint, not degradation | pg_stat_io write timing for object = 'wal', compared against a wal_fpi_bytes delta |
| Commit latency doubled, per-flush time unchanged | Twice as many flushes, not slower flushes | fsyncs delta divided by xact_commit delta |
| Device utilisation pinned at 100% with low throughput | Queue depth, not saturation — utilisation is not a capacity measure | Worked through in why iowait is not a disk metric |
wal_buffers_full climbing |
WAL written ahead of commit because buffers filled — often harmless | Compare against the wal_bytes rate; buffers are 1/32 of shared_buffers by default |
| Free memory falling while writes slow down | Page cache writeback, not the database | PSI io full; the reclaim loop is in the swap death spiral analysis |
| Disk benchmarks fast, database slow | Benchmark measured sequential write; the database issues 8 kB flushes | pg_test_fsync for flush time, not fio for throughput |
Two deserve extra suspicion. A periodic spike aligned with the checkpoint interval is not a device problem — it is your own configuration, arriving on schedule, and the correct response is the arithmetic above rather than a support ticket. And a rising wal_buffers_full reads like an alarm but is closer to a note: it counts times WAL was written out because buffers filled before commit, which under sustained write load happens constantly.
wal_fpi_bytes / wal_bytes over ten minutes. One query, no risk. If page images are under 10% of WAL, stop — this is not your problem and you should look at the commit path instead.wal_compression defaults to off. It compresses the page images written to WAL and decompresses them during replay. As of PostgreSQL 19, on selects the best available method among zstd, lz4 and pglz, where it previously always used pglz — the same setting buys more than it used to. Cost: CPU on the write path and during recovery. A table of already-compressed or encrypted content will barely compress.max_wal_size with it. These move together or not at all; raising only the timeout while leaving 1 GB of WAL allowance causes checkpoints to fire on volume instead of time, producing exactly the behaviour you were avoiding. Cost: longer crash recovery.synchronous_commit = off, with the cost stated. It removes the wait. After an operating-system or database crash some recently reported commits may be missing, but the state is the same as if they had been cleanly aborted, so there is no inconsistency risk. The maximum window is three times wal_writer_delay. Whether that is acceptable is a product decision, not a tuning decision.One item belongs on a do-not list. Turning full_page_writes off does reduce WAL volume, and the documentation's warning is unambiguous: it "might lead to either unrecoverable data corruption, or silent data corruption, after a system failure", with risks similar to disabling fsync. Silent corruption found during recovery is not a performance trade; it is a data-loss decision dressed as one.
Step six is where the plan stops being interchangeable. Two things a write-heavy primary needs cannot be configured into existence: headroom on the system disk for WAL plus base plus temporary files, and bandwidth that is not shared with a neighbour's checkpoint.
UHost is the elastic line — dedicated vCPU, a range from 1C1G to 64C512G, dedicated bandwidth, unlimited traffic, hourly or monthly or yearly billing, and the managed products a database wants beside it: VPC, snapshots, database, Redis, Kubernetes, load balancing, object storage. ULightHost is the simple application line at $4/mo, and its own row on the page states the two constraints that disqualify it as a database primary: 30 Mbps shared bandwidth and no scaling. That is a fair product for a static site or a staging box — its design is a different shape, not a weaker one — but it is the wrong shape for a host that must absorb a page-image wave every few minutes while serving queries.
The promotional table, read on its Vietnam tab, gives the UHost ladder as it renders:
| CPU & RAM | System disk | Transfer | Bandwidth | Promotional price |
|---|---|---|---|---|
| 1C 2G | 40 GB | Unlimited | 30 Mbps | $24.25/mo |
| 2C 2G | 60 GB | Unlimited | 30 Mbps | $30.07/mo |
| 2C 4G | 80 GB | Unlimited | 30 Mbps | $33.73/mo |
| 4C 4G | 100 GB | Unlimited | 30 Mbps | $43.16/mo |
| 4C 8G | 120 GB | Unlimited | 30 Mbps | $49.11/mo |
| 8C 16G | 120 GB | Unlimited | 30 Mbps | $74.38/mo |
| 16C 32G | 120 GB | Unlimited | 30 Mbps | $124.93/mo |
Which row, given the arithmetic? Most 32 MB hot-set primary databases are served by 4C 8G at $49.11 — 120 GB leaves room for the base, the default 1 GB WAL allowance, temporary sort files and the growth that always happens. The tier worth actively avoiding is 1C 2G at $24.25: 40 GB reads as adequate until you subtract the operating system, add a working set, and then find that one long transaction or a stalled archiver can push WAL past its soft limit with nowhere to go. The $9.48 monthly gap to 2C 4G and its 80 GB is the cheapest insurance in the table, and it buys a second vCPU at the same time.
A middle case is worth naming, because it is the most common mistake on this page: choosing 8C 16G at $74.38 because the database "needs cores." Write-bound databases rarely do. If wal_fpi_bytes is the dominant term and per-flush time is fine, extra cores sit idle while the flush path stays exactly as fast, and the same money spread across a longer checkpoint interval and more disk would have moved the number. Two 4C 8G instances — one primary, one standby — cost $98.22 and buy a far better answer than a single $124.93 host with no replica.
Four terms on the page are worth knowing before checkout, because they are the ones that surprise people later. Promotional plans do not support changing zone or configuration, and deleting mid-term refunds at list price rather than the promotional price. Renewal stays at the same rate as the initial term, which is unusual and worth noting. All plans use datacenter IPs with no replacement option, port 25 is blocked by default, and Windows is licensed at no extra charge with no setup fee. If any of those is a blocker, the answer is a different product line, not a support request after purchase.
The purchase path is four steps. Open the pricing table and switch to your region tab — the default tab is not necessarily where your users are, and prices differ by region. Pick by disk first and CPU second, because disk headroom is the constraint that cannot be scaled on a promotional plan. Choose monthly if the instance is permanent: hourly billing on this line is not discounted, and the hourly page says so itself. Then set the checkpoint interval and max_wal_size together as your first action on the new host, before importing data, so the first load already runs at the settings you intend to keep.
To verify on your own schema before committing, the platform's free trial exists for exactly this: contact an account manager, ask for a test machine, run pg_test_fsync, restore a sample, and read wal_fpi_bytes off your own workload instead of trusting a table in an article. The three-day and seven-day evaluation offer at $1.9 on the same page reaches the same place.
Amplification arithmetic explains write volume. It does not explain slow queries, and the two get conflated constantly. A sequential scan over a table that does not fit in memory reads slowly regardless of how tidy the WAL is, and no checkpoint setting changes that.
It does not fix a workload that is genuinely write-heavy. At a hundred thousand rows a second, nine gigabytes a day is not amplification — it is the job, and the answer is partitioning, batching and enough endurance to absorb it.
It does not make recovery faster. Every option in the cheap-first list that reduces writes also lengthens the WAL to replay after a crash. If your recovery time objective is measured in seconds, you are choosing between amplification and recovery time, and that choice should be explicit rather than discovered during an incident.
It does not substitute for measuring. The tables above use defaults and plausible hot-set sizes, not your database. Two queries against pg_stat_wal and pg_stat_io will tell you more than any general guidance can — which is the entire reason those counters exist.
Is a 55× amplification factor normal? For a single row update that is the first touch of its page after a checkpoint, yes — it is the documented cost of full page writes, not a fault. The useful question is the aggregate ratio across your workload, which is what wal_fpi_bytes / wal_bytes reports. Under about 10% means page images are not your problem.
Is 40 GB of system disk enough for a primary? Only for a small database with a narrow hot set. Subtract the operating system, add a working set that should stay resident, allow the 1 GB default WAL limit plus temporary sorts, and the margin is thin enough that one long transaction or a stalled archiver closes it. The 80 GB row at $33.73 is where that question stops being a risk.
Should I just turn on WAL compression and be done? Measure first. Compression reduces the page-image bytes, so it attacks exactly the term the ratio identifies — but it costs CPU on every write and during replay, and does nothing for content that is already compressed or encrypted. On PostgreSQL 19 the on setting picks the best available method instead of always using pglz, which makes it a better default than it used to be, not a free one.
Why did my WAL volume drop when I lengthened the checkpoint interval? Because page images are emitted once per distinct page per checkpoint cycle. A longer cycle means fewer cycles, so the same pages are imaged less often. The cost is a longer replay window after a crash.
Does upgrading the instance fix write amplification? No. Amplification is a ratio of bytes written to bytes changed, and a faster CPU changes neither term. It can hide the symptom behind more parallel work, which is worse, because write volume and its endurance cost keep growing unobserved.
Two queries, one ratio, and one configuration change that costs nothing — worth running before a larger disk is paid for, because the second most common outcome of this investigation is discovering the database was never short of storage, only short of a checkpoint interval matched to its workload. When the volume is genuinely real, the per-tier disk sizes on the UHost pricing table are where to spend, and the pricing benchmark breakdown is where to check what that spend buys per unit of compute.
SurferCloud is a leading provider of Virtual Private Se...
Automated trading has become a cornerstone of modern fi...
There is a specific kind of frustration that only a Dev...