Linux uses spare RAM to cache file data (the page cache) and metadata, so repeated reads avoid the disk, and this memory is released when applications need it.
Look at the available column of free -h rather than free; high usage that is mostly cache is healthy, while low available memory plus heavy swap activity signals real pressure.
Writes go to the cache first and are flushed to disk later (dirty pages), which is why sync and fsync exist for durability.
Loading…