Memory Latency on a Cloud Server: Measured, Not Guessed

Memory Latency on a Cloud Server: Measured, Not Guessed

Memory Latency on a Cloud Server: Measured, Not Guessed

Short answer (checked 2026-11-01): A post that reached the Hacker News front page this weekend argues that a CPU showing 100% busy is often just waiting for RAM, and shows a GROUP BY that got faster by doing more work while touching memory less. We ran the same idea on the cloud server that writes this blog: a load costs about 2 ns when the data fits in L1 and about 200 ns at a 256 MB working set, roughly a hundred times more. For anyone renting servers that gap matters more than the core count on the order form. Below are our numbers and what they change when you choose between cloud and dedicated.

Source. "It's the memory latency, stupid" by Maor Kern (Pivot / Epsio Labs, published 2026-10-28), discussed on Hacker News with 175 points by 2026-11-01. Their figures below are as the post prints them; ours we measured ourselves.

What the Pivot post measured

The test is one query, GROUP BY UserID over the ClickBench "hits" table (about 99 million rows, about 17 million distinct users), pinned to one core of an AMD EPYC 9124 bare-metal server with 128 GB DDR5. A plain hash table with 17 million keys fits in no cache, so almost every lookup goes to RAM. Splitting the rows first into 4096 partitions, each with a small hash table, adds work but keeps each table in cache:

Metric (one core) Plain hash table Radix partitioned
Wall time, 1st / 2nd run 3.9 s / 3.6 s 3.3 s / 2.7 s
Slots stalled on memory 50.1% 23.5%
Slots retiring work 16.1% 32.2%
Demand loads from DRAM 76.2 million 25.7 million

The partitioned version retires more operations (19.4 billion vs 11.4 billion) and still finishes first. The author's tuned version ran in 1.85 s on one core and 0.17 s on all 16. The lesson is not about one database: "CPU 100%" in top tells you the core is not idle, not that it is computing.

Measured on our cloud server

The classic way to see latency is a pointer chase: an array where each slot holds the index of the next one, in random order, one cache line (64 bytes) apart. Every load depends on the previous one, so the CPU can neither prefetch nor overlap them, and the time per hop is the latency of wherever the working set lives. We ran our own pointer-chase script, in JavaScript for Bun because there is no C compiler on our blog machine: the JIT turns the loop into a few machine instructions, which adds a little to every figure. Compare the steps, not the absolute values.

Output, run on a DCXV Cloud server with Bun 1.4.4 on 2026-11-01:

CPU: Intel(R) Xeon(R) CPU E5-2698 v4 @ 2.20GHz
Caches: L2 4096K, L1d 32K, L3 16384K, L1i 32K
working set   ns/load
     16 KB       2.0
     32 KB       2.2
    256 KB      12.5
      1 MB      24.3
      4 MB     122.2
     16 MB     138.4
     64 MB     164.7
    256 MB     205.1

A second run the same morning differed by at most 2 ns up to 1 MB and at most 12 ns above it:

Working set ns per load, run 1 / run 2 Where it lives
32 KB 2.2 / 2.4 L1 data cache
256 KB 12.5 / 10.5 L2, spilling into L3
1 MB 24.3 / 24.3 L3
16 MB 138.4 / 137.2 page walks, L3 and DRAM
256 MB 205.1 / 193.5 DRAM

Three things the numbers say

  1. The guest does not see the real caches. The VM reports a 4 MB L2 and a 16 MB L3; Intel lists 50 MB of cache for the Xeon E5-2698 v4 (Intel ark, checked 2026-11-01). The hypervisor presents a topology, and lscpu inside a cloud server reads that, not the silicon. Time the hardware instead of trusting the labels.
  2. The cliff comes long before the cache is full. Latency jumps five times between 1 MB and 4 MB, far below 50 MB. With 4 KB pages a random walk over 4 MB touches 1,024 pages, more than the TLB holds, and inside a VM a TLB miss walks both the guest's and the host's page tables; the L3 is also shared with the other cores on the socket. We did not separate these causes. The practical result is the same: in a VM, plan as if your fast working set is a few megabytes.
  3. Bigger RAM is not faster RAM. From 1 MB to 256 MB the cost per load grows about eight times. More gigabytes add capacity, not speed; what speeds up a latency-bound job is a smaller hot set, as the Pivot partitioning shows.

What it means if you rent servers

  • Cloud servers suit most web apps, APIs and small databases: their hot data fits in cache, and they wait on the network or the disk long before they wait on RAM. Size them by measured memory use, as in our cloud server sizing guide.
  • Dedicated servers pay off when a large working set is hit at random all day: analytics, big hash joins, in-memory caches, a PostgreSQL server whose indexes no longer fit in RAM. You get the whole L3 and every memory channel with no neighbours, and you can turn on huge pages, which cut TLB misses. Configure one on the dedicated server page.
  • Before upgrading either, run the chase on the box you have and check whether your slow job is latency-bound. Doubling the cores does nothing for one thread that spends half its time stalled. Memory itself got dearer this year, see server RAM in 2026, so the cheapest fix is often code that touches less of it.

Test before you buy

Our Tier III data centres in Prague and Covilha run cloud servers and dedicated servers. Start a cloud server, run your own workload on it and send the timings to sales@dcxv.com: we will help you decide whether a dedicated server would change the numbers.

AWS Emulator for Terraform Tests: What 46,037 Checks Show
cloudinfrastructurecompare

AWS Emulator for Terraform Tests: What 46,037 Checks Show

AWS Emulator runs AWS APIs locally for Terraform tests. AWS's own scores: 78.8% of checks pass, CloudFormation 29.5%, Terraform unscored. How to use it in CI.

SSD Prices May Fall in 2027: What Server Buyers Should Do
dedicatedcloudpricinginfrastructure

SSD Prices May Fall in 2027: What Server Buyers Should Do

TrendForce sees NAND contract prices falling 0-5% in 1Q27 after a year of steep rises. What it means for server storage, with our own per-TB drive price data.

Starlink Mini 2 Behind CGNAT: Reaching a Site That Moves
networkingcloudinfrastructure

Starlink Mini 2 Behind CGNAT: Reaching a Site That Moves

Starlink Mini 2 is out, but standard plans sit behind CGNAT. We counted 990,208 IPv4 addresses for 12M+ customers and compare four ways to reach a remote site.

Data Center Protests Reach Europe: What Buyers Should Do
clouddedicatedinfrastructure

Data Center Protests Reach Europe: What Buyers Should Do

Hundreds entered Microsoft's Amsterdam data center site on 6 November. The Dutch power numbers behind it, measured latency to EU hubs and what buyers should do.

US Voters Rejected Data Centers 45 to 1: What Buyers Learn
clouddedicatedinfrastructure

US Voters Rejected Data Centers 45 to 1: What Buyers Learn

On 3 November 47 US ballot measures on data centers went to voters and the restrictive side won 45. We recount the raw data: what it means for server buyers.