PDA

View Full Version : setting swap file in 98


torsten
03-09-03, 03:04 AM
I've read some previous threads (http://forums.speedguide.net/showthread.php?threadid=75379)where this was discussed and have done some research, but I'm more confused than when I started. Why is it so difficult to get a consensus on how to set a swap file? Some SGers have recommended setting min and max to the same amount, but this article (http://you_know_who.home.att.net/tips/swapfile.htm) says that's a myth and not to do it.

Why not choose the entire remaining hard drive space as the max size in case you need it?
Some advise leaving max with no setting -- this seems impossible as there's already a number there.
Why go through the complicated process of disabling the swap file, unchecking msconfig, dealing with DOS, multiple reboots, etc (the instructions vary quite a bit)? Why not just Disable > Defrag > Enable and set?

Here's my situation:
I want to use PerfectDisk to defragment
6gb hard drive with about 2gb free space. 384mb RAM. Sometimes use big progs like Photoshop or Dreamweaver MX (5 or more open at the same time), and download big files (400+mb) and edit sound. Once, the swap file became so huge that I ran out of disk space entirely.

TonyT
03-09-03, 08:14 AM
With win98, it's best to just let windows manage the memory automatically rather than try to tweak it. You could probably avoid such future memory issues by emptying the clipboard contents as you are working (when 3 or 4 big memory using apps are running) and by also using a program that will free up allocated memory no longer being used. Apps like Photoshop or Dreamweaver require a lot of resources and even when closed out they still consume resources and leak memory. They are TSR's (terminate and stay resident).

Also, slearing the Temp folders periodically will free up memory (disk space).

Per your system specs, if you run out of disk space when doing what you describe, then your system is not running optimized or you have other memory leaking apps.

An optimized 98 system will have only the absolute necessary programs loaded at system startup with little to no apps running in the background. Scheduled tasks and antivirus apps, software firewalls, etc should all be run and set to manual rather than 'auto-detection' and 'auto-updating'.

Memory leaking apps are common today because software developers have become lazy and code programs with little care about memory anymore. MS is as guily as the others. For instance, Outlook Express is a huge memory leaking program. Photoshop is another one.

What does your startup group look like?

torsten
03-09-03, 12:54 PM
What's the rationale for letting 98 manage? Almost everything I've been reading says that XP and 2000 manage these things well but that 9x is pretty bad about it. Supposedly, having a permanent swap file prevents Win from constantly resizing it -- which will reduce a lot of unnecessary hard drive activity. And most say to do this before defragmenting.
It's currently set to let Windows manage it and I'd be happy to leave it there; I just don't understand why there's such contradictory advice from different sources.

The time I ran out of space I was using Photoshop 7 to edit a 35mb image and had the history set to remember 40 steps, so that's really a rare thing.
I try to keep my temp folders cleared and IE's history is set to 1 day and the IE disk cache is only 1mb.
Just now, after booting the computer (only IE, Proxomitron, Explorer, ZoneAlarm, and mouse are open), the swap file (win386.swp) is 53mb. Is that too big? normal?

Here's my startup group:

http://home.attbi.com/~nonpc/startup.gif

TonyT
03-09-03, 03:15 PM
Here's a good easy read re win98 Resources:
http://www.infinisource.com/techfiles/win-resources.html

to answer your question about 'why let win98 manage the swap file?"

When using FAT32, we advise you to leave the vcache managed by Windows. The reason for this is that with FAT32 in combination with an "aligned" program, Windows 98 can run applications from the disk cache itself. Unfortunately the only "aligned" programs so far are the MS Office programs so until more authors align their programs on 4K page boundaries, the overwhelming majority of programs will still be causing two copies of an app to be in RAM until the disk cache is re-used. This would mean that for the time being the Windows 95 guidelines for assigning VCACHE size (as above) are still good guidelines to follow for Windows 98. If you don't use FAT32, then this is a non-issue since with FAT16 the alignment process does not work and Windows 98 can never run an application from the cache.

the above is from this good explanation re win98 Swap File:

http://www.infinisource.com/windows98/tune-34.shtml

torsten
03-09-03, 09:09 PM
After reading the second article I'm wondering if we're talking about different things. The paragraph that you quoted above refers to letting windows manage vcache --- which is set by changing the system.ini file, while letting Windows manage the swap file is changed by System > Performance > Virtual Memory settings in Control Panel. Since these are apparently 2 very separate items, I'm wondering what one has to do with the other. My system is currently set to let Windows manage the swap file, but my vcache max and min sizes are both set to 94208.

RoundEye
03-09-03, 10:36 PM
torsten, I use to set my swap between 512 and 1024 min and max when I used Win98SE.

I've gotten to where I just set it to 1024 min/max and forget about it. If I had it set any lower it wouldn't finish any really large print jobs or open any large pictures. As you've found out, everybody has a different opinion. :D

Here's two sites that I've found that have some really good info and tweaks.

Axcel216's (http://members.aol.com/axcel216/) This site has been around for years, tons of tweaks.

Most of the tweaks listed here for WinMe will work also for Win98, except for system restore.

Black Viper (http://blackviper.com/WinME/supertweaks.htm)

torsten
03-10-03, 02:32 PM
Yep, it seems that everyone on the net has a different opinion about this. I still don't know why that's so. With all the years of testing, it looks like we'd have some proof about which way is best.
Here's my update:
I spent the afternoon reading about these issues and finally decided to go with a compromise. I set a min (400mb) but not a max. That way, hopefully there won't be a problem if it needs more space. The reason I went with the min setting is that a constantly resized file can become fragmented all over the disk. That doesn't seem like a good thing for one of the most used files on the hard drive. I also decided to use Norton Speed Disk instead of Perfectdisk. From what I understand, speed disk is the only one that will acually move the swap file to the beginning of the hdd. There's a check box that says "optimize swap file" with no explanation of what it does, even in the help files.
Another important thing I did was insert "ConservativeSwapfileUsage=1" into the system.ini file (supposedly eliminates a LOT of unnecessary swapping).

It all seems to have worked. After rebooting and disabling the startup programs, I got the win386.swp file size to 0. At that point I set the min to 400 megs and rebooted. The result was that the swap file was moved from the Windows folder to the main C: root folder. hmmm. Speed Disk recognized it and put it at the beginning of the drive. Took about 2hrs just to do a 6gb drive. One strange result of all this is that I have about 5% more system resources after a reboot. Don't know why that would be so, but it is -- which is.... well..... good. :) I'll have to use it for a while before I know if there are any noticeable hdd performace improvements.

Thanks for all the advice.

YeOldeStonecat
03-10-03, 02:56 PM
Originally posted by torsten
Another important thing I did was insert "ConservativeSwapfileUsage=1" into the system.ini file (supposedly eliminates a LOT of unnecessary swapping).



I used to do that, with some 386enh vcache tweaks...has 384 megs of RAM in my old Win98se system. Kept the swapfile set to 768 min and max.

JawZ
03-10-03, 03:09 PM
I don't want to butt in into this conversation but there is consensus on swap/page file optimization.

No one can argue that placing a fixed swap/page file on a separate Hard Drive will increase performance.

If yopu have only 1 HDD...then swap/page file optimizations are somewhat negated by the mechanics of a HDD itself. The arm of the HDD can't be in more than one place at any given time. If the arm is accessing the the swap file on a disk...it can't simultaneously access another part of that disk and vice versa. BUT! Windows can access multiple HDD at the same time....that is why having a swap file located on a separate disk is the way to go. Windows can utilize the swap file on HDD #2 while accessing a program/file/etc on HDD #1.

It is safe to set a permanent swap file as long as you have throughly tested your own memory usage. You can do this a number of ways using the icluded Windows tool called resource meter.

Open up all your apps that you normally use and have at it. If you open up a bunch of apps that you normally do not use simultaneously....then you will be getting a false sense of what you need.

In my normal day to day usage...I have never ever needed more than 1GB of memory. Being that I have 512MB's of physical ram....I have my page file set to 524MB's both min and max. This gives me a total of 1GB+ of memory, both real and virtual.

According to Microsoft, you shopuld always set your min swap file size 12MB's above your physical RAM max so that id you crash, a memory dump can occur without a hitch(data loss).

Most of the single disk swap file optimizations relate to keeping the swap file itself defragmented. If you do this...then the HDD arm doesn't have to jump around the disk looking for all the pieces of the swap file. This will speed you up to some degree.

So if I were you...I would set my swap file to 12MB's above your physical ram both min and max settings unless your own tests tell you that you need more. In this case...you would need to up it to 1.5 times the amount of ram you have.

then you need to defrag the swap/page file. If you are using Win98 then you actually need to do this before you set it. You need to turn off your virtual memory all together, reboot, defrag, reboot, set swap file size, reboot. All done.

YeOldeStonecat
03-10-03, 03:30 PM
Originally posted by UOD
IAccording to Microsoft, you shopuld always set your min swap file size 12MB's above your physical RAM max so that id you crash, a memory dump can occur without a hitch(data loss).

That was an old rule of thumb for NT 4 workstation/server...used to take total system RAM, add 12...then give a min/max range of 50. Add to that substantially more for other services like Exchange Server, or SQL Server, or other databases.

Add to that again other services, like anti-virus, etc. And it was only to be used as a baseline....varying greatly according to how much system RAM you actually had, and what you were running.

Win9X behaves differently, doesn't manage RAM as effectively, imagine appling that to a 98 machine with 128 megs of RAM?, only letting it have 140 megs for the win386.swp file? She'd be a chugging blue screen city booting you out of any halfway large application.

There's not really any harm in having your swapfile too large...as with todays hard drives....space isn't of much concern. Years ago, servers with preciously small hard drives..yeah, it'd be good to keep the pagefile.sys as small as possible...but todays machines with hard drives the size of Montana, I don't see the harm in making it somewhat large. But make it too small...and you'll get some chugging or crashing systems when it's straining for more memory.

JawZ
03-10-03, 03:42 PM
Originally posted by YeOldeStonecat


Add to that again other services, like anti-virus, etc. And it was only to be used as a baseline....varying greatly according to how much system RAM you actually had, and what you were running.

Win9X behaves differently, doesn't manage RAM as effectively, imagine appling that to a 98 machine with 128 megs of RAM?, only letting it have 140 megs for the win386.swp file? She'd be a chugging blue screen city booting you out of any halfway large application.

There's not really any harm in having your swapfile too large...as with todays hard drives....space isn't of much concern. Years ago, servers with preciously small hard drives..yeah, it'd be good to keep the pagefile.sys as small as possible...but todays machines with hard drives the size of Montana, I don't see the harm in making it somewhat large. But make it too small...and you'll get some chugging or crashing systems when it's straining for more memory.

If you'll notice, I did specifically say to utilize the resource meter to gauge how much ram is needed. The resource meter don't lie lol. I also said that he may have to up it to 1.5 times the amount of physical ram....but I guess I wasn't clear enough there.

For a system with 256MB's or ram or less...set swap file to 1.5 to 2 times the amount of physical ram.

For a system with 256MB's or more, go with the 1.5 or 1 X the amount of physical ram for swap file size.

I think the goal of having a set swap file on a single Hard Drive is to keep it from becoming fragmented. If you can get your hands on a 2nd HDD...then you can place the swap file on it and see a real performance boost. This is the preferred and universally accepted way of doing it.

:2cool:

torsten
03-10-03, 03:44 PM
UOD,
I did the heavy usage testing yesterday. The biggest the Windows-managed swap file got was 192mb. But like I said, one time last year Photoshop caused it to use about 2 gigs. Funny thing is that I never seem to go below 100mb of available RAM even when the swap file is very big. Maybe the "ConservativeSwapfileUsage=1" tweak will change that. I'd rather use RAM than the hdd if it's available.

OK, so what's your rationale for setting min and max to the same amount? Why not set a permanent min (like I did) but no max so that it would be able to use more if it absolutely needed it? As for setting it to 12mb above RAM, I think I have that covered. Physical RAM is 384; min size is 400.

Did you see my last post? I was able to get it defragged without disabling virtual mem. I don't know if that's a freak occurance, but it did work (with Norton Speed Disk). Did you come to any conclusions about the best defragmenters? (Saw your other thread - which is what really got me started on this in the first place)

I only have one drive (might consider getting another since 6g is too small anyway)

YeOldeStonecat,
Same question as above: Any real advantage to setting min and max to the same value (instead of having a permanent min and no max)?

TonyT
03-10-03, 04:36 PM
another thought here:

If you invested in a $40 router w/ NAT, you could dump ZA and remove 6 items from your startuo group and youd have an additional 15% resources at startup, which will speed up your system and you'll see faster rendering in graphics intensive apps like IE and Photoshop.

Then, invest in $30 in more RAM (256MB at some stores) and make a ram drive to be used for your special work that requires speed and memory. RAM is way faster than a hard drive.

But, were it me, I'd get another HD and a router, then install win2K, which is way faster than win98.

JawZ
03-10-03, 04:45 PM
Originally posted by torsten
UOD,

OK, so what's your rationale for setting min and max to the same amount?



Hands down...you only have one drive so your aim right now is to keep the swap file from fragmenting across your disk.

If you did in fact do a thorough usage check of your memory, then all should be well. I don't know if you used all the apps that you normally use......do you use photoshop on a regular basis? The point I'm getting at is that you should have used your most resource intensive apps to get a good gauge of your memory usage. At this time, I would say to set the swap file to 400MB's min AND max and go with it. Defrag it using Norton and let it go for a few days and see what it feeels like.

If you come across a new HDD, use your 6GB drive as a slave and put that swap file on it.

If you did this using Win2K.....dude...you would notice a really substantial performance boost even from an old machine. You have the ram to do it.


EDIT!!!!

Couldn't agree more with TonyT.:D

torsten
03-10-03, 05:12 PM
Router? RAM drive? &nbsp ouch. You're reaching into the recesses of my ignorance. Don't know a thing about those and wouldn't know where to begin.
Another hard drive may be what I need though - assuming I try to significantly extend the life of this old 350mhz machine.

I think I'll hold off on installing 2000 until I get another hard drive. Just too much of a pain to reinstall and especially customize all these programs (it'd take days!). If I get another hdd, do I need the router?

Yes, I use Photoshop 7 on a regular basis. I'm still not understanding why you'd set a max. As I have it now, it wouldn't fragment unless win386.swp got bigger than 400mb, right?

YeOldeStonecat
03-10-03, 05:25 PM
Originally posted by UOD
but I guess I wasn't clear enough there.

For a system with 256MB's or ram or less...set swap file to 1.5 to 2 times the amount of physical ram.

For a system with 256MB's or more, go with the 1.5 or 1 X the amount of physical ram for swap file size.

I got a little confused as to which you were trying to state...saw the part about 12 megs above system RAM...then saw the part about 1.5x system RAM..."OK, so which is it?"

...then again, rereading, I see you say that it's Microsofts suggestion about the 12 megs over. I only did that rule of thumb on pure file&print sharing servers...those don't use much RAM.

Me gots baaad migraine today...me not thinks or reads clearly this afternoon...

JawZ
03-10-03, 10:06 PM
Originally posted by YeOldeStonecat
I got a little confused as to which you were trying to state...saw the part about 12 megs above system RAM...then saw the part about 1.5x system RAM..."OK, so which is it?"

...then again, rereading, I see you say that it's Microsofts suggestion about the 12 megs over. I only did that rule of thumb on pure file&print sharing servers...those don't use much RAM.

Me gots baaad migraine today...me not thinks or reads clearly this afternoon...

It's cool bro...I typed out all my replies today while babysitting my 10 month old kid.....I'm bound to miss things here and there lol.

jmatt
03-11-03, 03:18 AM
Here is another to try .

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)

Andrzej
03-12-03, 06:46 PM
re swap file on second hdd
can second hdd on the same IDE
realy work on the SAME time ?
or
:D for better results use second IDE for second hdd?