swap file stuff from power win2000....
"Subject: POWER WIN2000 January 10, 2001 Vol. 3, No. 2
By Serdar Yegulalp, Winmag.com
SWAP FILE SECRETS THAT SAVE MEMORY
It's been a while since I've written about real nuts-and-bolts Windows 2000 topics, so I thought I'd get back on track this issue. During the past week I received a few tips in the mail that pertain to the paging file, also known as the swap file or virtual memory file, so I thought I'd make that this week's subject. (I'll return to the topic I touched on last week -- applying profiles to users -- in the future, and I'll also write about Active Directory.)
First, a quick recap of the basics. The swap file sits on a local drive in your machine and is used to extend the amount of memory that Win2K can access. There are almost inevitably going to be situations that demand more memory of the system than is currently available. When this happens, pieces of memory that aren't currently being used are written to the swap file, in units called pages (hence the term "paging"). Those bits of memory stay paged out until an application or the system itself asks for them -- at which point they're swapped in again, and replaced with some other bit of memory not currently in use.
Since hard disk space is far cheaper but also far slower than hard drive space, you can get a lot of mileage out of a good-sized swap file -- but at the expense of speed. Many people seem to think that all you need to do is buy a 100GB hard drive, and presto, they've got 100GB of memory! This is simply untrue, partly for reasons of speed but also because it takes a certain amount of physical memory to manage each block of swap space. After a while, you run into diminishing returns if you try to stake out a mammoth swap file (mammoth in proportion to your physical memory, that is) and use it as a substitute for RAM by running memory-hungry programs like Photoshop.
Setting the swap file size isn't hard. Right-click on the My Computer icon, select Properties, click the Advanced tab, and press the Performance Options button. The existing virtual memory size will be listed there; to change it, click Change. You'll be able to specify page file sizes for each volume in your system. The initial size should be set to the "Recommended" number listed under "Total paging file size for all drives," but the maximum size can be anything above that you wish.
The most basic and obvious trick with the swap file: Don't put it on the same hard drive as your operating system, if you can help it. If you've only got one hard drive, but it has multiple partitions, devote a partition at the front of the drive for the boot loader files and the swap file, and nothing much else. The most efficient thing you can do with a swap file is to put it on a drive other than the drive holding Win2K itself. This will speed things up noticeably, because two totally different physical drives will handle calls to the OS and calls to the swap file.
You can place multiple swap files across multiple partitions or hard drives, creating in effect one giant page file partitioned across several volumes. This is a good idea if you've got space to burn on multiple partitions, but bear in mind that the swap file cannot be moved by the Microsoft-supplied defrag tool in Win2K (although it can be defragmented by third-party programs.)
Note that if you're running Win2K as a server, or you're using a system for development and testing, keep at least part of your page file on your boot drive. In the event that Win2K crashes or issues a blue- screen error, a copy of the system's memory gets dumped out to that page file for debugging. This isn't an absolutely indispensable feature, however. If you don't perform any debugging, you have no obligation to keep a swap file on your boot drive. Put it anywhere you choose.
When Windows NT was first introduced, computers with more than 32MB of RAM were a rare item. Windows NT 4.0 needed 32MB or better to perform halfway decently, and now Windows 2000 really needs 128MB or better. (Notice a trend?) Although RAM still isn't cheap, computers ship with more of it than ever, especially high-end servers, which can ship with gigabytes of RAM. On higher-end systems, swap files can get really huge. The recommended size for a swap file is around twice your system memory size, but it can certainly be larger than that by a few times, if you want it to be.
The controls for setting the swap file don't let you specify anything larger than 4,096 MB or 4GB per volume, but as we mentioned before, you can put swap files on more than one volume. If you want to make individual swap files larger than 4GB, see Microsoft document Q237740, "How to Overcome 4,095-MB Paging File Size Limit in Windows 2000" for details. I don't imagine there are very many people who would be tempted to devote, say, an 8GB partition to nothing but swap space. But then again, you never know!
The document can be found at support.microsoft.com.
On a final note, I've had to boot a system into the Recovery Console at least twice before, in an attempt to remove manually a paging file to free up some room for an installation. Unfortunately, the file -- which is named PAGEFILE.SYS -- isn't visible from the Recovery Console command line. Using ATTRIB -H doesn't reveal it either. After some monkeying around, I broke down and did some research, and found out that the only way to make the file visible is to copy another file on top of it. It doesn't matter what file you copy. Once you do that, PAGEFILE.SYS becomes visible again, and you can easily delete it."
winmag.com
[note: my bolds]
:)
mark |