Tracking page faults
Page faults might seem harmless when their numbers are low. But if they start to pile up and cross a certain point, they can slow down your system significantly. This slowdown is more noticeable when you're using traditional HDDs, but it remains a concern even with faster SSDs.
To stay ahead of potential issues with page faults, it's advisable to maintain a test environment that mirrors your live setup. This staging environment lets you push your system to its limits, allowing you to see how many page faults it can handle before performance drops. By comparing the stress test data with the actual page faults in your live system, you can gauge the available margin for optimal performance.
If you're curious about the current page fault status, you can look at the extra_info
section:
db.adminCommand({ "serverStatus" : 1 })['extra_info']
serverStatus
outputs the following result in mongosh
:
{ "note":"fields...