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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Swap File/Virtual memory mgt+Win98SE shutdown freezes 6

Status
Not open for further replies.

richardhot

Instructor
Jun 21, 2002
167
US

What is the story on Swap File/Virtual memory settings and Win98SE shutdown problems?
Thank you.
richardhot
 
Two schools of thought , re swap file .

The best way to improve swap file ( Virtual Memory ) usage on systems ( W9x/ME ) with more than
64Meg RAM is this:

DON'T set any min/max parameters . Let Windows handle it!
Put this entry in the system.ini file under [386enh] .
ConservativeSwapfileUsage=1
Check on your swap file occasionally; if you haven't been playing
games or running intensive apps, the swap file often will be 0 (zero).

---------------------------

To set a Minimum swap file & let Windows handle the Max .
Start > Run > System.ini
In the [386Enh] section add a line like

MinPagingFileSize=130000

Save, exit, reboot

(The above sets the min to 130MBs)

--------------------------------------------------


Step by step here .
 
Dear Supergeek,
Terrific references. Thank you.
Best, richardhot
 
There are many schools of thought...

In Win98SE, you can go to "Control Panel -> System -> Performance" and click on the "Virtual Memory" button. Here, you can configure your swap file manually.

How to configure it is another story. Some will tell you to set leave the minimum size = 0, yet others will tell you to only worry about the maximum size. My advice is only change this if you have a second hard drive or a second partition.

If you choose to do so, set the Min = Max. Why? Because it will make the swap file one long contiguous file that won't become fragmented. Set the size to twice the amount of RAM in your system when dealing with 128MB of RAM or less. If you have more than 128MB, then use your best judgement. You don't need to have a 512MB swap file, when you have 256MB of RAM. I've got 384MB of RAM using a 256MB swap file, and I still don't use even half the swap file...
~cdogg

"The secret to creativity is knowing how to hide your sources."
- A. Einstein
 

Thank you cdogg,
Let me ask you:

1. what's your take on setting the VM as you describe versus "let Windows Do it".....what might decide you one way or the other...(128 megs of Ram in question)

2. is there a "install-and-forget" memory mangement utility that optimizes memomry/VM/caching relationships for better performance, without embroiling casual user in too much techno...? I know of RamPage and RamBooster and assume there's something out there that does basic optimization/monitoring without driving one crazy with demands...
Thanks a lot.
Best, richardhot
 
Always glad to help... [thumbsup2]

1) It really depends. If I had less than 64MB, I wouldn't bother. Upgrading RAM would be more beneficial than messing with the swap file. With 64-128MB, I would definitely set it as long as I had another partition to put it on. If you only have a C:\ drive, then setting the Min = Max wouldn't guarantee that it would be defragmented. If you had an empty D:\ drive for example, placing it there would guarantee optimization. Also, a second hard drive would futher boost performance since reads/requests can be made simultaneously. Having more than 128MB in Windows 9x/ME leaves this situation up to the user. It's always good to make a contiguous swap file, but it won't drastically improve performance since you've got a large amount of RAM. The key at this point would be to tweak Windows to use the swap file less (some people will set the min and max to something small like 32MB to force Windows to use RAM)

2) I used to use a free utility called FreeRAM, though I don't know if it's around anymore. I never did find these programs that useful, since I often found my CPU being used more often to free "virtual memory". So, it actually slows your system down even more in some cases (like when in the middle of a game). I guess I would recommend RAMBooster if you have to have one...

Good luck!!
~cdogg

"The secret to creativity is knowing how to hide your sources."
- A. Einstein
 
This is overkill I know , some information may not be relevant , but
for those that are reading this question & learning rather than
answering , they may get something out of these extra sites .


Windows Resources vs. Memory

-----------------------------------


-----------------------------------

More Resource Leak-Tweaks .

-----------------------------------


----------------------------------


--------------------------------------


-------------------------------

System Resources .
GDI and User Resources explained .

-----------------------------------

Free up Conventional Memory .

-----------------------------------

 
Ok, here goes. It has been a long time since setting up all the VM, swap file, etc on a computer. Here are my questions:

1. I have 2 40GB hdds. How should I set up the swap file? On D: with windows using all the size that is free, or should I set a size min/max?

2. I have 512MB RAM. How much of min/max should I use? or should I just try the 130000 in system.ini and leave the rest to the OS?

3. Another question is when I run NAV 2003 my memory goes to zero sometimes out of 356MB more or less. Why? NAV acts like it is not flushing the buffers.

That is enough for this round. All help will be appreciated.
 
nelljack,

1) Since you have two hdds, I would place the swap file on the second hard drive, at the beginning of the first partition. It would probably be best to do so while the hard drive is blank.

2) I would set the min/max equal to some size between 256-512 MB. Doing this will prevent it from re-sizing which can become fragmented over time. Personally, I don't think you'll need more than a 256MB swap file, but since you have plenty of space, it can't hurt to go as high as 512MB.

3) It really depends on the OS. I have NAV 2003 running in Win2K and haven't noticed any problems. When my system is idle, the max mem usage is around 192MB out of 384MB total. What tool are you using to monitor memory usage?




~cdogg

"The secret to creativity is knowing how to hide your sources."
- A. Einstein
 
