标签:default wap ati its startup tar physical any swa
The name swap daemon is a bit of a misnomer as the daemon does more than just swap modified pages out to the swap file. Its task is to keep the memory management system operating efficiently. The Kernel swap daemon (kswapd kernel init process at startup time and sits waiting for the kernel swap timer to periodically expire. ) is started by the Every time the timer expires, the swap daemon looks to see if the number of free pages in the system is getting too low.
Linux does not want too many pages being written to the swap file at the same time so it uses nr_async_pages to keep count of the number of pages currently being written to the swap file. free_pages_low and free_pages_high are set at system startup time and are related to the number of physical pages in the system. If there are enough free pages, the swap daemon sleeps until its timer expires again, otherwise the swap daemon tries three ways to reduce the number of physical pages being used by the system:
By default, the swap daemon tries to free up 4 pages each time it runs. The above methods are each tried in turn until enough pages have been freed. The swap daemon then sleeps again until its timer expires.
标签:default wap ati its startup tar physical any swa
原文地址:https://www.cnblogs.com/lianghong881018/p/10288987.html