Jump to content
Sign In to follow this  
X-Man_from_Althuette

a general tip for the pagefile...

5 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 

first of all, if you turn off paging please make sure, that your RAM is big enough to run your operating system on its own (without the pagefile) because (I made this experience one time with an old Pentium2 with only 64MB RAM running with WIN 2k SP4) if the RAM is too small you're OS may will never start, so first you should check out how much virtual memory your operating system needs on its own (Task Manager etc.)(Here be may some recommended values: on win 2k there should be 512MB, on XP 1GB; i've never worked with vista so I don't know but I think it should at least 2GB or even more).

In fact the managing of the virtual memory is weak spot of windows (especially of the older NT versions like 2000 and less) e.g. the pagefile is fragmenting very fast and windows does not take full advantage of the RAM. The point is that the Pagefile is handled as a system-file and can't be defragmented and it has every time (also after a reboot) the same position on the hard drive (of course it changes but only when it really HAS to);

but there is a way you can delete it without turning off paging (I would say its an alternative method which is a bit safer and "healthier" for you and your computer)

but now lets get to it:

there is a hidden option in the registry (regedit.exe; for them who don't know, this is the file where all settings are saved)

1) go to the registry (it's in your windows-directory; something like C:\WINNT\regedit.exe)

2) get the following path (left side): HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Session Manager\Memory Management

3) there should be a value with name ClearPageFileAtShutDown (right side) if this setting is activated, windows is deleting the pagefile when it's shutting down and creating a whole new one which is not fragmented when booting (it may be fragmented if there is not enough disk space)

4) to change the value double-click on it change the value and press OK (the value is 1 for enabled and 0 for disabled)

the negative thing about it is that it may take longer to shut down/start the computer (it depends on the size of your Pagefile)

you also can set the value back to 0 afterwards.(i set it to 1 for ever)

it should work on win 2000 and XP

now to get Windows to take (nearly) ALL the RAM BEFORE using the pagefile (it normally does not do that) you have to set the initial value of the pagefile very LOW (not 4096-4096 but maybe 64-4096 or 128-4096; the initial value should be enough to start windows ONLY)

and if windows needs more it's taking it (I don't know if it's the same in XP but in 2000 there is a warning-message if the initial pagefile is not enough anymore)

if there are any questions, post it

Sorry for my not so good English; I'm from Germany

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

I am afraid you don't understand "fragment", that is when a file is too large to go in one continuous space. Just deleteing the page file, and making a new one will not keep it from fragmenting, in fact, it quite possibly could make it more fragmented.

There are 3rd party apps that will defrag the page file, and place it first. But all of that is nonesential, if your computer is using the page file that much, you need more memory.

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

I also don't think you have a good concept of the page file. All your information seems to be correct as far as I know, but most of it is a LOT of worry about something that DOESN"T MATTER AT ALL. Pagefile is a TOTAL GARBAGE FILE.. NOTHING is stored there that is critical to the operation of the system (other than it needs SOMEWHERE to put it) Consequently it is CONSTANTLY being overwritten (which is why it is often very fragmented). While it is true that a perfectly defrag'd file would be better than a defrag'd file, the fact is it would become fragmented again almost the instant it started being used. As tungsten points out you CAN defrag your file if you're really concerned about it.. but try it then run your system for awhile.. one of 2 cases will occur.. either it will be totally fragmented again (as it is being constantly written/overwritten as windows makes use of it for temporary storage) OR it will be completely as you set it because you have so much memory that it simply isn't needed.

Pagefile is really just an "escape valve" which allows a non-concurrent (or non-parallel if you wish) processing operation to effectively deal with multiple concurrent operation (really by breaking it into a series of serial thread).

If you're having real problems because of your pagefile, you simply need more operating memory for the tasks you are trying to accomplish. As the system is choked off for less and less memory the pagefile will ramp up its usage to the point it is constantly thrashing.. at this point you may as well not have a pc since you'll spend all your time in the bathroom or kitchen waiting for anything to get done.. 2.gif

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

Please pardon me - but (FYIs to the un-informed):

Microsoft's Windows works a LOT BETTER with a pagefile,

although it may be argued that it is not handling it properly,

than without one.

And while it may take longer to boot - the idea of clearing the pagefile

as part of the shutdown process can clear up certain (unspecified) problems.

Hacking (directly modifying) the windows registry is highly discouraged;

I don't remember exactly where to find it - but Microsoft did provide a control

to be used to set/change the above mentioned registry property.

As to size (while I'm not up to date on the latest releases) the pagefile was

originally designed to augment (i.e. make believe that you have) 4 GigaBytes of RAM;

and the recommended size is a trade off between twice your actual RAM and 8 Gigabytes.

Please don't tell me - I already know - at the time of this original design, NEW hard-disk-drives

were usually in the 100's of megabytes range; making gigabytes of RAM seem like a pipe dream.

-NetPCDoc

No detail is too small to be micromanged.

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

Most intriguing, so far.  If your page file is one contiguous hunk of 4GB, in XP this is the max.  The system divides this up into equal sized pages and uses it to swap whole pages out of memory as needed (page size, I think I remember, is 512 Words (2K), but it doesn't matter as long as the page file is a multiple of the page size.

This file will not become fragmented if it is a maximum size when the system starts.  The paging algorithm is a Least Recently Used page is marked for removal.  The next sweep, swaps it out to the page file used or not.  This little error can be quite expensive.

Good operating systems only swap out pages that have been written upon and are marked "dirty".  Clean pages are gotten from the operating unit of the program.  Unfortunately, Microsoft doesn't seem to have the idea of "get clean pages from the prepared and paged divided text of the program and not put clean pages on the backing store (swap file).  But then, I don't think Microsoft's NIH syndrome will ever allow them to use an idea that has been around since 1950 or so.  They continually try to re-invent the wheel.  So far the "wheels" have all been flat-sided.


Beware: Emancipated user.  No Windoze for me.
The teacher opens the door but the student must enter himself. - Ancient Chinese Saying

Every minute of hate in which one indulges oneself is sixty seconds of happiness lost.
Music expresses that which cannot be put into words and that which cannot remain silent. -- Victor Hugo
If you always do what you've always done, you'll mostly get what you've always got.
JohnNewSig.gif
"We have met the enemy, and he is us" - Walt Kelly

Come join us at the Moose Factory

Share this post


Link to post
Share on other sites

Sign In or register to comment...

To comment in reply, you must be a community member

Sign In  

Already have an account? Sign in here.

Sign In Now

Create an Account  

Sign up to join our friendly community. It's easy!  

Register a New Account

Sign In to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Thank You for the Continued Support!

Simtropolis depends on donations to fund site maintenance costs.
Without your support, we just would not be in our 24th year online!  You really help make this a great community. *:thumb:

But we still need your support to stay online. If you're able to, please consider a donation to help us stay up and running. This helps sustain a platform where we can share our community creations for years to come.

Make a Donation, Get a Gift!

Expand your city with the best from the Simtropolis Exchange.
Make a Donation and get one or all three discs today!

STEX Collections

By way of a "Thank You" gift, we'd like to send you our STEX Collector's DVD. It's some of the best buildings, lots, maps and mods collected for you over the years. Check out the STEX Collections for more info.

Each donation helps keep Simtropolis online, open and free!

Thank you for reading and enjoy the site!

More About STEX Collections