How to fix Win 98 memory leaks

Discussion in 'Computer Science & Culture' started by Clarentavious, Sep 27, 2002.

Thread Status:
Not open for further replies.
  1. Clarentavious Person Registered Senior Member

    Messages:
    934
    This was a trick I learned a long time ago, but I didn't actually know it fixed the memory leaks associated with Windows 98.

    There is something called Vcache. This is not your virtual memory or swap file, it is related to your RAM (not space on your harddrive). This is basically how W98 leaks memory.

    The problem is, when Windows 95 and 98 were first designed, they were mostly meant for small desktop applications like Outlook Express to do e-mail with. They were designed for heavy high end gaming or digital video editting (because computers were more in their early development stages at that point).

    I guess microsoft just thought it would be easier (and it is alot quicker) to access things from your RAM (on additional occasions of opening a program more than once), rather than read it from your harddrive again (which is slower).

    And at that time, with 4,000 RPM harddrives, when you needed to access your virtual memory once all of your RAM has been used (due to the leak), high end programs certainly couldn't handle that.

    I guess MS just thought since most peeps would log on, do their taxes with MS Word, look at a few pictures and shut dwon their PC until the next time they turn it on, they wouldn't run out of RAM.

    Vcache is basically what W98 uses to what most people define as a memory leak. What you can do is, limit the Vcache. So, if you set a Vcache limit of 2MB, windows would still hold memory for programs that aren't actively used, but it would only hold 2MB worth of RAM (and a loss of 2MB for an entire computer session, now matter how many apps you open and close, is no big deal).

    What you need to do is set a fixed limit for the Vcache. Both a minimum and maximum that is the same. The data is measured in KB, so 8192 for both a minimum and maximum would equal 8MB.

    The higher you set your Vcache, you'll get better performance, but Windows will always eat up that much memory (so if I have 512, and set a vcache of 32MB, I will always have that 32 taken on top of all of the things that remain in your RAM constantly like video card drivers and system files - but this will still leave me with over 400 RAM, and no matter what I do, it won't leak more than 32MB).

    Basically you do it like this, in your system.ini file there is a setting called vcache. There you'll want to put this

    minfile cache for the minimum
    maxfilecache for the maximum
    Chunksize (I'll get into this next)

    So for an 8MB limit, your area would look like this

    [vcache]
    minfilecache=8192
    maxfilecache=8192

    And now it is done. Now, about the chunksize, you'll want to set that to half your limit. This is basically how many bytes of data are run at a time when this cache is purged (since the leak is set a 8MB, if data accumulated in there that isn't being used, it must be deleted and returned to the memory pool, something W98 does not do without this fix).

    The purging time takes a little while, but thankfully most RAM now days is really fast (from PC100 to 266 DDR being the norm). I set my chunksize to half my limit. If you set it to small, there are too many little tiny chunks that have to be filtered through. Each chunk must be taken one at a time (that is like if you have 1,000 links, and move them, each one of those links has to be moved, as opposed to moving one big file that might be around 1MB, as opposed to 1,000 small files a 1KB a piece; each file has to be filtered so it slows this down).

    So I set mine to have so it is done in 2 cycles (if it is as big as the limit, it takes all of the information at once, which could could slow down the time it takes a little).

    So my final product for setting an 8MB limit looks like this

    [vcache]
    minfilecache=8192
    maxfilecache=8192
    chunksize=4096

    And that my friends, is that. There is a site here that has a program that will supposedly do this for you, so you don't have to go edit your system.ini file. I don't know if this program is still free though. The site may give info about memory leaks though.

    http://www.outertechnologies.com/

    So there is no reason to use XP anymore. 98 SE crashes on me about once a month. If you are doing something like playing a game or burning a CD, DON'T have 500 programs running in the background like virus scanners actively searching your harddrive - even XP with all of the resources it uses has its limit, OS are more likely to crash in general when you have alot of stuff loaded. Just be patient and strip unnecessary programs down to boast performance and loading times anyhow.
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. Clarentavious Person Registered Senior Member

    Messages:
    934
    Here's a picture example
     
  4. Google AdSense Guest Advertisement



    to hide all adverts.
  5. Pollux V Ra Bless America Registered Senior Member

    Messages:
    6,495
    Claren,

    I have 256 mb of RAM. How much would you suggest I limit via the vcache, and can you type out the example like you've done before, only with my computer's brief specifications:

    Like that.
     
  6. Google AdSense Guest Advertisement



    to hide all adverts.
  7. Clarentavious Person Registered Senior Member

    Messages:
    934
    I believe Windows 98 SE itself uses about 64MB of RAM just to run without dipping into virtual memory. If you set it to 32, that will always leave you with 160, which should be more than enough for any game.

    If you are running alot of programs at startup it may be more like 96.

    You may still wind up using virtual memory if windows decides to store system info there (like if you do alot of scandisk).

    The higher you set the value, the more smoothly it will run, but that RAM is going to be lost everytime windows loads unless you change the value (but remember, setting this prevents the loss of any further RAM).

    Your PC is likely a bit slower than mine, so 32MB sounds good. The Vcache field itself should already be in your system.ini file, so just type in the values. I would reduce the chunk size a little though.

    [vcache]
    minfilecache=32768
    maxfilecache=32768
    chunksize=8192
     
  8. Clarentavious Person Registered Senior Member

    Messages:
    934
    When I mean run more smoothly, I mean faster. If you stop Windows from leaking memory, every application that is not actively running will be read from your harddrive (applications that can fit in your Vcache will remain their and load much faster at the speed of RAM, warp speed, PC 2100 SDRAM, 266 DDR reachs a peak bandwidth of over 2GB a second - in constract, most modern 7,200 RPM, ATA-100, harddrives read at about 40MB per second - so you can see the difference)

    It just depends on how much RAM you need for other apps and to how much to limit. Also, when the data in your RAM is purged (when it flushs the cache buffers to return to memory to your overall memory poll), there is some CPU useage and your PC may slow down a bit for about 5 seconds.

    Unless you are fortunate enough to have dual channel PC 2700 DRR 333, with a 2.0 CL Dual channel DDR RAM reads and writes at twice as fast. Normal single channel DDR RAM only reads at twice as fast as it's clock speed.

    As far as I know, only the nForce line boards from Nvidia support dual channel DRR RAM.

    But there are other factors involved such as your power supply, and processor speed and type.

    DMA is essential to allow your harddrive and RAM to interact without going through the processor first.
     
  9. Stryder Keeper of "good" ideas. Valued Senior Member

    Messages:
    13,105
    http://chatsoba.sprawl-vr.com/tutorial/bsod.html

    I'd written this up some time ago about the VCACHE, with a few more details here and there on how to perk your system up.

    So it's not a new trick, although sometimes it's far easier just getting some better RAM.

    BTW, highest VCACHE that Microsoft tested to for Win95/98 was 40Mb. (40960), in most cases the best amount is about 1/4 of your full RAM amount, unless 1/4 is more than the 40Mb limit.

    VCACHE is similar to the Virtual memory(swap drive/file) on the hard drive, in the sense that it's where Windows and it's drivers can load. Understand that other programs none microsoft/windows related utilise the remaining memory.

    windows 95 needed about 16-20mb's of RAM to run on it's own and probably about 30mb's for win 98.

    That should help you with how much you need for VCACHE.

    VFAT is similar to the harddrive in the sense that it's the Virtual FAT (File Allocation Table), if there is an odd difference between VFAT and your systems FAT type (FAT32 mostly) then you might have errors.

    This also includes how the CHUNKSIZE works where information is stored, your RAM's best with smaller chunks than your hard-drive.
     
    Last edited: Oct 3, 2002
  10. Clarentavious Person Registered Senior Member

    Messages:
    934
    Some slight corrections Stryder (from my understanding).

    When you open a game, let's say Morrowind, that uses 128MB of RAM. And let's say your system has 512. Once Windows has finished loading you are left with 448 (from your 512 total). So let's say you play Morrowind for awhile, then exit the game. When you come back, you are left with 320 RAM because this is the memory leak. Windows had not purged the Morrowind data in your RAM and returned it to the memory pool.

    Using the Vcache limit, no matter how many problems you open and close, Windows will not leak beyond your Vcache. It may fill your Vcache but it will never go beyond it.

    Vcache has absolutely nothing to do with your harddrive.

    Vcache sets aside a specific amount of RAM that windows may use to store programs that are not actively loaded (so they can be accessed quicker in the future rather than read from your harddrive).

    Higher chunksize is better. Windows by default puts no limit on Vcache which is why you can drain your memory down to a single MB, then it will require you to use your SWAP file for storing things.

    With a noraml Windows setup (though I tend to have mine stripped down), Windows 98 will use approximately 64MB. That is all of my system files that are loaded, my video card drivers, my Zonealarm firewall, etc..... I don't have I don't have 10,000 little icon like a virus scanner sitting in my taskbar (I try to keep my system tray and things actively loaded to as little as possible, to prevent draining of resources and allow my games to run quicker and my PC smoother, also less chance for crashing).

    However things like sound card drivers, NIC drivers, etc... will take up space. So I would never claim running a normal system that Windows only uses 30 RAM. No if you were just to load Windows with nothing else (640x480 16 colors, no sound, etc...) then it might take around 32 yes. Windows can store things in the SWAP file instead of RAM, but it is a pain to acess things from there (so much slower).
     
  11. Stryder Keeper of "good" ideas. Valued Senior Member

    Messages:
    13,105
    Let me see if I can explain it a bit better, When I mentioned VCACHE and the harddrive, I didn't mean that VCACHE is apart of the harddrive in any form.

    I was utilising the explaination of the SWAP FILE to explain that VCACHE is like a virtual Swap file within the RAM. Where programs are Allocated, your right that windows doesn't retreive the full amount of RAM back, that's due a microsoft bug probably based on the assumption that you'd be running a program, it would crash and you would want to reload it.

    If you notice I said:
    "This also includes how the CHUNKSIZE works where information is stored, your RAM's best with smaller chunks than your hard-drive."

    Okay it wasn't the best explaination for CHUNKSIZE but simply put, rather than having big blocks for chunks, I was explaining you user smaller ones. (so one large block equals 2 or 4 blocks) this would actually mean a HIGHER number for CHUNKSIZE, which is exactly what I meant, but I just said you needed "SMALL CHUNKS".

    Windows does have a default VCACHE limit, but it's just sometimes not very good at implimenting it.

    When I noted the RAM for windows, understand that means just the windows OS. NO extra's, no firewalls, no messenger services, or antivirus programs, just a clean windows install.

    Also you should note that the SWAP FILE holds information that isn't accessed as much as your RAM, take for instance if you want to open a 120Mb image and you only have 96Mb of RAM, it will cache some into RAM (What you see) and the rest onto your drive.

    The SWAP FILE will also store information from installations in my experience. Namely when windows says "Reboot to continue installation", you don't need all the files in a TEMP folder from the installation to finish it, as windows already has the encoded data in your SWAP FILE.

    Some good tools for windows systems:

    www.mlin.net ~ Has "STARTUP CPL"
    It's a useful tool that allows you to turn things off that you don't want to start up, rather than hunt round for the file entries in about 3 or 4 places.

    www.analogx.com ~ Has "Analogx memory purge"
    You can guess, you can get that memory back from exiting morrowind.

    www.outertech.com ~ Has "CACHEMAN 5.11"
    Covers all the VCACHE, VFAT, Chunksize portions in a program that can also recover memory.
     
    Last edited: Oct 4, 2002
  12. H-kon Registered Senior Member

    Messages:
    312
    Do people still use Win98?

    Oh well.
     
  13. Stryder Keeper of "good" ideas. Valued Senior Member

    Messages:
    13,105
    The answer is yes, the reason, because our poor systems aren't some P4 2+ghz system, they are just those of P3 and mediocre standards.

    XP or 2000 would slug the system too much with it's processing threads and spyware.
     
  14. Adam §Þ@ç€ MØnk€¥ Registered Senior Member

    Messages:
    7,415
    I'm running Win XP Pro on an AMD K6 200mhz. Poor me... *sniff*
     
  15. Giordano Bruno Registered Member

    Messages:
    1
    How far is it good?

    Claren, when I found your post, I thought it would be my salvation. But You guys just talked about hundred(s) of RAM.

    My computer is a Pentium 166 Mhz, 49 Mb RAM and a 10 Gb Hard Disk... too bad I know, but it runs Win98 SE in a good way. I mean, i have some more resources than in Win 95, and for now I can't afford upgrade$.

    The point is: if I change the VCache to the right parametters, would it change my life? If so, which would be the right parametters?

    :bugeye:
     
  16. Clarentavious Person Registered Senior Member

    Messages:
    934
    48 megs of RAM is very little. I would set your vcache to 16 at the most. And your chunksize to 4MB
     
  17. ThePHNX Registered Senior Member

    Messages:
    79
    ,,,,,,,,"Do people still use Win98? Oh well."

    Only The smart ones! Note `Stryder's brief (and diplomatic) allusion to SPYWARE.......
    ,,,,,,,,,Stryderunknown" The answer is yes, the reason, because our poor systems aren't some P4 2+ghz system, they are just those of P3 and mediocre standards. XP or 2000 would slug the system too much with it's processing threads and spyware.

    Excellent answer Stryder, I would only add, except for games and other nonsense (I do indulge occasionally) there is no need for anything beyond a good PIII running 98SE (dual boot with Linux / Lindows).

    ,,,,,,,,,,Adam "I'm running Win XP Pro on an AMD K6 200mhz. Poor me... *sniff*

    Indeed, POOR & FOOLISH you; aim Google at "Palladium" and "TCPA" then learn about your wonderful government's plans for personal computing via "The Fritz Chip" Ah yes, POOR, POOR, you.

    If you don't want to get rid of XP for its multi-media, gaming and entertainment capabilities, I STRONGLY suggest a second computer for connecting to the Net.

    BTW, does anyone know if AMD and any of the other non-Intel types have incorporated the Fritz?
     
  18. Ron_2o04 Registered Member

    Messages:
    1
    Hi, ive got a way big prob on my hands and i dont know how to fix it. I see a blue screen almost every 15 mins when i start running alot of programs but i only have 28mb ram so i think its a memory leak,so i check the vchache and it had nothing.(by the way the blue screen has some error about vxd and i get tons of illegal operations). any advice?
     
  19. Stryder Keeper of "good" ideas. Valued Senior Member

    Messages:
    13,105
    If you only have 28mb's of RAM and your attempting to run Win98 it would explain the problem in itself. Windows95 was suggested to take about 16mb for the OS, 98 increased that to about 20mb's, this means you have about 8mb's to run memory resident program and will mean the computer is heavily reliant upon Virtual Memory.

    If you want to continue running win98 on that system then I would suggest looking at www.analogx.com's MaxMem
    It's a little memory resident program which clears memory when it's not in use (something that 95/98 didn't do but the newer windows systems does) This should increase the systems uptime.

    However if you want to use a system with limited RAM I would suggest looking for a Commandline environment like DR-DOS or some form of Linux build. (Linux can be a high learning curve so you might be better off with a DOS build)

    Hope thats of help, and thanks for posting in an already created thread on the topic

    Please Register or Log in to view the hidden image!

     
  20. Avatar smoking revolver Valued Senior Member

    Messages:
    19,083
    //freaks out//
    28mb ... hides under a table... horrible
     
  21. cosmictraveler Be kind to yourself always. Valued Senior Member

    Messages:
    33,264
    I'm using AMD FX53 (overclocked to 3.2 gigs) with ASUS A8V MOBO along with 2 Gigs of SDDRAM, that with my 10,000 RPM 150 GIG harddrives makes gamming very fun!

    Please Register or Log in to view the hidden image!

     
Thread Status:
Not open for further replies.

Share This Page