VictoriaMetrics Observability Blog

Filter: Page Cache

How Linux readahead works, and the two ways to change it

The kernel reads your files before you ask for them, guessing from where your reads land. Here is how that guessing actually works (the window, the marker, the background fetch) and the two ways to influence it: read_ahead_kb on the device, and posix_fadvise from inside the program. Neither does quite what its name suggests.