How do I size a database machine?
Measure the working set, the data touched in a normal busy hour, and buy enough memory to cache it. Then check the write rate, which sets how fast storage must commit. Core count comes third: it matters when many queries run at once or when a column store scans large tables in parallel. This guide covers PostgreSQL and the popular non-MySQL engines; for MySQL and MariaDB specifics, read MySQL servers.
What PostgreSQL settings match these machines?
PostgreSQL leans on the operating system's page cache, so shared_buffers stays smaller than a MySQL buffer pool. A good start is a quarter of RAM for shared buffers and three quarters as the planner's estimate of total cache.
# /etc/postgresql/17/main/conf.d/sizing.conf on a 128 GB box such as S14 shared_buffers = 32GB effective_cache_size = 96GB # planner hint, not an allocation work_mem = 48MB maintenance_work_mem = 2GB # faster VACUUM and index builds random_page_cost = 1.1 effective_io_concurrency = 200 max_wal_size = 16GB wal_compression = zstd
random_page_cost = 1.1 tells the planner that random reads on NVMe are nearly as cheap as sequential ones, which makes index scans more attractive. Keep work_mem modest; it applies per sort or hash step, and one complex query can use it many times over.
Which machine fits which engine?
| Engine and load | Pick | Reason |
|---|---|---|
| PostgreSQL, app back end under 80 GB hot | S5 | 128 GB DDR4, two NVMe drives |
| PostgreSQL, high clock for single heavy queries | S14 | AMD EPYC 4565P, DDR5 |
| MongoDB replica set member | D5 | 256 GB DDR4 for the WiredTiger cache |
| ClickHouse analytics | D14 or M9 | Fast DDR5 cores for parallel scans |
| Large PostgreSQL or time series | M1 or M3 | 512 GB of RAM, 2x 4 TB NVMe |
How should the NVMe drives be used?
Machines arrive with the system on the first drive and the second drive empty; RAID is not configured at delivery. For a primary database you usually want both drives mirrored with mdadm or ZFS so a single drive failure does not take the service down. When you run a replica in another city and can rebuild quickly, a simpler layout also works: system and write-ahead log on drive one, data on drive two, with the replica covering hardware faults.
Check drive health every few weeks with smartctl -a /dev/nvme0. Databases write a lot, and the NVMe endurance (TBW and DWPD) entry explains how to read the wear numbers.
How do I protect against losing a machine?
- PostgreSQL: streaming replication to a standby in another city, with Patroni or a manual promotion runbook. Use
pgBackRestor WAL-G for base backups plus WAL archiving. - MongoDB: a three-member replica set across three cities, so any single machine can fail while writes continue.
- ClickHouse: replicated tables through ClickHouse Keeper, or nightly backups to object storage you run elsewhere.
All replication runs over public addresses, as private networks are not offered. Encrypt it with TLS or a WireGuard tunnel, and limit database ports to partner addresses in the host firewall.
When is a dual-socket box worth it for a database?
When concurrency is high and the data set needs more than 128 GB. Two sockets double memory bandwidth and channel count, which helps scans and many parallel connections. Keep an eye on NUMA: on D5 or M1, memory attached to the far socket is slower to reach. PostgreSQL and ClickHouse cope well; for latency-sensitive engines, consider running one instance per socket. The NUMA and dual-socket servers entry has the commands to check the layout.
Database Boxes Worth a Look
Monthly prices are the same in all six cities. The smallest order is the shortest term that reaches the $40 minimum.
| Server | Processor | Cores / threads | Memory | Storage | Network | Per month | Smallest order |
|---|---|---|---|---|---|---|---|
| S5 | Intel Xeon E-2276G | 6 / 12 | 128 GB DDR4 | 2x 1 TB NVMe | 2x 10 Gbps | $88.72 | $88.72 (1 month) |
| S14 | AMD EPYC 4565P | 16 / 32 | 192 GB DDR5 | 2x 4 TB NVMe | 2x 25 Gbps | $317.89 | $317.89 (1 month) |
| D5 | 2x Intel Xeon Gold 5315Y | 16 / 32 | 256 GB DDR4 | 2x 2 TB NVMe | 2x 25 Gbps | $305.34 | $305.34 (1 month) |
| D14 | 2x Intel Xeon Gold 6536 | 32 / 64 | 256 GB DDR5 | 2x 2 TB NVMe | 2x 25 Gbps | $482.56 | $482.56 (1 month) |
| M1 | 2x Intel Xeon Gold 5315Y | 16 / 32 | 512 GB DDR4 | 2x 4 TB NVMe | 2x 25 Gbps | $414.70 | $414.70 (1 month) |
| M3 | 2x Intel Xeon Gold 6326 | 32 / 64 | 512 GB DDR4 | 2x 4 TB NVMe | 2x 25 Gbps | $518.60 | $518.60 (1 month) |
| M9 | 2x Intel Xeon Gold 6536 | 32 / 64 | 512 GB DDR5 | 2x 4 TB NVMe | 2x 25 Gbps | $675.05 | $675.05 (1 month) |
Keep Reading
MySQL servers
Give InnoDB a buffer pool that holds your working set, NVMe for the redo log and no hypervisor between query and disk.
OpenNUMA and dual-socket servers
Why two processors in one box share memory unevenly, and when a dual-socket machine beats a single big chip.
OpenDDR4 vs DDR5 memory
What changes between memory generations, and when a DDR5 machine is worth more than a DDR4 one.
OpenFAQ
Quick Answers
Any mainstream open source engine runs well. Size the box by working set and write rate rather than by engine name.
Start at about a quarter of RAM, so 32 GB on a 128 GB machine, and let the page cache hold the rest.
No. The database is yours to install, tune and patch with full root access.
Yes, over public addresses. Use TLS or a WireGuard tunnel and allow the database port only from the partner machine.
The M13, M14 and M15 carry 1 TB of DDR5 each.