Jump to content

VCACHE fix attempt


Xeno86

Recommended Posts

VCACHE fix attempt

This is an attempt to fix

"Out of Memory" Error Messages with Large Amounts of RAM Installed problem

described in Knowledge Base article KB253912 http://support.microsoft.com/kb/253912

Description of the fix:

Normally VCache driver calculates maximum cache size based on the amount of memory present. While this works ok for computers with less or equal 512 MB of memory, on computers with more memory VCache allocates too much memory from system area and you can experience problems (see KB).

This fix limits maximum cache size allocated dynamically to 384 MB thus removing the need to apply any of the workarounds mentioned in the KB article.

Power-users however have the ability to set the limit to a different value (lower or higher) through MaxFileCache entry in system.ini file.

Installation:

To install the fix copy Vcache.vxd file from archive to c:\Windows\system\vmm32 directory.

Uninstallation:

To remove the fix remove Vcache.vxd file from c:\Windows\system\vmm32 directory.

Note this file is for Windows 98 SE (4.10.2222). The fix is available in english and polish translation.

If there is demand, I can prepare files for other systems too.

Please leave your feedback/comments on this fix.

-Xeno86

_________

update 11.02.2008: added english translation

vcache_fix.rar

Edited by Xeno86
Link to comment
Share on other sites


VCACHE fix attempt

This is an attempt to fix

"Out of Memory" Error Messages with Large Amounts of RAM Installed problem

described in Knowledge Base article KB253912 http://support.microsoft.com/kb/253912

-Xeno86

oh goody! I just encountered one of these while testing out the new version of UBCD and i was trying to work out how to get around it automatically. i ended up setting the MaxPhysPage setting to 39999 which limits the amount of RAM Windows sees to slightly less than 1 gig which fixes the problem. It was/is a terrible hack and i was going to create something better but you beat me to it. Congratulations :thumbup I will test out ASAP on a machine i knows gives that error and i will report back ...

... and it works fine. Yay ! :thumbup:thumbup

Edited by soporific
Link to comment
Share on other sites

Well, change 2 bytes twice is not much a patch. :sneaky:

Well first of all, not 2 bytes twice but 20 bytes. If I changed 2 bytes I would completely limit maximum cache size setting, while this fix leaves you the freedom and flexibility to set it to whatever value you want (max 800M). It only affects default (automatic) value.

Secondly, what kind of fix did you expect for this particular issue? I'm open for ideas and discussion.

If you can do better - prove it :rolleyes:

It's certainly better than the "workaround" advised by Microsoft

Reduce the amount of memory that is installed in your computer to 512 MB or less.
:whistle:

... and it can be easily slipstreamed into Windows installation CD.

Link to comment
Share on other sites

Well, pardon me, no offense meant.

For me, it is useless to have more than 384MB of the cache, even 256 or 128 is too much; note that M$ notes in VCACHE articles that "setting vcache size more than 32 mb wasn't tested and not recommended".

The problem is, limiting VCACHE size does not cure the real memory problem! It limites the memory that VCACHE uses, but not allocation issue.

It helps only to cure issues that prevent MS-DOS applications or drives to work when their memory maps are overlapping with VCACHE because of high 1Gb memory shortage.

So the real patch is rewriting VMM memory manager to properly allocate memory/swap/dos arena memory with more than 1-2Gb.

There is a very good article about 98 memory problems:

Windows 9x and lots of memory: Dotting the i's (unfortunately, it is in Russian, and no online translator was able to handle it)

The solution is to reverse-engineer VMM to find the ways to work around it.

And i'm still unable to find 1GB sticks for my computer blink.gif

Link to comment
Share on other sites

Well, pardon me, no offense meant.

The guy releases a fix to a real problem, one that had me stuck for a solution, and you reply that its not much of a fix. Well, from where i'm sitting, it's a great fix and only changing 20 bytes twice means it's a very efficient patch! He didn't say it was going to save the world, he said if would fix certain things and it does.

Xeno86, don't worry, he can be a bit tactless sometimes :whistle:

Link to comment
Share on other sites

The guy releases a fix to a real problem, one that had me stuck for a solution, and you reply that its not much of a fix.

Well, i gonna repeat again: this is a not real fix to the problem. It helps only with 768Mb-1Gb memory.

With 1.5Gb, for example, you'll need to limit VCACHE to 128Mb, and with more memory you're certainly doomed.

Remember that Windows ME works with same 800Mb limit well up to 2Gb, and 98SE with rloew's patch with 512Mb limit well up to 3Gb or more.

Link to comment
Share on other sites

so i installed the fix as described and i set the MaxFileCache to 393210.

after reboot i turn on the TV tuner. No image has been rendered. then i run Ultima Online with *.bat file. I received Error message and the system has frozen.

Config:

1,5 Gb of ram.

Windows 98SE (4.10.2222), Exuberants Service pack 1, KernelEX.

XMSDSK is using 524288 kbytes. Base Memory is UMBFILLed (and it prevents reboots). No MaxPhysPage is defined in System.ini. Free memory available to windows is 1024mb (without few bytes from umb).

it doesnt work for me.

Link to comment
Share on other sites

