VOOZH about

URL: https://www.javacodegeeks.com/2015/03/interpret-page-fault-metrics.html

⇱ Interpret Page Fault Metrics - Java Code Geeks


A page fault occurs when a program requests an address on a page that is not in the current set of memory resident pages.  What happens when a page fault occurs is that the thread that experienced the page fault is put into a Wait state while the operating system finds the specific page on disk and restores it to physical memory. It is important to distinguish between minor/soft and major/hard page fault;

  • Minor – occurs when the page is resident at an alternate location in the memory. It may happen becasue the page is no longer part of the working set but not yet moved to disk or it was resident in memory as result of prefetch operation
  • Major – occurs when the page is not located in physical memory or in the memory mapped files created by the process.

Why bother?

  • Poor Latency – You may ignore minor faults however, major faults can be detrimental to your application performance in the presence of insufficient physical memory and excessive hard fault and as such needs to be fixed immediately.
  • Poor CPU utilization – as a direct result of thrashing

What next?

  • Increase physical memory – this might be the easy one to start with, although, if you already own a large real estate chances you need to go back to design room as this might just delay the problem
  • Reduce overall memory usage – think right data type, de-duplication, effective (de)serialization
  • Improve memory locality – think about your choice of algorithm based on data access pattern to reduce page fault
Reference: Interpret Page Fault Metrics from our JCG partner Nitin Tripathi at the ZERO blog.
Do you want to know how to develop your skillset to become a Java Rockstar?
Subscribe to our newsletter to start Rocking right now!
To get you started we give you our best selling eBooks for FREE!
1. JPA Mini Book
2. JVM Troubleshooting Guide
3. JUnit Tutorial for Unit Testing
4. Java Annotations Tutorial
5. Java Interview Questions
6. Spring Interview Questions
7. Android UI Design
and many more ....
I agree to the Terms and Privacy Policy

Thank you!

We will contact you soon.

👁 Photo of Nitin Tripathi
Nitin Tripathi
March 3rd, 2015Last Updated: February 28th, 2015
0 273 1 minute read
Back to top button
Close
wpDiscuz