PDA

View Full Version : Refresher course on setting virtual memory


Calli
09-23-2008, 07:47 PM
It seems years back that I really did know how to change virtual memory settings but my mind is drawing a blank now. My husband has added a text reader from the Blind Foundation but he keeps getting error messages about needing more virtual memory. Right now he has 768 of regular memory in his IBM desktop (P4) and I was going to change out the one 256 with another 512. That won't cure the error message though. How do I change the VM setting?

Paul Komski
09-23-2008, 09:13 PM
Which Operating System please? If XP it would be System Properties (FlyingWindowsKey + Pause) >> Advanced >> Performance Settings >> Advanced >> Virtual Memory Change >> Select Drive and Settings and make sure you hit the set button before exiting. Reboot and check that the settings have taken.

Calli
09-23-2008, 10:46 PM
Thankyou It is XP. What is the formula for setting the virtual memory. I think it used to be a percentage of RAM.

Sylvander
09-24-2008, 04:36 AM
For Windows [on C:?] to be able to DUMP the contents of RAM to the Paging File [must be on the same partition as Windows]...
That Paging file must be at least as big as RAM.

I made a 1 GB dedicated partition [H:] to hold a 1 GB fixed-size Paging File; so far it has been working well.
It doesn't become fragmented; doesn't need defragmenting, unlike the Paging File on C:

Anyone know HOWTO defragment a fixed-size Paging File on C:?
It's in 6 parts, scattered over the free space at the end of the partition! :confused: :(

