Groups | Blog | Home
all groups > dotnet performance > november 2003 >

dotnet performance : PAGE FAULTS - 800 000 in few minutes



Crirus
11/25/2003 3:00:02 PM
Hello

I just noticed in TaskBar that my application generate lots of page
faults...
That seems to happend on paint event of my custom control.

What could be the cause of it?

I draw a full screen bitmap into my control
That bitmap I create from multiple tiles...(the bitmap is a map)
When I try to scroll the map around in a mouse move with right button down
(as a drag), I get more and more page faults on every Me.Refresh call from
within mousemove handler.



--
Ceers,
Crirus

------------------------------
If work were a good thing, the boss would take it all from you

------------------------------

Crirus
11/26/2003 5:45:37 PM
No ideea?

--
Ceers,
Crirus

------------------------------
If work were a good thing, the boss would take it all from you

------------------------------

[quoted text, click to view]

Pavel Lebedinsky
11/28/2003 5:30:40 PM
What's the size of the bitmap? How big is the working set
(Mem Usage in task manager)? Does pfmon.exe show anything interesting?
Are the pagefaults soft or hard?

[quoted text, click to view]

Crirus
11/29/2003 9:26:15 AM
Well, I'm not sure what pfmon is...and how to use it

[quoted text, click to view]
The bitmap is full screan 1200x1024 or close

[quoted text, click to view]
Memory usage is around 25,000 K

[quoted text, click to view]
How can I tell the difference?

--
Ceers,
Crirus

------------------------------
If work were a good thing, the boss would take it all from you

------------------------------

[quoted text, click to view]

Pavel Lebedinsky
12/1/2003 11:58:12 AM
[quoted text, click to view]

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tools/tools/pfmon.asp

[quoted text, click to view]

Pfmon has this info. Alternatively, you can look at Memory\Pages/sec
perfmon counter. If it's near 0 then most of the pagefaults are soft
(that is, resolved from memory instead of disk).

It doesn't look like your working set is too large so the pagefaults are
probably not caused by excessive memory usage (what's the Available
physical memory as reported by Task Manager by the way?).

My guess is that some code repeatedly allocates and frees chunks
of memory using VirtualAlloc, or something like that. Soft pagefaults
are relatively cheap so if you don't see an obvious performance
impact you might want to just ignore them.

Crirus
12/2/2003 8:59:38 AM
I have a pfmon log can you watch it and ell me if there is something I
should worry about there?

http://ticera.i-tech.ro/crirus/pfmon.log

--
Ceers,
Crirus

------------------------------
If work were a good thing, the boss would take it all from you

------------------------------

[quoted text, click to view]

Bobby Edgar
12/2/2003 10:49:00 AM
Hi Crirus,

I think that AQtime .NET could help you determine the cause of the problem.
It allows you to measure different characteristics of an application's
functioning, such as Hard Memory Page Faults, Soft Memory Page Faults and
All Memory Page Faults. You can find more details in the 'Performance
Profiler - Overview' topic of AQtime .NET help system.

The fully-functional 30-day trial version can be downloaded from our web
site:

http://www.automatedqa.com/downloads/aqnet.asp

Regards,
Bobby Edgar
AutomatedQA
================================
[quoted text, click to view]
Hello

I just noticed in TaskBar that my application generate lots of page
faults...
That seems to happend on paint event of my custom control.

What could be the cause of it?

I draw a full screen bitmap into my control
That bitmap I create from multiple tiles...(the bitmap is a map)
When I try to scroll the map around in a mouse move with right button down
(as a drag), I get more and more page faults on every Me.Refresh call from
within mousemove handler.



--
Ceers,
Crirus

------------------------------
If work were a good thing, the boss would take it all from you

------------------------------
<<

Pavel Lebedinsky
12/2/2003 12:04:50 PM
You don't have good symbols so it's difficult to get any useful
information from the log except for the fact that most pagefaults
are soft and are caused by gdiplus functions.

I wouldn't worry too much about this. Escpecially if you don't
see any perf problems in your app, and you're not doing anything
obviously bad like repainting the window on each mouse move.

If you're really interested, you can fix symbols
(http://www.microsoft.com/whdc/ddk/debugging/default.mspx),
find out which function in gdiplus is causing the pagefaults,
disassemble it to see what it is doing, put a breakpoint to
see who the caller is etc.


[quoted text, click to view]

AddThis Social Bookmark Button