โปรดทราบว่าคำถามนี้เฉพาะกับคำถามlinuxเท่านั้น และโดยที่ผมหมายถึงเฉพาะswap spaceswap 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?)เกิดขึ้นที่สอดคล้องกันpageinเกิดขึ้น?
มันจะมีประโยชน์ถ้ามีตัวอย่างโปรแกรม / การวัดประสิทธิภาพที่แนะนำให้ทดสอบพารามิเตอร์แต่ละตัว
PS: ฉันอาจเพิ่ม / แก้ไขคำถาม :)