请注意,此问题linux
仅适用于。而到swap space
,我指的是专用的swap partition
。
我做google
了一些,发现了这些definitions
:
Paging refers to writing portions, termed pages, of a process’ memory to disk.
Swapping, strictly speaking, refers to writing the entire process, not just part, to disk.
In Linux, true swapping is exceedingly rare, but the terms paging and swapping
often are used interchangeably.
和
page-out: The system's free memory is less than a threshold "lotsfree" and unnused / least used pages are moved to the swap area.
page-in: One process which is running requested for a page that is not in the current memory (page-fault), it's pages are being brought back to memory.
swap-out: System is thrashing and has deactivated a process and it's memory pages are moved into the swap area.
swap-in: A deactivated process is back to work and it's pages are being brought into the memory.
现在,您可能想用询问分页和交换之间差异的问题来重复该问题。但我寻求更多。在任何时候,这些计数器是否/proc/vmstat
互斥?我的意思是,该参数是否pswpin
包含来自pgpgin
或反之的一些计数?一个过程到底发生了deactivated
什么?如果将所有页面都移到swap
太空,那么它与多个页面pageouts
有何不同?此外,如果pagein
一旦发生页面错误发生时,有什么可以一个说的另外两个参数pgmajfault
,并pgfault
针对此事件?是否每当pagefault (major? minor?)
出现a 时pagein
也会发生对应的情况?
如果建议使用一些示例程序/基准测试这些单独的参数,将很有帮助。
PS:我可能会继续添加/编辑问题:)