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

W2K/W98 dual boot system paging files 2

Status
Not open for further replies.

krinid

Programmer
Jun 10, 2003
356
CA
I've got a W2K/W98SE dual boot setup and it just occurred to me that I might be losing a few hundred MB b/c the swap files are for each are on separate partitions. Do the swap files for both systems remain after shutting down? And if so, is there a way to have the swap file deleted upon/after shutdown?
 
In W2k you can clear the page file by doing the follwing:

Click Start > Run > type: secpol.msc > Local Policies > Security Options

Double click on Clear virtual memory pagefile when system shuts down and disable it.
-OR-
Click Start > Run > type GPEDIT.MSC, click OK. Go to Computer Configuration > Windows Settings > Security Settings > Local Policies > Security Options. In the right pane, locate: Shutdown: Clear virtual memory pagefile

However, if you clear the swap at shutdown, it takes about 10-20 seconds (or more) for the PC to shutdown.

For Win98, I wouldn't try deleting the swap. Although it will be recreated at next boot, it may result in some system instabilty. However, if you do want to delete it, you can restart restart in ms-dos mode, then type:

cd <drive>:
del *.swap

for example, if my swap is on E:, I would do:

cd e:
del *.swap

You can then save the above in a text file and save it as 'delswap.bat' you can then save it in C:\ then just simply type delswap (when in ms-dos mode). For example, your delswap.bat file would look somthing like this:

@ECHO OFF
ECHO Deleting swap file...
cd e:
del *.swap
ECHO swap file deleted!

Hope that helps.
 
AP81, Thanks for the info. Why would deleting the swapfile cause instability in W98? It's just the no-longer-necessary contents of RAM, isn't it?
 
krinid,

Why do you want to delete the swap file each time the system shutdown ?

The reason I ask that is:
1. Everytime the systems start up it will re-create the swap file, if the swapfile doesn't exist. It means that you still loosing a few hundreds MB. So there is no point to delete it.

2. If the swapfile is created & deleted everytime, unless you do a defragmentation, you are risking of getting fragmentation for the swapfile (more & more fragment every time). The result from this, you will experience a slowdown in performance. And maybe this what's causing instability in W98 (not sure about this)


The best way is to put swapfile in separate partition, even better separate partition on another harddisk (the fastest one). Why ? To maintain the swapfile will always contiguous.

If you search by keyword &quot;Swapfile&quot; you will find many idea of how to put the swapfile (size, place, etc..). Just do whatever you think the best for you. But the important point is how to maintain swapfile in order to keep the system always runs smooth

As long as you use Windows OS, like it or not, the swapfile will always exist!
If you have a lot of RAM (>= 1GB) in your system, maybe you can make the swap size much smaller

Just my $0.2
Regards

-- AirCon --
 
AirCon,
By keeping swap files for both OS's, I'm losing a few hundred MB's per OS. Since only 1 swap file is necessary at any given time (for currently loaded OS), I figured I could save a few hundred MB by deleting the inactive one.
Good point on fragmentation. I'll have to think about that.

AP81,
Hmm, W2K is no prob (using the method you showed me) but W98 isn't very good on it. I suppose I could put a script to delete the W98 swap file in my W2K startup folder, but I'd still have to have enough space free for both swap files in order to boot W2K (until it deletes W98), but at least I would have the room freed up after the script ran.

hmmm
 
krinid,

Would agree with Aircon. You are not really 'saving' this space (because it needs to be free each time you start-up, or windows won't be able to create swapfile)
 
I remember seeing something about making the swap files for both OS's the same. The details escape me, but I do remember that you can rename the win2k swap file to the same name as win98's (but not the other way around). Only problem is that the filename is stored in binary and the instrucs I saw told how to make the change. A web search should find it.
 
Okay.

What I have done is made a 500MB partition. I have my Windows XP swapfile set statically (min size=500 Max size=500). This stops the swap from unecessarily dynamically resizing and improves system performace. I then used TweakUI to hide the partition from the system, so I don't accidentally interfere with it.

In your case this is what I would do:

1. Create a partition about 500-800MB (I don't know how much RAM you have, but I can't see how you can use more that 800 as a swap). The recommendation for a swap is 2.5X your RAM, but that is garbage. I have tried 2000MB, 1000MB, 768MB and 500 for my system (512 RAM) and there was little or no difference even under heavy load (20+ apps running)including VMWare. If you have less than 512, I would suggest an 800MB partition.

2. Set W2k to clear the swap at shutdown (which you have already done)

3. Set Win98's virtual memory (swap) to use the same partition. This can be done in control panel > System > Performace > Virtual Memory > Select 'Let me specify my own Virtual Memory settings' and set the min and max size to the size of the swap partition you created.

4. Make a batch file to delete Win98's swap when W2k boots up, e.g :

@ECHO OFF
ECHO Deleting Windows 98 swap file...
del E:\WIN386.SWP
ECHO swap file deleted!

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

Experiment a little and see how you go. Hope this helps.


 
its better to put swap files on a separate hard disk than partition the disk that has your system files. doing this reduces the head from jumping from partion to partion to read system files and swap files.. So having a second hard drive you have two heads one for system files and another for swap files
 
AP81,
I have 196MB RAM and I'm currently using 300MB swap file (if memory serves me right [don't have access to the machine at this moment]). I'll give your advice a shot sometime this week and let you know how it goes.
Btw, what's TweakUI? I've heard of it, perhaps; is it a 3rd party app to better customize Windows? Is it purely a W2K app? Is it freeware/where can I getit?
 
TweakUI is freeware powertoy. Do a search in google for it. There are two different version for both Win98 & W2k. You need to download both version. They are pretty small, so it shouldn't take you too long to download them.

In response to pdoug76, having the swap on a separate HDD does reduce overhead from the read/write heads. Optimally, a second HDD as slave is the best solution- however, you have to make do with what you've got. If you can pick up a small ~1Gig HDD, just whack it in your PC and you'll be good. Having the swap on another partition is the next best option however, and will still result in better performance than the standard system settings.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top