Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

swapfile, virtual memory advise please

Status
Not open for further replies.

rfeenie

Technical User
Sep 29, 2000
292
0
0
GB
i've got a pc with 128Mb of RAm, 1.6G free of hdd space, whats the best settings for virtual memory? is there a formulae to go by, can you use too much ?

If in doubt get the Ball Pein Hammer out
 
Is the amount of free space you give TOTAL disk space, or on the C: drive? Do you have a D: drive? What I do (generally) is look at how much V.M. is allotted by NT in the first place (usually something like 139MB or so on my machines and not enough for my purposes), then look at how much free space exists across the entire HDD. If I can do it, I basically double the amount that NT has allotted (if you have multiple partitions, you can spread it across them if you want to), reboot and all is well. I know that there are formulae that some people prefer to use, and you may want to see if someone else can give a good reason for using them, but I've never experienced any problems doing it the way I described. I think the only way you could use too much VM is if you are almost out of disk space, and make the mistake of allotting all the free space to VM.
Hope this helps a little... :)
 
The general rule of thumb is to locate the swap file on a different partition (from NT), and to make it the amount of physical RAM plus 12-20mb. Yes, you can make it too big and NT spends too much resources maintaining the swap file. Yours should be about 140-150mb.

One more thing; make the beginning size and the ending size the same. NT will perform better if it is not continually trying to re-size the swap file.

Hope this helps...:cool: - Bill

"You can get anything you want out of life, if you'll just help enough other people get what they want" - Zig Ziglar
 
We run a small NT network. (110 PCs) and we set the virtual memory at 1.5 times the amount of actual ram. i.e. If you have 128 meg of ram we would set the virtual memory at 192 meg.

We also try to keep all of the virtual memory in one partition so NT doesn't have to work so hard to keep up with where it parks files. I agree that too much virtual memory will slow your system down.

With the price of RAM now you may want to look into another 128 meg of ram.
 
thanks guys thats cleared that up nicely !

Rob
If in doubt get the Ball Pein Hammer out
 
I don't wish to confuse matters, but most theories I've read state that spreading the pagefile over multiple partitions actually improves performance...

One theory on why this might be so is that, since most server hard disk controllers have an on-board cache, the disks are seen as a single chunk of storage. When a request is made for a page held in VM, the disk controller queries all disks simultaneously. Since the reverse happened when the page(s) were written to disk, "striping" the page file will mean that there is far less seek time involved; the speed that the controller can query a disk cache is much faster than the speed at which a head can reach a particular sector.

It is worth noting that Windows needs at least 2Mb VM in the root, so you need some of the page file there. It is also worth noting that if (like me) you like to have the full debug information, you will need the root swapfile to be at least equal to the size of your RAM + 12-20Mb.

There are so many (excellent) theories on how VM works, that no two engineers I know give the same answers to the question "what is the optimum setting for a swap file?"

The only correct answer is - whatever works best for you! :)
 
In reply to CitrixEngineer, spreading the swapfile over multple "disks" other than the boot disk (the disk were the sytem files are in NT not the boot files, go figure Microsofts logic!)will improve performance. The controllers are able to write to the multple disks at the same time. With multiple partitions on the same disk there is no performance increase as it is only able to write to one section at a time. Microsoft does reccomend moving the swapfile off of the disk were the system files are located so that the OS is not trying to read system files and write to VM at the same time, and sizing at RAM +12. I agree that a little more is beneficial and to much will hinder performance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top