diff --git a/source/faq/storage.txt b/source/faq/storage.txt index 502b3d99425..d1b4b068133 100644 --- a/source/faq/storage.txt +++ b/source/faq/storage.txt @@ -41,22 +41,22 @@ MongoDB uses memory mapped files for managing and interacting with all data. MongoDB memory maps data files to memory as it accesses documents. Data that isn't accessed is *not* mapped to memory. +.. _faq-storage-page-faults: + What are page faults? --------------------- -Page faults will occur if you're attempting to access some part of a +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, - -- if needed, the operating system might need to write this page to - disk before removing it from memory. +- find a page in memory that is stale or no longer needed, and write + the page to disk. -- read the page from disk and load it into memory. +- 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 @@ -69,7 +69,8 @@ What is the difference between soft and hard page faults? data that isn't currently in active memory. A "hard" page fault refers to situations when MongoDB must access a disk to access the data. A "soft" page fault, by contrast, merely moves memory pages from -one list to another, and does not require as much time to complete. +one list to another, such as from an operating system file +cache. In production, MongoDB will rarely encounter soft page faults. What tools can I use to investigate storage use in MongoDB? ----------------------------------------------------------- diff --git a/source/reference/glossary.txt b/source/reference/glossary.txt index 9bcc9e35b42..2da7a889d80 100644 --- a/source/reference/glossary.txt +++ b/source/reference/glossary.txt @@ -802,7 +802,10 @@ Glossary page fault The event that occurs when a process requests stored data (i.e. a page) from memory that the operating system has moved to - virtual memory. + disk. + + .. seealso:: :ref:`Storage FAQ: What are page faults? + ` working set The collection of data that MongoDB uses regularly. This data