Do you know the difference between a Paging file (swap
file) and a Memory dump file?
If you don't then you may be causing your Operating System to run slower than it
normally should.
Paging file or swap file:
This is a dynamic file that the Operating System uses to store data when the
physical amount of memory is exceeded with open programs and the data that the
programs are using.
Suppose you have 256 Meg of ram in your computer. Now if you open your email, a
word processor, and a browser then you computer just works along normally. Lets
say you have a spread sheet and it is about twenty-five meg in size, when you
open the spread sheet program and then the file it will increase in size to
almost 100 Meg.
With all the programs, data, and Operating System files you have just exceeded
the maximum physical memory and your computer will either hang or crash. How to
get around this dilemma?
One way is to use a file to store idle programs and data, a file called
pagefile.sys. Now the Operating system will utilize the swap file. It will take
any idle program and the data from that program and place it in the swap file
until you 'activate' the program again, that is when you move from
one program to another.
So you have your spread sheet open and are working along, then you decide you
don't have enough information. You need to ask a co-worker for more information
so you click on your email program and wait, and wait. What is happening is the
OS is swapping out the spread sheet program and data for the email program and
data. This is one of the draw backs of a computer with the minimum recommended
installed memory. the only way around this is to increase the physical memory in
the computer. When enough of the spread sheet data has been moved from physical
memory to the swap file, it then brings back the email data. Then you can send
your email. Your other option in a case such as this is to close all programs
then open the spread sheet program. Even then it may have to swap out parts of
the data for the spread sheet, thus making it a slow process to complete a task
when the physical memory is to low.
However on a system that has sufficient or excessive memory (over two gig) the
swap file (or Paging file) may be so large that it becomes unwieldy and takes a
long time to load and unload large amounts of data.
Microsoft recommends a swap file (or Paging file) to be the size of the physical
memory plus 1.5 times that amount. so if you have a computer with 512 Meg of
memory you paging file would be 512 + 768 to total 1280 Meg.
This is fine, but consider some one with a newer computer where the minimum
memory is 2 gig. You would say the swap file should be 2 + 3 gig of memory
making the swap file 5 gig. This is a very large file and Microsoft does not
recommend a swap file larger the 2 gig, and you have all ready met that with the
physical memory alone. So what can you do? Well for one thing you could split
the swap file up, that is make three swap files, two 2 gig files and one 1 gig
file.
Now you have a problem. The problem is the swap file has to have a certain name:
pagefile.sys, this is a system file that resides at the root of the drive and is
hidden (if you know how to change file attributes you can see the file) from
everyday users. Also there can only be one file by this name present at
any time on the root of the drive, you can not give the file a different name
such as: pagefile2.sys, this will not work because the OS has the name
pagefile.sys written in the code.
So to get around this problem you have two options:
The first option will slow your computer down to a preverbal crawl - Make one 5
gig swap file and place it on the C: drive. This is the way it is done when you
install the OS mainly because the Installation program has the rule written in
to the code and it does not look for any other volumes so you have this
humongous pagefile.sys sitting on the C: drive and when the OS needs to swap out
some data it is very slow.
The second option requires you have more than one volume on your hard drive.
That is you have other drives visible in My Computer, a D: drive and possibly a
E: drive this is still a little bit of conundrum, you still need one more drive:
F:
Why three drives?
Well you don't but if you want your computer to be as fast as possible (with the
newer drives coming on line this may be a thing of the past but they aren't here
yet) to do so you would want to remove the pagefile.sys from the drive the OS is
installed on. So with a 5 gig swap file you would ideally need 3 drives to split
the pagefile.sys up.
Such as:
D: - 2 gig pagefile.sys
E - 2 gig pagefile.sys
F: - 1 gig pagefile.sys
This is the ideal way to take care of a large swap file. Or you could go with
two swap files of 2 gig each and only have to have one more volume to put the
pagefile.sys on, D: if you opt to have the first pagefile.sys on the C: drive,
this doesn't meet the Microsoft criteria of physical memory plus 1.5 five times
the physical memory but does work, I have used this method on servers in the
past.
So to get the best performance from your computer your swap file should be the
proper size and be located on a drive or drives other than the C: drive. For
more information on how to change your swap file see
Virtual Memory on this
page,
When you load Microsoft's Windows Operating System starting at Windows 3.1 the
install program loaded an option for Debugging and Error isolation by Microsoft.
To get the necessary information when a 'Stop' error occurred a procedure is
written in to the code of the Operating System that triggers a 'write to disk'
of the physical memory. This is known as a dump file.
Note: This dump file will only be written if the
Operating System completely loads before the error. If the OS is 'Blue
Screening' before the OS loads the dump file can not be written.
Now this is all well and good for developers and testers but what good is it to
you?
If and this is a very large if, you have a software and / or hardware
conflict or failure that causes your computer to shut down you want to know how
to fix it, correct? But what if the error is intermittent or only occurs when
you have a certain program running?
What can you do? You can set up the dump file to run when the OS detects the
error and have the file made before the OS restarts the computer.
Now this comes with a couple grains of salt: Only Microsoft or Microsoft
Certified vendors have the program to read the dump file, it is formatted as raw
data, in other words it is the bytes that make up the memory at the time of the
error or conflict that caused the OS to restart.
Because this is a raw data dump of memory it is the complete physical memory and
the memory in the processor cache it will be quite large (especially if you have
over a gig of memory), or if you set it you can have a dump of the kernel memory
only (this is the memory being used by the processor and the cache memory only)
then it will be up to five meg.
Another thing to consider is with a full memory dump is if the dump can be
completed on the drive that you have selected for the dump file, if for instance
you select the default, it will be the OS drive (normally C:) and you did not
know that the file would be two gig in size when it was made and you did not
plan on the computer having a problem so you have not allocated the extra space
for the file, and to top it off the C: drive only has one gig of free space. Now
your problem has increased proportionally to a point where you can not keep the
computer running long enough to clean off sufficient space for the dump file.
If you are having problems with gaining enough space to create the dump file
consider writing it to another drive, in the box 'Dump file' you can specify a
different drive and name for the dump file, if the check box for ' Overwrite
any existing file' is checked it will over write any previous dump file, if you
want a history (some times a software vendor's support would like more than one
file) then uncheck this box and the process will write the memory dump files
such as: MEMORY.DMP, MEMORY1.DMP, MEMORY2.DMP. This is useful for a history of a
problem. Just be certain the drive you are writing to has sufficient space for
all these files. And Microsoft doesn't teach this in their certification
programs.
So when you setup your dump file if you chose to do so consider the
ramifications of the size of the file in two ways: The time it will take to
write it to disk and the space required to hold the file when it is written.
(see this page about
optimization)
The different types of Dump files:
You can have:
(none)
Small memory dump (64 Kb)
Kernel memory dump
Complete memory dump
Be aware the if you select none, you get none, but there is a trade off - you
use less system resources.
If you select a 'Small memory dump (64 KB) or 'Kernel memory dump' then the
vendor or Microsoft may not be able to isolate your problem. If you have a
problem that you want to pay Microsoft to diagnose and give you a fix for they
will request a 'Complete memory dump' and will charge you by the hour to analyze
the file, unless you have a maintenance contract that includes debugging of a
Memory dump file. Most large corporations have this type of contact. It doesn't
pay for an individual or a small business to have this type of contract because
it runs in five to six figures per year.
For normal operations you can get away with out having a dump file. Unless it is
a server I setup most systems as none, and remove the check boxes from the
'Write an event of the system log' and 'Send an administrative alert' the reason
is that unless you are doing development or debugging software the normal user
will not crash a system often enough to justify the over head that this option
adds to the system resources.
If you do have a problem you can always turn the dump file option on and get the
dump file, just insure your drive has the space for the file. Some vendors will
request the file if you are having a problem with their software and open a
support ticket.
My advice? Turn it off, if you have a problem then select the type of file the
support tech is asking for.
This site contains a lot of information. As
with any publication not all information is available due to space, time, or
subject constraints.
If you have a question that you did not find the answer
on this web site you a can
ask your question here and we will endeavor to get you the most up to date
answer possible!