Paul Komski
09-24-2008, 07:34 AM
XP's default is 150% of RAM but that is overkill on most of today's systems especially those with huge amounts of RAM. To arrive at a sensible amount either let windows set it for itself or monitor VM usage and then set it at a level a bit higher than the max you ever use (Task Manager's Performance Tab). Complete memory dumps (where everything in RAM is dumped for later debugging) is very seldom used or necessary with automatic mini-dumps usually sufficing.

Anyone know HOWTO defragment a fixed-size Paging File on C:?
There are a number of methods but the easiest is to have an adequate pagefile on another partition and to then remove it from C: or change its size to a couple of megabytes. Run chkdsk C: /f and reboot and then Defrag C: normally and then reinstate the pagefile.

To be honest a six-fragment pagefile wont hit performace noticeably. A fragmented MFT or a very fragmented FAT volume would be different issues. The usual problem with the pagefile constantly changing size is not the fragmentation of the pagefile itself but of causing the drive as a whole (particularly on FAT volumes) to become fragmented.

Sylvander
09-24-2008, 09:34 AM
"the easiest is to have an adequate pagefile on another partition and to then remove it from C: or change its size to a couple of megabytes. Run chkdsk C: /f and reboot and then Defrag C: normally and then reinstate the pagefile."
Did all of that except chkdsk C: /f [my FAT32 file system is always OK because I use MS Scandisk frequently and at the slightest hint of possible problems].
I even scanned [after removal of the paging file on C:] when within UBCD4Win.
When I reinstated the pagefile it was in 6 fragments from the get-go.
[See the screenshot below; the pagefile is maroon]

Ashampoo Magical Defrag is normally running/scanning at all times in the background.
.

Paul Komski
09-24-2008, 09:38 AM
It doesn't look as if there is enough contiguous free space to allow for the pagefile itself to occupy a contiguous block. That was the reason for suggesting to defrag the drive before reinstating but if defragging doesn't leave enough contiguous free space any large file is bound to be fragmented.

Sylvander
09-25-2008, 05:27 AM
When I remove the pagefile, then defrag->[be it in Windows or UBCD4Win], there are still folders/directories scattered all over the [almost] empty space gathered at the end of the partition.
[Is there no program out there that would bunch up all those scattered folders?]

So when I remake the pagefile...
It's true that there isn't any one single empty space available to take the pagefile.
But then it seems Windows doesn't even make good use of the space available when the pagefile is recreated. :confused: :(

Paul Komski
09-25-2008, 06:54 AM
Is there no program out there that would bunch up all those scattered folders?That's what defragmenting is supposed to achieve but there may be problems moving any folders in-use if you are defragging from the same system volume.

There should be a defrag for dos (http://www.easydos.com/defrag.html) available somewhere and should be fine on your FAT volume. I don't think there is a defrag available from the recovery console but there are various plug-ins for a BartPE CD. The alternatives are a second install or just create a separate partition for the page file to occupy all on its own.

jlreich
09-25-2008, 09:29 AM
Here is PageDefrag from Mark Russinovich (http://technet.microsoft.com/en-us/sysinternals/bb897426.aspx). Haven't used it yet but will give it a try later.

Looks like it will also defrag other system files that normal defrag cannot. :)

Sylvander
09-25-2008, 10:12 AM
I've had PageDefrag v2.32 installed for some time now.
Used it in the past and although it did its job for most of the appropriate files it was causing difficulty with one or two, can't remember of what exact nature, but was quite nasty.
I'll give it another try after making a fresh image backup of C:.

Found FreeDOS Defrag (http://www.nongnu.org/free-defrag/), downloaded the zip file and extracted the contents, but don't know what is to be done with these. [See screenshot]
No instructions to be found.
.

mjc
09-25-2008, 10:14 AM
PageDefrag was written to specifically address Syl's issue. I've played around with it and it does work...but like any defrag program it may need a couple of shots at it, if things are badly fragmented. Just let it do the pagefile...

Another option...Auslogic's DiskDefrag (http://www.auslogics.com/en/software/disk-defrag) is included in the tools on the UCBD4Win (http://www.ubcd4win.com/)...use that to defrag.

Now, to bring this all back to the original topic...

Calli, after you make changes to the size of the page file, it is a very good idea to go ahead and defrag to try to get it all to be contiguous...

Also, you could have the problem you are describing if you have the pagefile in some other partition than on the C: drive...some programs want it there, no matter what, so in order for the warning to be eliminated, the pagefile, of adequate size must reside on C:

Paul Komski
09-25-2008, 07:12 PM
Also, you could have the problem you are describing if you have the pagefile in some other partition than on the C: drive...some programs want it there, no matter what, so in order for the warning to be eliminated, the pagefile, of adequate size must reside on C:
Is this really absolutely so? The NT OSes manage the page file/virtual memory very efficiently even (and perhaps particularly) if split across numerous partitions. Such advice sounds more appropriate for a DOS-based OS but I'm open to correction. Heck, if the page file isn't big enough windows XP will usually override the current settings and enlarge it if able to and even if one has specified a "fixed size".

Sylvander
09-25-2008, 07:32 PM
When my PC's only pagefile was in the dedicated H: partition, the only complaint from Windows [or anything else] was during a BSOD when there was a notification of no pagefile on C: to dump the contents of RAM into.

mjc
09-25-2008, 11:16 PM
Paul, it isn't that it is a Window's problem...there are some apps (I can't remember which one it was that I was using that did this...I don't use it anymore and haven't for a while.) that expect the pagefile to be on C: and that is all that they will accept...even if Windows is splitting it across several partitions, flawlessly. If the size of the actual file on C: isn't big enough, then the app will cough up the kind of error described. It is/was more common with games, more than anything else.

No, it isn't very common...and extremely rare for programs written in the last five years or so...

Paul Komski
09-26-2008, 10:39 AM
it isn't that it is a Window's problem
I see. Yes indeed there are legacy programs that look to C: for more than just the pagefile.

When my PC's only pagefile was in the dedicated H: partition, the only complaint from Windows [or anything else] was during a BSOD when there was a notification of no pagefile on C: to dump the contents of RAM into.I believe there is a recommendation somewhere to always have a minimalist pagefile of 2MB on the system partition - and the system partition under the NT-based OSes is not uniquely but nearly always C:.