↓ Skip to main content

“Here we have 10-70MB/s for disk writes while reads are as high as 40-50MB/s.”

Andrey Pechkurovquestdb.io ↗

A write-only QuestDB workload was reading 40-50MB/s off disk. The user had about 50 tables with a few hundred columns each, the database ate most of the RAM, and the kernel kept evicting pages and reading them back through readahead. One madvise call with MADV_RANDOM made the reads go away. Linux guesses that you read files in order, and when it guesses wrong, your disk pays for it.