473,379 Members | 1,260 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

What is Page FAULTS?

I made a simple test... loaded an image from file and draw it on a form
In mouse move, I just refresh the form.... that cause 1 000 000 page faults
(as task manager shows) in less than a minute.. what is that?

--
Ceers,
Crirus

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

------------------------------
Nov 20 '05 #1
2 4883
Crirus,
Windows uses Virtual Memory management system, that effectively allows the
process in run state to use all the available RAM. The other processes are
put in wait status, while your process is running, and if your process is
requiring more memory then the system has, it stores the status information
of the waiting process on the HDD and allows your process to use their space
in RAM. This swap is called a page fault.
Now, OS gives each process a preset time interval of running (to achieve
multitasking, usually several CPU clock ticks), so after that time quant for
your process is up, the OS put you process in wait status and activates the
waiting processes. The it has to do page faults to reload their status info
into RAM.

The large number of page faults tells me the following:
1. You are rendering HUGE picture.
2. You wrote the app inefficiently so the memory management is struggling to
keep up with memory expansion on each refresh.
3. Combination of the 1 and 2

I hope this explains and good luck
Milan Todorovic

PS. For further understanding of OS memory management see any OS theory book
(e.g. Tannenbaum's Modern Operating System)
"Crirus" <Cr****@datagroup.ro> wrote in message
news:uK*************@TK2MSFTNGP11.phx.gbl...
I made a simple test... loaded an image from file and draw it on a form
In mouse move, I just refresh the form.... that cause 1 000 000 page faults (as task manager shows) in less than a minute.. what is that?

--
Ceers,
Crirus

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

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

Nov 20 '05 #2
Well... all I did is the following.. for testing pourpose

(the image is a fullscreen size jpg)

Private myimg As Bitmap
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
myimg = Bitmap.FromFile("1.jpg")
End Sub

Private Sub Form1_Paint(ByVal sender As Object, ByVal e As
System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
e.Graphics.DrawImage(myimg, 0, 0, myimg.Width, myimg.Height)
End Sub

Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As
System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseMove
Me.Refresh()
End Sub
How can I handle a full screen image other way to display in a maximized
form?!

--
Ceers,
Crirus

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

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

"Milan Todorovic" <mi*************@ttu.edu> wrote in message
news:OZ**************@tk2msftngp13.phx.gbl...
Crirus,
Windows uses Virtual Memory management system, that effectively allows the
process in run state to use all the available RAM. The other processes are
put in wait status, while your process is running, and if your process is
requiring more memory then the system has, it stores the status information of the waiting process on the HDD and allows your process to use their space in RAM. This swap is called a page fault.
Now, OS gives each process a preset time interval of running (to achieve
multitasking, usually several CPU clock ticks), so after that time quant for your process is up, the OS put you process in wait status and activates the waiting processes. The it has to do page faults to reload their status info into RAM.

The large number of page faults tells me the following:
1. You are rendering HUGE picture.
2. You wrote the app inefficiently so the memory management is struggling to keep up with memory expansion on each refresh.
3. Combination of the 1 and 2

I hope this explains and good luck
Milan Todorovic

PS. For further understanding of OS memory management see any OS theory book (e.g. Tannenbaum's Modern Operating System)
"Crirus" <Cr****@datagroup.ro> wrote in message
news:uK*************@TK2MSFTNGP11.phx.gbl...
I made a simple test... loaded an image from file and draw it on a form
In mouse move, I just refresh the form.... that cause 1 000 000 page

faults
(as task manager shows) in less than a minute.. what is that?

--
Ceers,
Crirus

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

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


Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: stephenma7 | last post by:
Hi, everybody. I am new here. I have encountered these many problems for the last couple of days. I have Linux Fedora Core 3(Gnu G++ 3.4.2), Linux Fedora Core 2 (Gnu G++ 3.3.3), Red Hat 9 (Gnu...
3
by: benben | last post by:
Is there a standard guidline to avoid or minimize page faults when manipulating data collections in C++? ben
27
by: Sune | last post by:
Hi! Pre-requisites: ------------------- 1) Consider I'm about to write a quite large program. Say 500 K lines. 2) Part of this code will consist of 50 structs with, say, no more than at most...
1
by: tbatwork828 | last post by:
I've PerfMon-ed our application for several days now and it consistently averages 2000 Page Faults/sec, and accumulates on average about 4 mill page faults during 35 mins. During the same...
0
by: Crirus | last post by:
Hello! I cant understand why my application generate lots of page faults as task manager shows... Something related to MouseMove, I guess...I scroll a large bitmap with MouseMove and seems that...
2
by: David Morgan | last post by:
Hi Have 4Gb of RAM and plenty of free disk. Those page faults are for DLLHOST.EXE using ~370Mb RAM. inetinfo.exe has 403,106,036 page faults at the time of writing and is using ~145Mb RAM. ...
4
by: bjorn.augestad | last post by:
Hi, all. We have a couple of pathological sql servers that have lots and lots of page faults per second, up to 4000. Our client programs are written in C#/.NET 1.1 and utilizes connection...
1
by: cablitoEscobar | last post by:
The problem lies in the fact that whenever I call CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0) a page fault occurs. The fact is I have a timer set to take a snap-shot per second and the...
4
by: none | last post by:
I have an ASP.NET application, hosted on two web servers. I am looking for advice on what should be an acceptable level of page faults on these production servers. If the acceptable level is zero,...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.