so i installed the fix as described and i set the MaxFileCache to 393210.[...]

Hi, Offler!

Tihiy is right! MaxFileCache is the critical setting. And your setting is definitely too big for 1.5GB Try 262144 or less.

See also my post here, but bear in mind I was thinking about 2GB when I wrote it. HTH

Edit added some moments after the first post...

Oops, sorry! :blushing: I didn't realize you were just testing the patch. You have solved the problem by setting MaxFileCache =131072, with some additional settings! I just saw the thread you started here, which is the one quoted by Tihiy. Anyway, for what it is worth, my point is one should use lower and lower MaxFileCache values, as the memory gets bigger and bigger. Best wishes!

Edited by dencorso
Link to comment
Share on other sites

OK, so does someone want to suggest the best/ideal SYSTEM.INI settings for RAM sizes starting from 512 MB and going up? Heck, why not start at 32 MB ? Here's what i have so far, please feel free to suggest changes:

RAM ... MinFileCache ... MaxFileCache ... ChunkSize

32 ...... 4096 ....... 8192 ...... 512

64 ...... 8192 ....... 16384 ...... 512

128 .... 16384 ..... 32768 ...... 1024

256 .... 32768 ..... 65536 ...... 1024

512 .... 65536 ..... 131072 ...... 1024

1024 ... 131072 ... 262144 ..... 2048

1536 ... 131072 ... 262144 ..... 2048

2048 ... 131072 ... 262144 ..... 2048

4096 ... 131072 ... 262144 ..... 2048

my plan is to create an AutoFileCache hotfix for the UBCD project that will add the best settings during setup.

Edited by soporific
Link to comment
Share on other sites

OK, so does someone want to suggest the best/ideal SYSTEM.INI settings for RAM sizes starting from 512 MB and going up? Heck, why not start at 32 MB ? Here's what i have so far, please feel free to suggest changes:

[...]

Hi, soporific!

I see you didn't follow the links in my previous post... :no:

Here're my 2 cents:

RAM ... MinFileCache ... MaxFileCache ... ChunkSize

32 ...... 4096 ............ 8192 ...... 512

64 ...... 4096 .......... 16384 ...... 512

128 .... 4096 .......... 32768 ...... 1024

256 .... 4096 .......... 65536 ...... 1024

512 .... 4096 ........ 131072 ...... 1024

1024 .. 4096......... 262144 ...... 2048

1536 .. 4096......... 131072 ...... 2048

2048 .. 4096 ......... 29696 ....... 1024

4096 ... I doubt it can be made to work

For 1024MB, those are the settings I use.

for 1536MB, they are Offler's and

for 2048MB, they are Andy Aronoff's (see posts #1 and #5), corrected to be a multiple of 1024 and <= 30000 (the highest value he found to work with 2GB). I never saw anyone claim to have Win 98SE working with 4GB, and I belive it impossible because there would be no free addresses left for the virtual memory, if I'm not mistaken.

Best wishes! Keep on the great work!

Edited by dencorso
Link to comment
Share on other sites

well here are my opinions about Vcache settings without patch.

MinFileCache and maxfilechache should have the same value (i am not sure about it but it worked for me, althought i dont use it :) ).

Also it depends on Video Graphics which you have installed on system how often the bug appears. With older graphics it is not so. I have Ati Radeon 9800 with 128Mb vram (and aperture for AGP graphics is also 128 mb).

For my system which has 1024mb of ram (do not count ramdisk) i am using right now MaxFileCache=65535 because with 131072 some bugs with the cache apeared after a longer period (several hours when system was online and opening and closing vcache critical apps). With 260144 they appeared quite often.

Vcache critical apps are mostly:

- command line

- dos apps

- bat files

- tv tuner apps

- apps running on separate virtual machine engine

- older windows games

Edited by Offler
Link to comment
Share on other sites

Hi, soporific!

I see you didn't follow the links in my previous post... :no:

dencorso :hello:

good call, i hadn't followed the links!

I'm wondering why you put 4096 as the minfilecache for all RAM variations? What's your reasoning?

I was playing around with huge RAM sizes in Virtual PC and the most i could get reported by the OS was 1158 MB. This was what the OS reported, when there was actually 1500 available. To get 1158 MB I set MaxPhysPage to 48899 and this was the last possible setting before windows wouldn't load.

Thanks for those kb article links I had heard that there was a usable limit of 1 gig of RAM for Window 98se but i never knew why. That the answer is that Win98se or even WinME weren't designed for that much RAM is just so typical.

So, actually, my fix of setting MaxPhysPage to 39999 is actually a very sound thing to do. Use the left over ram for the RAM drive as has been suggested. So the file that was released inside UBCD v4.6.0 called "MaxPhysP.exe" is fine to use after all. yay.

Edited by soporific
Link to comment
Share on other sites

For my system which has 1024mb of ram (do not count ramdisk) i am using right now MaxFileCache=65535 because with 131072 some bugs with the cache apeared after a longer period (several hours when system was online and opening and closing vcache critical apps). With 260144 they appeared quite often.

Have you got MaxPhysPage set to anything in SYSTEM.INI with bugs appearing when MaxFileCache is set to 131072?

Edited by soporific
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...