PC Review


Reply
Thread Tools Rate Thread

DRAWIMAGE() -> TONS OF PAGE FAULTS!

 
 
svd
Guest
Posts: n/a
 
      11th Aug 2005
Originally, I thought this was due to DoubleBuffer, but ran some further
experiments and discovered that page faults occur when calling DrawImage().
For example, create 2 images about 800x800, then call DrawImage to copy from
to the other (on say a mouse click). Notice about 600+ page faults occur
each time (the larger the area, the greater the number of page faults).

I have an application that calls DrawImage() once a second to update the
main screen, so after a few days, the page fault count is monsterous. I
swear this bogs down my system too.

Anyone else have this problem? Any solutions? Can someone report this as a
DEFECT.

Thanks,

Steve


 
Reply With Quote
 
 
 
 
Bob Powell [MVP]
Guest
Posts: n/a
 
      11th Aug 2005
You seem to have this idea that a page-fault is some kind of an error. It
isn't. It is simply the processor's way of keeping track of it's virtual
memory and signalling to the memory manager that it needs to swop a portion
of the page file.

If you have a small amount of RAM in the machine or if the system has a
large amount of programs and data loaded the paging requirements will be
high.

To cure the "problem" buy more RAM, optimise your swop-file perhaps by
making a big one and placing it on a separate, dedicated partition on a
disk. If your application has high memory requirements perhaps you will need
to specify a higher spec machine in the minimum requirements for your
product.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.





"svd" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Originally, I thought this was due to DoubleBuffer, but ran some further
> experiments and discovered that page faults occur when calling
> DrawImage().
> For example, create 2 images about 800x800, then call DrawImage to copy
> from
> to the other (on say a mouse click). Notice about 600+ page faults occur
> each time (the larger the area, the greater the number of page faults).
>
> I have an application that calls DrawImage() once a second to update the
> main screen, so after a few days, the page fault count is monsterous. I
> swear this bogs down my system too.
>
> Anyone else have this problem? Any solutions? Can someone report this as a
> DEFECT.
>
> Thanks,
>
> Steve
>
>



 
Reply With Quote
 
Frank Hileman
Guest
Posts: n/a
 
      11th Aug 2005
These are probably soft page faults, not hard ones. Soft faults do not
require disk access:
http://blogs.msdn.com/greggm/archive.../21/61237.aspx
http://msdn.microsoft.com/library/de...ml/optcode.asp

Pages read/sec should show you hard page faults in the performance monitor
(don't use the task manager for these things).

I imagine it is simply large images.


Regards,
Frank Hileman

check out VG.net: http://www.vgdotnet.com
Animated vector graphics system
Integrated Visual Studio .NET graphics editor


"Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message
news:(E-Mail Removed)...
> You seem to have this idea that a page-fault is some kind of an error. It
> isn't. It is simply the processor's way of keeping track of it's virtual
> memory and signalling to the memory manager that it needs to swop a
> portion of the page file.
>
> If you have a small amount of RAM in the machine or if the system has a
> large amount of programs and data loaded the paging requirements will be
> high.
>
> To cure the "problem" buy more RAM, optimise your swop-file perhaps by
> making a big one and placing it on a separate, dedicated partition on a
> disk. If your application has high memory requirements perhaps you will
> need to specify a higher spec machine in the minimum requirements for your
> product.
>
> --
> Bob Powell [MVP]
> Visual C#, System.Drawing
>
> Ramuseco Limited .NET consulting
> http://www.ramuseco.com
>
> Find great Windows Forms articles in Windows Forms Tips and Tricks
> http://www.bobpowell.net/tipstricks.htm
>
> Answer those GDI+ questions with the GDI+ FAQ
> http://www.bobpowell.net/faqmain.htm
>
> All new articles provide code in C# and VB.NET.
> Subscribe to the RSS feeds provided and never miss a new article.
>
>
>
>
>
> "svd" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> Originally, I thought this was due to DoubleBuffer, but ran some further
>> experiments and discovered that page faults occur when calling
>> DrawImage().
>> For example, create 2 images about 800x800, then call DrawImage to copy
>> from
>> to the other (on say a mouse click). Notice about 600+ page faults occur
>> each time (the larger the area, the greater the number of page faults).
>>
>> I have an application that calls DrawImage() once a second to update the
>> main screen, so after a few days, the page fault count is monsterous. I
>> swear this bogs down my system too.
>>
>> Anyone else have this problem? Any solutions? Can someone report this as
>> a
>> DEFECT.
>>
>> Thanks,
>>
>> Steve
>>
>>

>
>



 
Reply With Quote
 
svd
Guest
Posts: n/a
 
      12th Aug 2005
Well, I have 512MB of ram and it never seems to grow to more than about 30%
of what I have available, even when the page faults are occurring.

Maybe page faults are not a bad thing, if not, why do they even bother
showing them in the task manager?

Steve

"Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message
news:(E-Mail Removed)...
> You seem to have this idea that a page-fault is some kind of an error. It
> isn't. It is simply the processor's way of keeping track of it's virtual
> memory and signalling to the memory manager that it needs to swop a

portion
> of the page file.
>
> If you have a small amount of RAM in the machine or if the system has a
> large amount of programs and data loaded the paging requirements will be
> high.
>
> To cure the "problem" buy more RAM, optimise your swop-file perhaps by
> making a big one and placing it on a separate, dedicated partition on a
> disk. If your application has high memory requirements perhaps you will

need
> to specify a higher spec machine in the minimum requirements for your
> product.
>
> --
> Bob Powell [MVP]
> Visual C#, System.Drawing
>
> Ramuseco Limited .NET consulting
> http://www.ramuseco.com
>
> Find great Windows Forms articles in Windows Forms Tips and Tricks
> http://www.bobpowell.net/tipstricks.htm
>
> Answer those GDI+ questions with the GDI+ FAQ
> http://www.bobpowell.net/faqmain.htm
>
> All new articles provide code in C# and VB.NET.
> Subscribe to the RSS feeds provided and never miss a new article.
>
>
>
>
>
> "svd" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> > Originally, I thought this was due to DoubleBuffer, but ran some further
> > experiments and discovered that page faults occur when calling
> > DrawImage().
> > For example, create 2 images about 800x800, then call DrawImage to copy
> > from
> > to the other (on say a mouse click). Notice about 600+ page faults occur
> > each time (the larger the area, the greater the number of page faults).
> >
> > I have an application that calls DrawImage() once a second to update the
> > main screen, so after a few days, the page fault count is monsterous. I
> > swear this bogs down my system too.
> >
> > Anyone else have this problem? Any solutions? Can someone report this as

a
> > DEFECT.
> >
> > Thanks,
> >
> > Steve
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tons & tons of emails, need help on how to make outlook load up fa =?Utf-8?B?ZGF2ZQ==?= Microsoft Outlook Discussion 4 4th Oct 2007 04:18 AM
Converting a range of cells from tons to metric tons =?Utf-8?B?QnJvb2tzbA==?= Microsoft Excel Worksheet Functions 2 2nd Aug 2007 11:26 PM
DRAWIMAGE() -> TONS OF PAGE FAULTS! svd Microsoft Dot NET Framework Forms 3 12th Aug 2005 03:39 PM
Convert net tons to long tons in an Excel Spreadsheet. =?Utf-8?B?UGF0dHliZXI=?= Microsoft Excel Programming 1 10th Feb 2005 03:42 PM
Convert net tons to long tons in an Excel Spreadsheet. =?Utf-8?B?UGF0dHliZXI=?= Microsoft Excel Worksheet Functions 1 10th Feb 2005 03:32 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:13 PM.