Computing.Net > Forums > Windows 95/98 > Wipe swap file with autoexec??

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Wipe swap file with autoexec??

Reply to Message Icon

Name: Space Trucker
Date: May 21, 2001 at 22:00:09 Pacific
Comment:

I've heard people talk about deleting the swap file with autoexec.bat. I'm wondering if this is a good idea, or a bad idea. Why would you want to do this?



Sponsored Link
Ads by Google

Response Number 1
Name: Bessy Lou
Date: May 21, 2001 at 23:18:37 Pacific
Reply:

I am sure there might be some opinions flying around here. Here's mine: it is NOT a good idea to get rid of the swap file. The swap file is virtual ram -- when your system uses up all the ram available on your memory chip, the swap file takes over and grows and shrinks as ram is called for above and beyond what the chip provides, and then when the call isn't there, the file shrinks. I don't know about others, but I have 128 mb ram and I feel a squeeze with that. When a computer starts running out of memory, it starts having all sorts of problems running programs. Maybe people do it who have unsurpassable amounts of ram? But, if you work with graphics or music, you might want to be on the safe side and keep the swap file availabe. Hope this helps.


0

Response Number 2
Name: Space Trucker
Date: May 22, 2001 at 00:33:13 Pacific
Reply:

If my thinking is correct, deleting the swap file with autoexec.bat would basically result in starting with the swap file empty.

For some reason I think my swap file is hitting the "glass ceiling" and causing my system to lock up when there should be about 65% of the resources free. I'm using WIN98SE on a Dell Dimension with an Intel 850 with 128mb RAM and 16 GB free on the HD. When the system resources fall below 70% applications begin to fail, and I get messages saying that there is not enough memory available to launch applications (applications as small as Notepad). SYSMON reports that I'm only using 39k of 128k RAM, so I don't think that the issue is RAM. I think the problem is with the GDI stack, because the graphics are the first thing to go. This is crippling my computer to the point where I have to reboot about every 30 minutes!

If the swap file is deleted with autoexec.bat will Windows recreate it when it starts?

Any advice will be helpful!!


0

Response Number 3
Name: TheGorx
Date: May 22, 2001 at 02:44:38 Pacific
Reply:

Windows will rebuild the swap file but if you drive is fragmented it might not help all that much.

That' why it might be best to set a fixed size unless it on a partiton that doesn't get fragmented.

As far as note pad goes it can only handle a certain size file before it reports low on memory.
You can open larger files with wordpad in most cases it does this by default.

TheGorx
Windows Help


0

Response Number 4
Name: Bryan
Date: May 22, 2001 at 03:36:40 Pacific
Reply:

If you have more than one partition, defrag the partition with plenty of unused space.
Then go to Start/Settings/Control Panel/System, Performance tab, Virtual Memory, select Let me Specify my own virtual memory settings.
Select the partition that was just defragged and change the minimum size to 200mb and click on OK. You will be prompted to restart.

Now if you go back there is looks as though it is back to Windows is back to managing the virtual memory although it is not.

You can leave it like this or you can then defrag your C:drive and change it back.

What all of this does is make the swap file a fixed size on a defragmented partition.

I have left mine as first stated and the only difference I see is after booting up and everything is loaded my hard drive stops making the noises much quicker because it is not resizing the swap file. Same is true after closing programs.

Note: If you have 64mb or less then make the minimum swap file 2.5 times larger but if you have 128mb or more then it does not really matter so 200mb (if you have wasted space) works fine.
Since you created the swap file on a defragged partition with a fixed size then you will never have to worry about it being fragmented.
(one man's considered opinion)


0

Response Number 5
Name: Peer
Date: May 22, 2001 at 04:34:04 Pacific
Reply:

I set a fixed swap file (the minimum is the largest I will probably need but the maximum goes beyond that just in case) I leave it alone. I get no benifit erasing it on boot because it would ge fragmented quicker as would the drive resulting in slower access. I also see no point in erasing it. On a reboot it just overwrites the existing swapfile not keeping anything in it.

It will rebuild the swap file on reboot.

I could see a use in deleting it to defrag it:
1) Defrag the drive
2) reboot and delete the swap file
3) A new swap file gets created in a non fragmented space.


0

Related Posts

See More



Response Number 6
Name: Hmmm
Date: May 22, 2001 at 06:20:14 Pacific
Reply:

The swapfile is rebuilt on Win95.
On Win98, the previous one is used and thus is not rebuilt.


0

Response Number 7
Name: Harry
Date: May 22, 2001 at 08:20:44 Pacific
Reply:

The GDI System Resources has nothing to do with the swap file! If you suspect the trouble is with GDI resources look elsewhere. Possibly an application with a problem.


0

Response Number 8
Name: rambler
Date: May 22, 2001 at 13:01:57 Pacific
Reply:

Do a Ctrl-Alt-Del to see what's running after you boot. Any progs. you KNOW you can do without, disable them (probably running in SYSTRAY) or remove from Programs\Startup folder. Office 2000 FindFast for example, is a REAL resource soaker.


0

Response Number 9
Name: Dan Penny
Date: May 22, 2001 at 19:41:53 Pacific
Reply:

There's Hmmm again. (Hi! How are ya?) I'm running 98SE. Had this discussion with Tsjui(Sorry for the spelling, I'm sure it's not right) before, and he pointed out the same thing. At the time, based upon his "points", I had to agree. Well, I thought I'd try it again. I rebooted to (raw) DOS (I've got the boot menu running through MSDOS.SYS, picked option 5), and deleted my WIN386.SWP on my D: drive. (I've got three HDD's.) Rebooted (normal this time, ie; Windows), and the swap file was indeed re-built/replaced/re-installed/whatever you want to call it. (I powered down between boots, and let it sit for 45 seconds or so before re-powering.) Interesting. Is it because it's 98SE, & not just 98(FE)? I'd like to know. I jumped from 95_osr25 (build C) straight to 98SE. Idea's, thoughts?