I set the vm to these: on D:\ -29351MB with min=0 and max=26285. I don't know if this is ok or not but I am trying it for now. I also have some settings in the system.ini under the [386h] area as this:
;ConservativeSwapfileUsage=1
;MinPagingFileSize=129024
PagingDrive=D:
MaxPagingFileSize=26915840

I am not sure what the two lines commented out did, but I did see a slow down in performance when I used them. I leave them there to remind me I tried them already.

I got a shareware called Cacheman. I have no idea as to what the best settings are but it has not crashed yet even with the mem down to zero. I am assuming it is running the PC with some mem in the background.

Thanks for your help. If I need to change my settings please let me know what the best settings would be.

Kudos.
 
Why should he use a swap file with 512mb of ram? You have enough ram to make the swap file unnecessary. The swap file is insanely slow compared to ram, and was meant as a substitute to ram in low memory systems. I'd suggest disabling it by putting ConservativeSwapFileUsage=1 in your system.ini file under the [386Enh] part and making your maximum file cache 1/4 of your memory. For 512Mb of ram you would put this under the [vcache] part of system.ini: MaxFileCache=131072

After you have done that go into your autoexec.bat file in the C: root directory and put in this line:
DEL C:\windows\win386.swp
Then reboot. After the reboot take this line out of autoexec.bat. This deletes the old swap file and creates a fresh 0 byte one.

I have done this formula on many high ram computers for years and it seems to have the best performance results for games and applications. It also extends the life of your harddrive because it doesnt have to constantly write to the swap file. If you happen to use up all your ram (highly unlikely) it will start to use the swapfile so it's not a total disable and you wont get any out of memory errors.

Enjoy your new performance.
 
Cybermage,
There is a lot of confusion out there about setting the:
ConservativeSwapFileUsage=1

First of all, it does not "disable" the swap file as you stated. Instead, it forces Windows to treat the swap file as it did under Win95. Yes, it does get used slightly less, but also less efficiently. This setting was only available in Win98/98SE/ME. Basically, you are moving backwards by using this setting - which is not always a good thing.

Memory management was drastically improved in Win98 over Win95, though far from perfect. I don't know why everyone thinks they are tweaking their system by using it, but apparently it has something to do with the idea that they are modifying something. Surely, Micro$oft would have incorporated it if the benefit was worthwhile.


nelljack,
It looks like you have this setting disabled already, since it is preceded with a semicolon (;). I would take all custom entries with paging out of your system.ini and let Windows handle it.

Only force settings if you're having problems. The default settings are usually the best.

Also, you can leave your virtual memory settings the way you have them, or you can make the min = max, so the swap file isn't constantly re-sizing. Totally up to you...




~cdogg

"The secret to creativity is knowing how to hide your sources."
- A. Einstein
 
Thanks for both your inputs.

Ok, so this is what I should do?
1. Set the vm to let the PC handle it all. Do I leave it on D: though? I read somewhere it is best to not have the paging file on the same hdd as the system files.
2. If yes to 1 above, I set it on D: with min=0 and max=free space on D:?
3. Remove all lines in my system.ini file I have above listed and remove the .swp file and reboot.

I will do this after I hear from you. I will post my findings after I have run the PC this way.

Again thanks. Kudos later.
 
This is what I would do, but I would experiment and use what's best for your system:

1) You still want to use custom settings to set the size and location. When I referred to the default settings, I meant in the system.ini file.

2) I would set it to D: with the min = 256MB and the max = 256MB. Why? Read my previous posts...

3) Instead of removing them, place a semicolon (;) at the beginning of each line. This "comments out" the line making it inactive. That way, you can quickly enable/disable them on the fly while you're experimenting.

DO NOT worry about removing the swap file if it's currently on the C: drive. It will get deleted automatically after changing it to D: and rebooting.




~cdogg

"The secret to creativity is knowing how to hide your sources."
- A. Einstein
 
Thanks all. Here's the scoop.

[vcache]
MaxFileCache=131072

[MSNP32]

[Password Lists]
my.pwl

[386Enh]
ebios=*ebios
woafont=dosapp.fon
mouse=*vmouse
device=*dynapage
device=*vcd
device=*vpd
device=*int13
keyboard=*vkd
display=*vdd,*vflatd
EMMExclude=EMMExclude=C000-CFFF, C000-CFFF,C000-CFFF,C000-CFFF
ConservativeSwapfileUsage=1
;MinPagingFileSize=129024
PagingDrive=D:
MaxPagingFileSize=262144
MinPagingFileSize=262144

It works a whole lot better as far as speed. I will have to check it after NAV runs to see how it is handling the memory.

I hope this helps someone else.
 
That looks pretty good to me. Your settings make it so there isn't any memory paging at all until you run out of ram, which won't happen until you run windows for probably a week or two straight starting up multiple programs and games during that period. If you restart every couple days or shut your computer down when your done using it, your swap file will always be at 0 bytes. If you do ever run out of ram, the min/max paging settings will create a 256mb swap file on your D drive with the settings you have. Keep in mind though that with no swap file, you are saving your harddrive alot of writing time which increases its life and it speeds up your system probably 5x faster than with a swap file. As far as i'm concerned, windows 95 had it right in using memory first and the mega slow system performance killer swap file later.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top