RAM and Virtual Memory in Win2K

lankia

Member
Nov 29, 2000
166
0
0
I recently bought a 512MB High Density Ram and plugged it into my Abit KT7 mobo. I am running Win2K, which supposedly has 'good' memory management. Lately, I have been getting an warning message about my system running low on virtual memory. I checked the Win2k's memory monitor and less than 350M of the total physical memory available was being used. How does the amount of physical memory affect virtual memory allocation or vice versa. P lease advise. Thanks.

-lankia
 

MysticLlama

Golden Member
Sep 19, 2000
1,003
0
0
Try installing SP2 if you haven't already, there is a memory leak issue in SP1 that gets fixed. It might possibly solve the problem, never know.

I was experiencing the same thing with a webserver, but it was filling up the physical memory as well.
 

Nevo

Banned
May 28, 2001
696
0
0
W2K will always page, no matter how much RAM you have.

As a general rule, (and this is open to many interpretations), pagefile space should be 1.5 times RAM.

Why? I dunno. That's just what they tell me.
 

SUOrangeman

Diamond Member
Oct 12, 1999
8,361
0
0
COuld be just a poorly written application. I have 256MB of RAM and my page file is still at the 100MB minimum I set many months ago.

A poorly-written app can eat up swap space and not fully utilize available memory. Heck, even bad drivers can do that. (No comment on a poorly-written MS product, hehe.)

-SUO
 

lankia

Member
Nov 29, 2000
166
0
0
I still have about 4 GB of free space on a 10 GB hard drive. How does one set page size?? I thot Win2K handles paging automatically. By the way, it's only after I installed SP2 that I started noticing my problema.: (

-lankia
 

kazeakuma

Golden Member
Feb 13, 2001
1,218
0
0
I've had the same problem albeit it with half the ram (256). A reboot will fix it, so I assume it's a memory leak. I haven't put sp2 on yet though. To change the swap file size either right click on my computer and click on properties or press Windows Key + Pause/Break then click on the performance tab and then virtual mem. I think, I can never remember and I don't have a 2k machine in front of me at the moment.
 

lankia

Member
Nov 29, 2000
166
0
0
If I have n partitions, do i have to set a page size on each drive?? if yes, does the page size have to be the same on each of the drives?

-lankia
 

SUOrangeman

Diamond Member
Oct 12, 1999
8,361
0
0
lank-

One page file will do ... at least in Win2K. WinNT4 requires a page file on every NTFS volume, if I am remembering correctly.

-SUO
 

Woodie

Platinum Member
Mar 27, 2001
2,747
0
0
You can put any amount of swap, on any partition/drive. Except, you must have at least 2MB on the C (or is it the system?) partition.
Also, if the swap file on the C partition is smaller than the amount of RAM you have, then you won't be able to capture dump files (from BSODs). For most people, dumps aren't that important.

The usual advice is to put your swap file (the whole thing) onto the most used partition on the least used drive. Uh-oh...I can't remember exactly. It's either that or the least used partition on the most used drive.

I don't think NT requires a swap on every partition. W2K doesn't.
 

lankia

Member
Nov 29, 2000
166
0
0
Thanks for the replies guys ..
I am a bit confused by Woodie's advice ..
Here is my understanding (please correct me if i am wrong):
1. I have 512MB of RAM, so I should set my page size to 768MB.
2. All of the page files should be located on my most active drive, which in this case is C:.

-lankia
 

Woodie

Platinum Member
Mar 27, 2001
2,747
0
0
Since I confused you, I'll try and answer first.

There's been considerable discussion recently, on what the "right" size is for a swap file under W2K. Old school said: 2X amount of physical RAM. New school says: 1x amount of physical RAM + 12MB.

Given that you have 1/2 a gig, I'd go with the newer school: 524MB swap file.

As to location:
If you have a single drive, single partition, there isn't much choice. ;) With multiple partitions, put the swap on your busiest partition.
If you have two drives, single partitions, then put the swap on your least busy drive (probably the second drive). If you have multiple partitions, pick the busiest partition.

The difference in performance with moving the swap file around should be pretty small. The key things are:
Minimize fragmentation of the swap file. (so put it all in one place).
Lower the overhead, by making it a static size. (set min=max=524).
Attempt to minimize drive head travel, by putting the swap file close to where the drive heads would be anyway (busiest partition, least busy drive).

I hope that's clearer.

--Woodie
 

Santhrax

