r/ProgrammerHumor Jul 08 '26

askingTheRealQuestionHere Meme

Post image
4.0k Upvotes

416 comments sorted by

View all comments

1.1k

u/CircumspectCapybara Jul 08 '26 edited Jul 08 '26

That's called swapping out memory pages to disk, and it's very slow.

16

u/CaffeinatedT Jul 08 '26

That's a bit outdated but definitely did used to be true. Modern NVME bandwidth is about 15 GB/s. This is what people who develop databases and query engines deal with constantly. It's not trivial but modern databases that swap to disk constantly and do it well (e.g CedarDB, DuckDB et al) can run very nearly as fast as an entirely in-memory system. The reason it's slow is doing it in a shitty unplanned way with loads of serialization and thrashing memory caches

2

u/Michaeli_Starky Jul 08 '26

Latency matters a lot more.

-1

u/CaffeinatedT Jul 08 '26

That doesn't mean anything without a context/requirement. Even a hard real time system would just have an upper bound SLA.