@@ -41,22 +41,22 @@ MongoDB uses memory mapped files for managing and interacting with all
41
41
data. MongoDB memory maps data files to memory as it accesses
42
42
documents. Data that isn't accessed is *not* mapped to memory.
43
43
44
+ .. _faq-storage-page-faults:
45
+
44
46
What are page faults?
45
47
---------------------
46
48
47
- Page faults will occur if you're attempting to access some part of a
49
+ Page faults will occur if you're attempting to access part of a
48
50
memory-mapped file that *isn't* in memory.
49
51
50
52
If there is free memory, then the operating system can find the page
51
53
on disk and load it to memory directly. However, if there is no free
52
54
memory, the operating system must:
53
55
54
- - find a page in memory that is stale or no longer needed,
55
-
56
- - if needed, the operating system might need to write this page to
57
- disk before removing it from memory.
56
+ - find a page in memory that is stale or no longer needed, and write
57
+ the page to disk.
58
58
59
- - read the page from disk and load it into memory.
59
+ - read the requested page from disk and load it into memory.
60
60
61
61
This process, particularly on an active system can take a long time,
62
62
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?
69
69
data that isn't currently in active memory. A "hard" page fault
70
70
refers to situations when MongoDB must access a disk to access the
71
71
data. A "soft" page fault, by contrast, merely moves memory pages from
72
- one list to another, and does not require as much time to complete.
72
+ one list to another, such as from an operating system file
73
+ cache. In production, MongoDB will rarely encounter soft page faults.
73
74
74
75
What tools can I use to investigate storage use in MongoDB?
75
76
-----------------------------------------------------------
0 commit comments