0

Response Number 10
Name: Hmmm
Date: May 22, 2001 at 19:50:26 Pacific
Reply:

Dan,
I'm not sure what your question is.

On win95, without deleting the swapfile at the dos level, windows would recreate the file on every boot (if it was not a fixed file. MIN set).

On win98, the existing swapfile is always used by windows.

On both systems, if the file does not exist, windows will create one.


0

Response Number 11
Name: Dan Penny
Date: May 22, 2001 at 21:20:55 Pacific
Reply:

My response was based upon your post;
>On Win98, the previous one is used and thus is not rebuilt,On both systems, if the file does not exist, windows will create one.<

So.... if it's deleted, it's rebuilt on bootup.

I'm not trying to nitpick here Hmmm, I just want to understand the topic at hand, (as Im sure Space Trucker (and maybe others?)) would. My "experiment" shows it is rebuilt. I just want to know is it because of "my system/version" that it is rebuilt, and will it ~not~ be rebuilt on some other o/s. (If I remember right, even 3.1 rebuilds it if deleted.)
As far as I understand the swapfile, it's ~generated~ at each bootup, and will start off based upon your settings, and grow and shrink as the "system" sees fit (again, based on your settings,) depending on what applications you're running. As far as I can see, you can safely delete it (don't see why you would though unless defragging), and not worry about it as the next boot rebuilds it. Am I missing something?


0

Response Number 12
Name: Dan Penny
Date: May 22, 2001 at 21:28:51 Pacific
Reply:

Something got jumbled in my last reply. When I was pasting it didn't seem to take it, then all of a sudden there was my paste, about six times down the "sheet". So then I deleted things to make it look right, and got the above when confirmed twice. Things are missing and truncated. Maybe I took too long typing. Try again tomorrow. It's late.


0

Response Number 13
Name: Al
Date: May 22, 2001 at 21:48:24 Pacific
Reply:

I've been using a separate partition for the swap file. It is set to 149Mb and the swap file is set to 148 for both min and max size, thereby making it a pemanent size and stopping Windows 98 from resizing it constantly. It has been working well with my 32Mb ram. I just installed 256Mb ram tonight and need to know if I should leave the swap file alone, change the size, or disable it. Does anyone know how a large amount of ram and the use of a swap file effect Windows 98SE?


0

Response Number 14
Name: rambler
Date: May 22, 2001 at 22:29:08 Pacific
Reply:

Apart from the suggestions on Windows Resources (User/GDI) which is where the REAL problem lies. I'm not sure what is meant by "starting with the swap file empty". It's ALWAYS empty after a reboot!

Al (last post) - sounds like a good idea, doesn't it? Only problem with using a separate PARTION rather than DRIVE is that the HD heads will have farther to move to access the swap, and will actually degrade performance. With your 32MB RAM, you must use the swap file quite a bit.

I suggest what has been said. Defrag your main partition (with windows on it), and move the swap file back.


0

Response Number 15
Name: Hmmm
Date: May 23, 2001 at 06:36:16 Pacific
Reply:

Dan:
The swapfile is ONLY "generated" at boot time IF
you are booting a win95 system
OR
you have deleted the swapfile

On a windows 98 system, the previous file is used.

Al:
Your swapfile may or may not be adequate. The best thing to do is to change the settings to eliminate the MAX. There are no benefits to setting an upper limit. This still creates a fixed contiguous swapfile the size of MIN that will get larger if required. If the MAX is set, and windows needs to grow the swapfile, you will get failures.
Monitor the size with SYSMON and adjust the MIN as necessary.



0

Response Number 16
Name: Dan Penny
Date: May 23, 2001 at 20:07:58 Pacific
Reply:

Hmmm; OK, that's what I wanted to clarify. If it's deleted, it's recreated. So, if someone wants to delete it, it's OK. (Again, I believe why bother, unless to defrag.) And as rambler stated, it's always empty (new) at each bootup, so there's nothing remembered or retained. If it's deleted (for whatever reason), you have a new one to start with at each bootup.


0

Response Number 17
Name: Hmmm
Date: May 24, 2001 at 07:49:40 Pacific
Reply:

Well, the file is not really empty, primarily because it is NOT new. It is still the one from previous.
From Windows point of view, it it empty because everything is starting off at square one, and that is all that should matter.

But from the files point of view, (only a worry to the real paranoic), there will still be pieces (4K chunks) of program code, dlls, etc inside the swapfile. The same as there is data lying around in most of your empty disk clusters, from previous files that have been deleted.

And deleting the file does not necessarily defrag it. If the swapfile has a MIN set, the file can't fragment to begin with (at least the portion under the MIN). If it is a windows managed swap, it is allocated in chunks of 4K.

So, it you defrag, then delete the file, odds are good that it might/will start to use its previous areas (which are now free as a result of being deleted), instead of the free area at the end of the drive (created as a result of the defrag).


0

Sponsored Link
Ads by Google
Reply to Message Icon

I Need Registry Key Floppy Drive, no right cl...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Windows 95/98 Forum Home


Sponsored links

Ads by Google


Results for: Wipe swap file with autoexec??

swap file deletion? www.computing.net/answers/windows-95/swap-file-deletion/74807.html

De-Fragmenting Swap File www.computing.net/answers/windows-95/defragmenting-swap-file-/120159.html

Dedicated partition for swap file - good or bad? www.computing.net/answers/windows-95/dedicated-partition-for-swap-file-good-or-bad/41703.html