What are page faults

What are page faults?

Page faults will occur if you’re attempting to access part of a memory-mapped file that isn’t in memory.

If there is free memory, then the operating system can find the page on disk and load it to memory directly. However, if there is no free memory, the operating system must:

  • find a page in memory that is stale or no longer needed, and write the page to disk.
  • read the requested page from disk and load it into memory.

This process, particularly on an active system can take a long time, particularly in comparison to reading a page that is already in memory.

参考:http://docs.mongodb.org/manual/faq/storage/#what-are-page-faults

猜你喜欢

转载自san-yun.iteye.com/blog/1738961