Page 1 of 2

Best Virtual Memory setting?

Posted: Fri Sep 05, 2003 11:45 pm
by blade
Anyone ever get this down pat?

I tried letting windows manage the virtual memory, but still get disk caching slowdowns. A search on google shows some "experts" saying to make both initial and max to double your real ram. But with that I still get disk caching.

I have a gb of ram, using 2 hard drives (single partition each) and XP. I set both hard drives virtual memory to double my ram (2000), initial and max.

I have an 80gb as massa and a 120gb as slave. I'm about to replace the 80gb with a 160gb.

Any better suggestions?


thanks

Posted: Fri Sep 05, 2003 11:52 pm
by NascarFool
I have 1 gig of ram and two 40 gig drives. I set my virtual memory at 512 min/max megs on drive C only. Runs fine for me. :)

Posted: Fri Sep 05, 2003 11:58 pm
by blade
So you leave the slave drive set at 0's? hmmm, wonder if that is better, or worse.

Wouldn't 512 not be using all your ram?


I'm no expert at this, but I is learning. :d

Posted: Sat Sep 06, 2003 12:03 am
by SsZERO
I copied off Linux and made a partition for the virtual memory at the beginning of the hard drive. You can do this using partition magic, or when you initially set up Windows. For all systems I build, I use this scheme:

[Outer edge of HD (fastest)] [Inner Edge of HD (slowest)]
|--------------------------------------------------------------------------|
[Swap File] [Boot Partition w/OS] [Optionally Data Section]

The swap fill should be about 1.6-1.7x the size of your system memory, and do not make it "dynamic" by specifying different min-max values. Make it static by setting two equal values.

Make the cluster size on the swap file partition 64K, the largest windows supports. It'll give you the best performance.

Posted: Sat Sep 06, 2003 6:08 am
by DocSilly
I think the part about SWAP/pagefile being 1.5-2 times the size of your RAM is from the old days when you only had 32MB of RAM.
Most OS will page out rarely used memory blocks to the SWAP/pagefile even when there's still more than enough free memory.

There are some registry tweaks for Win2k (might also work in XP) right here that decrease pagefile usage.

WinXp users can also try to disable their pagefile when they have 512MB+ RAM, there's a quick howto right here. This shouldn't be a problem for most but some apps (mainly graphical programs) refuse to run without a pagefile.

Posted: Sat Sep 06, 2003 10:58 am
by FlyingPenguin
Anything over 512Mb I'd let Windows manage it.

If you're getting excessive disk access I would check your background apps - it's probably not the swap file.

Posted: Sat Sep 06, 2003 1:40 pm
by Pugsley
I have a GIG and i turned it of... been runnig with it off for about 5 months now and never ran in to any problems with games or anything else i do.

Posted: Sat Sep 06, 2003 2:49 pm
by FlyingPenguin
Pugsley, I would never recommend turning off your swap file. There are some apps that won't even work without a swap file.

Posted: Sat Sep 06, 2003 3:28 pm
by Executioner
I'm running Win98 with 512 megs of ram, and I have this setting in the system.ini file:
[386Enh]
ConservativeSwapfileUsage=1
This setting forces Win98 to use real ram first before the swap file. Works great.

For XP, I would think that allowing XP to manage it would probably be best. Like FP suggested, it must be some app or some other part of XP that is running in the background. You could download and install CACHEMAN . I had to with Win98 as my icon cache size was way too small, and I would get slowdowns when booting to the desktop. I increased it to 1,700 icons and it's been working great now for over a year. About one a month before I installed Cacheman, I would have to delete the SHELLICONCACHE file so it would be rebuilt. I have no idea why, but this file would always give me problems with Win98. Try Cacheman, it might have some cache tweaks for XP.

Posted: Sat Sep 06, 2003 8:25 pm
by tunis5000
I have WinXP and 1 GB of RAM. I have my swapfile set to 512 min and max and have noticed virtually no disk caching. I know you know this, but make sure you defrag the HD every once in a while...

Posted: Sat Sep 06, 2003 11:11 pm
by Pugsley
well.. i do video editing and i havent had a problem yet! As soon as i do get problems ill turn it back on... but ive been going for 6+ months like this and everything is fine.

Posted: Sun Sep 07, 2003 1:17 am
by Jim Z
FP is wise. Let Windows do it's thang with the page file.
I tried letting windows manage the virtual memory, but still get disk caching slowdowns.
erm... disk cache and page file are different beasts entirely. Can you give a little more detail as to what problem you're encountering.
Anything over 512Mb I'd let Windows manage it.
I'd go further and say that with an NT-based OS, let Windows handle it in every case. One thing NT has over Win98 is non-brain-dead memory management.
I'm running Win98 with 512 megs of ram, and I have this setting in the system.ini file:
[386Enh]
ConservativeSwapfileUsage=1
This setting forces Win98 to use real ram first before the swap file. Works great.
eek... this is a bad thing to do. read this. As much as I dislike PeterB, he does know how Windows works.

Posted: Sun Sep 07, 2003 11:43 am
by Executioner
Well Jim, I've always used this setting because I was running Win98 with 128 megs of ram and the setting is still there. My understanding of this setting (from the Win95 days) is if Win98 needs to write to the swap file, it waits until most of your ram is full. Since I now have 512, I don't have any swapping or the creation of a swap file, even though I let windows manage the swap file. I have less disk activity with this setting, and to this day with 512 megs of ram, I still have it set. I originally added this setting because I was getting disk activity while playing Quake type games.

I'm not concerned that much because when this current installation of win98 craps out, it's going to be 2k or xp.

Posted: Sun Sep 07, 2003 12:16 pm
by Jim Z
My understanding of this setting (from the Win95 days) is if Win98 needs to write to the swap file, it waits until most of your ram is full.


This is not a good thing. By default, Win98 will copy (not swap) pages to the swapfile. using CSU=1 will disable that. Lets look at the two situations.

default:

At idle periods, Windows will copy pages to disk. This way, when you do run low on physical RAM, Windows can just clear what's in physical memory right away since it was already paged to disk. You don't need to wait while Windows thrashes your disk.

ConservativeSwapfileUsage=1

Windows will not copy pages to disk while idle. So, when you do finally run low on physical memory, you'll have to wait while Windows swpas pages to disk. I can see any number of situations where this will hurt rather than help performance.
I don't have any swapping or the creation of a swap file,
yes you do.

Posted: Sun Sep 07, 2003 10:21 pm
by Executioner
Well, I don't have a swap file, even though I let windows manage the memory. When I defrag, Diskeeper will show you the location of the swap file in yellow, and I do not have any yellow blocks because I have a lot of ram installed. If I remove this setting, then windows creates a ~30 meg swap file for what purpose? I don't plan to run low with physical memory which is why I have it set to mange it the way Win95 did.
http://www.tweak3d.net/tweak/quickspeed/
http://support.microsoft.com/default.as ... us;Q223294

All I know is with this option enabled, I have zero disk activity especially during games.