SQLite Forum

Is data in the OS buffers faster to read?
Login
> If process A writes a large amount of data, and the OS has not fsync'd that to disk yet, are those writes now in the RAM of the OS buffers?
> ...
> How much faster would it be? Would it be Redis-like speeds for simple lookups?

It's ostensibly always faster to read data from the OS's filesystem cache, but...

1) Applications have neither accurate insight nor control over what is actually in those buffers, nor for how long it's in there.

2) Apps can neither generically quantify that difference nor rely on it. Such details are opaque to the OS and can/do change from system to system depending on oodles and oodles of factors far beyond any application's control.

(It feels good to say *oodles* again. We don't get to say that often here in Germany.)