Tips and Trics
Page file secrets
Using the page file and virtual memory is for a lot of people scary, they don't know what it is and what they can do with it. They freak-out when Windows shows the message "u don't have enough virtual memory".. where can i buy it ?
The idea of virtual memory has everything to do with the amount of physical (RAM) memory in your computer. When there is less memory available than Windows needs, the operating system decides to write parts of the physical memory to disk in order to get free space in RAM.
So, basically we have two kinds of memory. The real fysical memory and the virtual physical memory (do you get it ;) All of this memory (real and virtual) is divided into small memory pages and Windows controls these pages. It takes care that frequently used pages will be held in memory and less frequent used pages will be written the pagefile on disk. When an application requests a memory page that is on disk, the operating system generates a page fault and "blocks" the application till the requested page is loaded from the pagefile on disk into RAM.
Loading and unloading page to the pagefile on disk is a slow operation. When we think harddisks are fast, they are a thousand times slower than RAM memory. So make sure you have enough RAM memory installed in your computer, otherwise you will regret it and your computer will respond like a snail..
So, it is obvious that your computer needs a virtual memory. But how much memory is needed ? By default Windows will configure a pagefile with a size of 1.5 times the amount of fysical (RAM) memory. But that's just a guess of our operating system.. Why should i need a pagefile of 12 Gb when i have a computer with 8 Gb RAM installed ?
A more reliable way of calculating the size of your pagefile is using the process explorer of sysinternals (you can download this free tool here). After starting this tool you select "view" and "system information" and you will see the next screen:
In the screenshot above the "commit charge" values are important. This value specifies how much memory the system is using. When the "commit charge" is higher than the available RAM, the system is using it's pagefile and can be relatively slow.
The value that you should focus on is the commit charge peak. This is the peak the system has had since it was booted. This however indicates that your system should be up and running sometime before you start the process explorer, that is the only way you will see reliable values.
Now you know how many memory you need (RAM and Virtual memory together), you can make a decision how many (expensive) RAM you have to buy or (when this is going to be expensive) how big your pagefile should be (in this case your system will be somewhat slower, depending on the speed of your harddisk).
To view the configuration of the virtual memory, go to the configuration panel and select system and advanced configuration settings
Pieter Janssen
PEJANSSEN.nl