Junior Member
Jun 27, 2001
24
0
0
What type of applications are you running? Any shareware,trial,non-standard, java-based? If a program, small or large, allocates ram and doesn't unallocate it when it's finished, it can slowly... or quickly take up ram depending on how much it uses at a time. Especially look out for programs querying large databases, or pulling up graphics repeatidly.
 

lankia

Member
Nov 29, 2000
166
0
0
Woodie, that was very informative. thanks a lot ... really appreciate it .. but i still have questions.:)

I have 2 drives and 3 partitions <C (10GB) &amp; E (6GB) belong to my primary drive while D (10GB) belongs to my secondary drive>. D and E are primarily for data storage .. so I do write to/delete from them a lot. I would like to ask what constitute &quot;busiest&quot; drive? Is it data transfer load or applications load? Where do you think I should put my page files on?

The applications I run are mostly IE, Eudora, Netscape, ICQ, CuteFTP, InoculatIT (virus scanner), Pop-up Killer, G6-FTP server, Norton Internet Security, Ad-Ware Plus, SecureCRT, Photoshop, Acrobat, Dreamweaver, Flash, MS Office, Nero, CDR-Win, Ulead Photo Explorer. I presume they are all standard programs and should be able to de-allocate the RAM they used pretty well.

-lankia
 

Woodie

Platinum Member
Mar 27, 2001
2,747
0
0
The easy question first: The busiest drive is the one where there is the most disk activity (read &amp; write).

Which drive?? That's a tougher question. Is there a significant difference in drive speeds? If yes, then put the swap on the faster drive.

From your description of application load (pretty good, BTW) I assume that all your applications are on the C drive, along with the OS.

If drive #1 is faster, then put the swap file on the E partition (you load appls more than a particular data file, and we know the OS &amp; temp files are on C.). If drive #2 is faster or the roughly equal, then put the swap on D. (A less busy drive, because the OS &amp; applications aren't on it).

Heck, why don't you try it way for a week or so, benchmark it, and tell us which one seemed faster?

--Woodie
 

lankia

Member
Nov 29, 2000
166
0
0
When it comes to bench-marking, I am worse than a novice. But I would like to give a shot at benchmarking. Which benchmarking software should i start with?

-lankia
 

Nevo

Banned
May 28, 2001
696
0
0


<< Since I confused you, I'll try and answer first.

There's been considerable discussion recently, on what the &quot;right&quot; size is for a swap file under W2K. Old school said: 2X amount of physical RAM. New school says: 1x amount of physical RAM + 12MB.
>>



Actually, it gets more complex than that.

XP, by default, uses 1.5x RAM.

The RAM+12 was necessary to get a dump under NT4.

There is no requirement that there be a pagefile on the C: drive (unless you need to get a dump).

You can have up to (I think) 16 pagefiles, but the GUI will only allow you to create one pagefile per drive letter. To get more than one pagefile per drive letter, you have to edit the registry. There's no benefit to doing that.

If you have C: and D: partitions on the same physical drive, moving the page file from one to the other will give you no speed benefit; it's still the same read/write head moving to another location on the disk.

W2K will ALWAYS page, no matter how much RAM you have. A poorly written app can't affect paging directly. It can allocate memory, and the OS will decide what gets paged when. But the app itself doesn't directly control paging.

A perfmon log can be used to help you determine where your pagefiles should be and how big they should be.

To answer the original concern, if your system is running low on virtual memory, it means that the system is running out of COMBINED RAM AND pagefile space. Most likely, an app is leaking memory. Again, a perfmon log can help identify the app. Making a bigger pagefile might temporarily alleviate the problem, but if you're running a leaky app, it'll still come back.

Of course, some programs (Photoshop, for example) require lots of pagefile space because they have legitimate uses for gobs of memory. If this is your situation, then enlarging the pagefile to meet the demands of the apps you run is a correct solution. Again: a perfmon log can help you determine what's going on on your system.
 

Woodie

Platinum Member
Mar 27, 2001
2,747
0
0
Performance Monitor:

Start - Program Files - Administrative Tools - Performance.

Add all the things you'd be interested to a chart, minimize it, then go do normal stuff. Come back, look at the chart for memory usage, swap-file size &amp; utilization stuff.

Then size your swap file a bit bigger than whater you maxed out at.

PS: This is intentionally not too detailed. You should get in there and poke around, look at the different things, and read the help. This should be an &quot;exercise for the student&quot;, and to get to know your computer better. :p

--Woodie