BLOG

Nearing the theoretical limit: Galactus DB 2.4.3

14/11/2026

Published

There is a speed no database can beat: the speed of the work itself, with nothing wasted on the way. For a database that keeps its graph on disk, that speed is easy to find, because we ship it too: the same graph held entirely in memory. In Galactus DB 2.4.3 the two have met. A graph read from pages on disk scans 100,000 people in 8.3 ms where it took 26.2, exactly as long as the engine that keeps everything in memory.

Median latency over Bolt on Galactus DB 2.1.8 and 2.4.3, Paged and Resident engines

Which limit?

"Theoretical limit" is a grand phrase for a blog post, so here is the one we mean.

Galactus DB has two engines. Paged, the default, keeps the graph on disk in checksummed 8 KiB pages and holds the pages in use in memory, so a graph can be far larger than the machine it runs on. Resident holds the whole graph in memory and never fetches anything. They run the same queries through the same code and give the same answers, so Resident's time is what the work costs when storage costs nothing at all.

That is the limit. The quickest a database of pages can ever be is as quick as a database with no pages.

As quick as memory

This is the benchmark we published on 2.1.8, run again on 2.4.3 on the same machine with the same limits.

8 CPUs, 4 GB, medianPaged 2.1.8Paged 2.4.3Resident 2.4.3
Index lookup by id0.50 ms0.48 ms0.47 ms
Friends of friends0.53 ms0.48 ms0.48 ms
Filtered scan of 100,000 people26.2 ms8.3 ms8.3 ms
Shortest path, up to 6 hops0.62 ms0.52 ms0.48 ms
All shortest paths, up to 6 hops0.59 ms0.54 ms0.51 ms
Weighted shortest path (Dijkstra)23.6 ms23.1 ms22.9 ms
Index lookups, 16 clients, reads/s4,1084,1034,117

On 2.1.8 the scan was the one query where you could tell which engine you were on: Paged took three times as long. On 2.4.3 both take 8.3 ms, and every other row has edged down as well. Paged does it in 169 MB with the graph loaded, and still opens straight from disk: 0.76 s from starting the container to the first correct answer.

Give it a quarter of the machine, 2 CPUs and 1 GB, and Paged's scan drops from 30.1 ms to 12.4 ms, with lookups, traversals and unweighted paths all between 0.48 ms and 0.55 ms.

The engine built for graphs far larger than memory now keeps pace with the one that holds everything in memory.

Four millionths of a second

Those times include the trip: out of your application, through the driver, across the network and back again. Stand inside the engine with a stopwatch and the numbers get smaller still. On the Paged engine, with one query worker and a graph of 100,000 nodes and 1.2 million relationships:

So of the 0.48 ms a lookup takes over Bolt, the engine's own share is less than a hundredth. The rest is travel.

Run the in-memory engine beside it in the same process and Paged walks those 1.2 million relationships within 14% of it, and returns every node in the graph within 8%.

How we got here

No single trick did this. We asked the same question of every query, release after release: what is it doing that the answer does not need?

2.1.8 to 2.3.0: stop early, read less

2.4.1: stop reading what nobody asked for

id(n), labels(n), type(r), n:Label and a = b are questions about what an element is, and the engine used to load everything the element owns before answering. It was like fetching someone's whole filing cabinet to check the name on the drawer. Now it reads the label.

2.4.2: stop walking where the answer cannot be

2.4.3: stop queueing for the catalogue

When we introduced the Paged engine we called it a library: the books you are reading are open on your desk and the rest are on the shelves. We left out the catalogue. To find the shelf holding a page of properties, every reader walked the catalogue from the top drawer down, and held each drawer shut against the others while they looked. One reader never noticed. Eight readers scanning the same graph spent their time waiting at the drawers.

In 2.4.3 each reader is handed the bottom drawer's list when the database opens. Finding a page is reading one line of it, with nobody to wait for. A write that changes part of the graph reprints only the lines that changed. Where the memory you already gave the database has room, the property pages themselves stay on the desk.

Put together, on the Paged engine with one query worker:

Milliseconds for one statement before each change and on 2.4.3

StatementBefore2.4.3Changed in
sum(id(n)) over every node215 ms11.5 ms2.4.1
Return every node220 ms64.6 ms2.4.1, 2.4.3
One hop, filter on the first node349 ms37.7 ms2.4.2, 2.4.3
Three conditions joined by AND79 ms26.0 ms2.4.1, 2.4.3
Shortest path across the graph38.3 ms4.0 ms2.4.2
Every relationship of every node116 ms79.5 ms2.4.2

What it asks of you

Nothing. There is no new syntax and no setting to change, and 2.4.1, 2.4.2 and 2.4.3 leave the files on disk exactly as 2.4.0 wrote them.

The property pages that now stay in memory come out of the budget each database already had (GDB_PIN_BYTES, 256 MiB by default), which is itself part of the page cache. The memory limit you set is the memory limit you get. A database whose properties do not fit that budget gains from the catalogue all the same: with the budget cut to 4 MiB, the scan above was 18% faster with one worker and 57% faster with eight.

How we measured

Get it

docker pull ianknowles/galactus-db:2.4.3

It is also latest, for Linux AMD64 and ARM64. For the same figures beside other databases, see Galactus DB compared with Neo4j and Galactus DB compared with Memgraph.

Three releases in two days, and each one made the database do less. We are told that is not how software usually goes.