Author Topic: Page Faults  (Read 14578 times)

0 Members and 1 Guest are viewing this topic.

Offline macnext1

  • PcWinTech Ninja
  • ***
  • Join Date: Mar 2009
  • Posts: 511
  • Karma: 2
Page Faults
« on: December 12, 2010, 03:45:46 AM »
Using Task Manager it shows that the mini monitor has 82 million page faults. I guess I don't understand what it means since it only seems to grow in size - never stable like I would expect to vary between some values but it just appears to be growing. While I was typing this it rose to 83 million. What good is the display? I tried F5 (refresh) -- didn't change a thing.

Mac

PcWinTech.com Forums

Page Faults
« on: December 12, 2010, 03:45:46 AM »

Offline Shane

  • Top Geek, err uh Dog.
  • PcWinTech Administrator
  • PcWinTech Guru
  • *******
  • Join Date: Jul 2008
  • Posts: 16,846
  • Location: USA
  • Karma: 523
  • "Knowledge should be shared not hidden."
Re: Page Faults
« Reply #1 on: December 12, 2010, 10:40:23 AM »
Page faults are not errors
http://en.wikipedia.org/wiki/Page_fault

In fact watching right now I see explorer.exe and sidebar.exe climbing as well. However my mini monitor is climbing a lot.

That is because every 1 sec it is calling the API to give the memory usage of the system. This api must be triggering the page faults.

While it shouldn't be a big deal, I still prefer my programs not climbing like that. So the monitor is still fine to use, but I am going to dig in deeper, and see if I can trace what is doing it in the program, and then find a fix for it :-)

I know it isn't the monitor itself, because I used the same code on the bars and graphics as I did simple internet meter, and the page faults don't move with that program. Has to be that windows api.

I'm on it!

Shane
« Last Edit: December 12, 2010, 11:53:37 AM by Shane »
(My weekends belong to my wife and kids, I will try my best to answer all posts daily during the work week)

(About Shane)
Site Owner, Top Admin, Lead Programmer, Wife & 5 kids, Needs a lot more coffee.

When people ask "Why fix what isn't broken?" I reply "To make it better."
"Only a life lived for others is a life worthwhile"
Honor & Respect is all that matters.

Owner & Programmer of: www.pcwintech.com & www.tweaking.com

Offline Shane

  • Top Geek, err uh Dog.
  • PcWinTech Administrator
  • PcWinTech Guru
  • *******
  • Join Date: Jul 2008
  • Posts: 16,846
  • Location: USA
  • Karma: 523
  • "Knowledge should be shared not hidden."
Re: Page Faults
« Reply #2 on: December 12, 2010, 10:59:59 AM »
Found it!
Its not the API that pulls the memory usage. Its the API and code that pulls the number of running programs.
I will work on some new code that pulls that without the page faults and then put out v1.6.1 :wink:

Shane
(My weekends belong to my wife and kids, I will try my best to answer all posts daily during the work week)

(About Shane)
Site Owner, Top Admin, Lead Programmer, Wife & 5 kids, Needs a lot more coffee.

When people ask "Why fix what isn't broken?" I reply "To make it better."
"Only a life lived for others is a life worthwhile"
Honor & Respect is all that matters.

Owner & Programmer of: www.pcwintech.com & www.tweaking.com

Offline Shane

  • Top Geek, err uh Dog.
  • PcWinTech Administrator
  • PcWinTech Guru
  • *******
  • Join Date: Jul 2008
  • Posts: 16,846
  • Location: USA
  • Karma: 523
  • "Knowledge should be shared not hidden."
Re: Page Faults
« Reply #3 on: December 12, 2010, 11:18:28 AM »
Well I have some new code running but it is still causing page faults. But no where near as bad.

Number of page faults per sec with current code was 1100!
New code is 14 page faults per sec.

So this new code has really dropped the number of page faults. but still not perfect. not sure if there is any api that wont cause the page fault. I will keep looking and testing. At least I know I can get the page faults down a ton!

Shane
(My weekends belong to my wife and kids, I will try my best to answer all posts daily during the work week)

(About Shane)
Site Owner, Top Admin, Lead Programmer, Wife & 5 kids, Needs a lot more coffee.

When people ask "Why fix what isn't broken?" I reply "To make it better."
"Only a life lived for others is a life worthwhile"
Honor & Respect is all that matters.

Owner & Programmer of: www.pcwintech.com & www.tweaking.com

Offline Shane

  • Top Geek, err uh Dog.
  • PcWinTech Administrator
  • PcWinTech Guru
  • *******
  • Join Date: Jul 2008
  • Posts: 16,846
  • Location: USA
  • Karma: 523
  • "Knowledge should be shared not hidden."
Re: Page Faults
« Reply #4 on: December 12, 2010, 11:23:24 AM »
Looks like this new code will be it. Page faults don't hurt the system, and looking at other programs, my program isn't the only one that climbs. Its just the way it works with some of the API's.

But how many it was doing bugged me. So dropping from 1100 to 14 I say is a good step in the right direction  :wink:

I will put 1.6.1 out in just a bit.

Shane
(My weekends belong to my wife and kids, I will try my best to answer all posts daily during the work week)

(About Shane)
Site Owner, Top Admin, Lead Programmer, Wife & 5 kids, Needs a lot more coffee.

When people ask "Why fix what isn't broken?" I reply "To make it better."
"Only a life lived for others is a life worthwhile"
Honor & Respect is all that matters.

Owner & Programmer of: www.pcwintech.com & www.tweaking.com

Offline Shane

  • Top Geek, err uh Dog.
  • PcWinTech Administrator
  • PcWinTech Guru
  • *******
  • Join Date: Jul 2008
  • Posts: 16,846
  • Location: USA
  • Karma: 523
  • "Knowledge should be shared not hidden."
Re: Page Faults
« Reply #5 on: December 12, 2010, 11:45:41 AM »
New version is out.
You don't need to uninstall the old version. Just make sure the mini monitor is closed so the setup can replace it  :wink:

Shane
(My weekends belong to my wife and kids, I will try my best to answer all posts daily during the work week)

(About Shane)
Site Owner, Top Admin, Lead Programmer, Wife & 5 kids, Needs a lot more coffee.

When people ask "Why fix what isn't broken?" I reply "To make it better."
"Only a life lived for others is a life worthwhile"
Honor & Respect is all that matters.

Owner & Programmer of: www.pcwintech.com & www.tweaking.com

PcWinTech.com Forums

Re: Page Faults
« Reply #5 on: December 12, 2010, 11:45:41 AM »