Page cache exploite temporal locality which means a thing access recently is highly probable that it will be accessed again. When free page runs out, the least used page will be pruned from the cache. Sometime, it is more effective to swap out a chunk of seldomly used data instead of pruning the cache. The hueristics to balance between swappig and paging is controlled via /proc/sys/vm/swappiness.
Write back of dirty pages to disk is carried out by a group of kernel threads called pdflush. They are woken up when the number of free pages falls below a threshold or the age of dirty pages reaches a threshold. Multiple pdflush are instantiated concurrently to take advantage of multi-processors and also for congestion avoidance, which prevent write from being backed up while writing to a single device.
No comments:
Post a Comment