TLDR Dev · MISCELLANEOUS
THE DIRTY PAGES SURPRISE: WHEN A READ-ONLY QUERY WRITES TERABYTES
Summary from the TLDR Dev newsletter
A MonetDB count-distinct query saturates an NVMe drive with writes because Linux flushes dirty pages from temporary memory-mapped scratch files. Moving the scratch files to tmpfs cuts runtime from 73 minutes to 97 seconds, while workload-specific writeback tuning reaches about 100 seconds without moving them off disk.