//flex table opened by JP

Click to See Complete Forum and Search --> : Swapfile Story


bwbarbieri
12-25-2000, 10:28 AM
Skip to the section "QUESTIONS" if you don't have time for the rest.

THE PROBLEM
-----------
My operating system is Windows95a on a compressed hard disk. From the behavior of my computer, I am guessing that a large swapfile inhibits performance. This file grows the fastest and largest when I'm on line. I'd like to find some way to keep it small and efficient, while still allowing Windows what it needs to operate.

A LITTLE BACKGROUND
-------------------
So -- among other things -- I tried to fix the size of the Swapfile. I did a little reading first, so I felt comfortable about what I was doing. One site I visited had what seemed to be good information (http://www.chipcom.net/recipe1.htm). It stated: "W9x will 'never' exceed your 'min' size unless it needs to...." This site also said NOT fixing the upper limit, contrary to what others have suggested. I fixed the minimum Swapfile size at 100MB. That's when I started to see things I didn't expect.

WHAT HAPPENED
-------------
First of all, Windows would not let me fix the upper limit. Any time I put an upper limit in the box, the OK button became unavailable. So I left it where it was, at the maximum available free space on the drive.

Next, I rebooted. When I looked back in the Virtual Memory box, the maximum was set to 100MB over the maximum available free space (before setting the minimum size to 100MB). I didn't like that.

Also, the option "Let Windows manage...." was still selected. I thought I just changed that? However, values in the "Let me specify...." section were different. The minimum was still 100MB, but the maximum was then 200MB less than when I accepted changes.

Third, when I looked at my drive stats, I found that my drive was down by 200MB! Why twice as much as set in Virtual Memory? Is it because I'm running on a compressed drive? This left me with very little free memory left.

Last, I couldn't find the swapfile in C:\Windows. It moved to C:! It was always in C:\Windows. Also, shortly after I started working I used System Monitor to see the swapfile size. It started increasing over 100MB right away! Not at all what I expected. I thought Windows was supposed to use the swapfile, not add to what the minimum was set at. I felt like all I did was to take 100MB and make it unavailable on my PC.

I set everything back to my original settings, but the swapfile is still in C:. Is that where it's supposed to be?

QUESTIONS
---------
Any explanation or reference to a site where I can get some good information about the swapfile would be appreciated.

Is there a way to maintain a smaller swapfile size on Windows95a?

WHY?! Why does the swapfile increase so much while I'm online? What is it that takes up so much space? When I'm online, my swapfile never deflates, only inflates.

Beemer
12-25-2000, 01:59 PM
I take it you defragged your machine previous to creating the user set swap file?

Yes your swap file will end up in C:\. You might also have a swap file in Windows folder. I find this happens every now and then to me. I do a defrag and my machine starts to labour and I go looking for the problem and find that the swap file in C:\ is not the only swap file on the machine. I have one in Windows folder as well. I blow this one away as I want to use the one I have in C:\. All sounds well again after I reboot and do a quick defrag again.

Anyone know why Windows will create a new swap file after a defrag? I haven't been able to figure this out yet. Easily fixed, but why?

How do you designate where the swap file is to be located?

Cheers!

bwbarbieri
12-25-2000, 03:19 PM
Thanks Rat. I read the thread, and now have at least 5 other sites to review. Outpatient's advice is consistant with what I did.

However, why did my swapfile start growing from 100MB on up? I thought the swapfile was 'like' RAM. When I use RAM, it doesn't do what my swapfile did. Maybe I should use some actual numbers.

I have only 28MB RAM. That alone is a problem. My drive is close to 1GB. At the time I set the swapfile to 100MB there was 244MB of free space. After fixing the swap, there was 44MB free space left. Where did the other 200MB go? Again, did it use up 2 x 100MB because my drive is compressed? (IOW, is the swap always uncompressed?)

Not only that, but why then did my swapfile size start at 100MB and increase to 104MB immediately after doing one simple thing (open a program). It just kept increasing from there, as if it never used the first 100MB. Before fixing the size to 100MB, the largest swap I ever saw was only about 65MB.

Beemer:
Before setting the swapfile, I ran scandisk and then Norton WinDr. Corrected all errors found. Then I ran the defragmenter. Then I changed the swapfile and rebooted.

There seems to be only one swapfile now, and it's in the C drive. Even after changing the Virtual Memory settings back, it's still in C.

I've defragmented my drive often. This is the first time the swapfile showed up in a different location.

PS: Right now my swapfile is about 35MB. It will not go down. It will continue to grow until my system becomes sluggish.

THANKS TO YOU BOTH!

OuTpaTienT
12-25-2000, 03:54 PM
Is your hard drive only setup as one drive? Just one C:\ drive that's about 1GB in size right?

Is that entire C:\ drive compressed?

If you answered yes, then I'm scared for you. That is a VERY BAD THING.

First, drive compression in itself is not a good thing. Extremely slow and data corruption is much more of a problem because all the data for a compress drive are actaully kept in one large file. If something goes bad with that file then all the contents can be lost.

Second, compressing the drive with the operating system on it, usually C:, is a big NO NO. Mainly in terms of speed, but also it means you're accessing that compressed file constantly which means much greater chance for corruption.

Third, never operate a hard disk with 10% or less of headroom. Meaning a 100MB drive should always have at least 10MB free, and a 1GB drive should always have at least 100MB free. This includes any space the swap file might use. You DO NOT want Windoze to use all availible free space. If Windoze uses too much space and gets you under that 10% mark then you could very easily lose all data on the drive...EVERYTHING. (I speak from experience.)

Fourth, the swap file cannot operate on a compressed drive. I believe what Windoze is doing to you is taking 100MB of disk space which appears to you as 200MB because of compression.

And if the drive is compressed and tells you there is 244MB of free space, and the swap file is using 200MB (100MB uncompressed space), and you are left with 44MB of free space...then my friend, you are just begging to lose every single file on that drive. That means you are operating a 1GB drive with less than 2% headroom!!! Very scary.

You gotta free up some...no, LOTS of space soon. And if possible, UNCOMPRESS the drive. If nothing else, backup all your files that are vital. A drive that full could go kaput any moment. When I lost a drive due to having it too full it happened in a blink of an eye. I ignored the warings from my friends, and was using the drive with about 7% free space. Then in an instant, every single file on the drive became crosslinked with every other file. All the data was jumbled together and I couldn't save anything. Hopefully you'll be wise enough to avoid this fate.

~edit~ btw, when I say "lose the drive due to it being too full" I actually mean lose the data. The physical hard drive itself will still be fine, but you'll have to reformat it and start over with a blank drive.

[This message has been edited by OuTpaTienT (edited 12-25-2000).]

Rat
12-25-2000, 06:07 PM
In addition to Outs' post I'd like to add a little: Unless your holding out for a better/faster system, perhaps getting some more RAM for your system is in order. 28 megs is real low for a Winders system. Also if this is an older system (3 years old or older) with the original hdd, then it would be wise to start planning on a new hdd soon. If you are still working on a 486 or early pentium, then it may not be worth the extra expense of memory and hdd.

Rat...

Rat
12-26-2000, 12:34 AM
Try reading this thread: http://sysopt.earthweb.com/forum/Forum2/HTML/011446.html There are some links on this thread that may be of help. Also, heed Outpatients' advice.

Rat...

bwbarbieri
12-26-2000, 06:18 AM
I'm working on an old 486. I recently tried to install extra RAM, but the system is too particular. It only takes 4MB and 16MB boards, and only certain ones. I tried several 16's, and none of them worked (I know they were OK).

Thanks for the advice Outpatient. There are two HD's in my PC. Both are compressed. One is used strictly for storage of installation files. The other (primary) drive is where all the work is done and stored.

Without compression there simply isn't enough room. If I find a deal on a computer I can afford and I have confidence in, then I will purchase. [The last deal presented to me included a PCChips MoBo that got terrible reviews. No thanks.] I also do not yet know enough about what I'm looking for to make a decision, but I'm much further along than a few months ago.

rojakpot.com is a great site for Swapfile info! I spent some time in there. Other references helped also. I understand more at this time, but there's still a problem with one thing.

Why does the swapfile increase from the min/max I set? If I set the minimum swapfile size to 100MB, it starts increasing from there.