Windows 7 Hard fault / Page fault and memory bottleneck

0

Windows 7 resmon displays 0 hard faults. But perfmon shows pagefault around 60 and perfmon /report tells me my system swaps actively.

AFAIK not every page fault is hard fault: page could be stored in cache, that is "standby" memory, right?

So I really do not have memory bottleneck but perfmon simply does not know about Windows 7 memory management (where pagefault != hardfault)? If so how can I trace swap usage on my PC? (there is no "hardfault" counter in perfmon)?


I found that I should use "Pages Input" and "Pages Output" to get number of pages read / written to disk and "Page Read" / "Page Write" to get number of read / write requests.

But I still can't get why "permon / report" tells me I need to install more memory if "Pages Input / Output" is about zero..

Ilya

Posted 2012-05-05T19:38:52.580

Reputation:

1It is telling you that you need to install more memory because the cache hit rate is low, suggesting that the system working set exceeds physical memory. Paging will only happen if the system is unable to shrink the cache, but performance will suffer even if it is. – David Schwartz – 2012-05-05T20:55:54.223

@David: I'm not sure how you get to that conclusion from soft faults. The situation you describe would cause hard faulting. – Ben Voigt – 2012-05-06T01:16:05.067

@BenVoigt: Not if the problem is that the cache is too small, not that mapped pages aren't resident. Consider, for example, a web server. The number of mapped pages is very small, but the need for disk cache is very great. If physical memory can't hold the set of frequently accessed small files, performance will suffer but not due to page faults. – David Schwartz – 2012-05-06T18:52:50.620

@David: If the web server using memory mapping to read the files, you'll have page faults. Otherwise, you'll have normal disk I/O. Neither one would cause soft faults, AFAIK. – Ben Voigt – 2012-05-06T21:54:13.850

@BenVoigt: I can't tell if you're disagreeing with me or not. It sounds like we agree. He could have normal disk I/O caused by insufficient physical memory leading to poor performance. The absence of hard page faults doesn't mean that insufficient physical memory isn't an issue. (I'm not trying to explain the soft page faults, I'm trying to explain his issue.) – David Schwartz – 2012-05-06T22:04:52.207

@David: It appears that he doesn't have a high level of disk I/O. He says "Pages Input/Output" from the disk is near zero. – Ben Voigt – 2012-05-06T22:09:52.490

"Pages Input/Output" only tracks page faults, not normal disk I/O.

– David Schwartz – 2012-05-06T22:49:51.777

Answers

1

Soft faults occur when the page table entry is not in the page table, but the page is in RAM. I think the TLB size is fixed for a particular processor, so there isn't much an end-user can do about soft faults. (A programmer can optimize his code for better locality, which reduces the number of TLB misses and soft faults.)

Ben Voigt

Posted 2012-05-05T19:38:52.580

Reputation: 6 052

I'm not sure what this has to do with his problem. His problem is poor performance and high disk I/O. This might make a good comment, but it's not an answer. (Unless you think the soft faults have something to do with his actual problem. Which you don't say and don't provide any evidence for.) – David Schwartz – 2012-05-06T22:06:54.963

@David: I understand the question differently. He's reporting a number of soft page faults, and asking whether that means he has a performance problem. – Ben Voigt – 2012-05-06T22:09:14.703

Then the answer would be a simple "no". (At least, not unless it's an absurdly high number.) But as I understand the question, he wants to know why he's being told he needs to install more physical memory. – David Schwartz – 2012-05-06T22:50:49.387