Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Photo

VCACHE fix attempt

- - - - -

  • Please log in to reply
97 replies to this topic

#1
Xeno86

Xeno86

    KernelEx Creator

  • Member
  • PipPip
  • 250 posts
  • OS:98SE
  • Country: Country Flag
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

Attached Files


Edited by Xeno86, 11 February 2008 - 07:30 AM.

KernelEx: home board download


How to remove advertisement from MSFN

#2
soporific

soporific

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 705 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

-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, 02 October 2007 - 10:28 AM.


#3
Tihiy

Tihiy

    the creator

  • Member
  • PipPipPipPipPipPipPip
  • 1,915 posts
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

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

#4
Xeno86

Xeno86

    KernelEx Creator

  • Member
  • PipPip
  • 250 posts
  • OS:98SE
  • Country: Country Flag

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.
KernelEx: home board download

#5
Tihiy

Tihiy

    the creator

  • Member
  • PipPipPipPipPipPipPip
  • 1,915 posts
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

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

#6
soporific

soporific

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 705 posts

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:

#7
Tihiy

Tihiy

    the creator

  • Member
  • PipPipPipPipPipPipPip
  • 1,915 posts
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

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.

#8
Offler

Offler

    Advanced Member

  • Member
  • PipPipPip
  • 497 posts
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.

#9
dencorso

dencorso

    Adiuvat plus qui nihil obstat

  • Super Moderator
  • 5,758 posts
  • OS:98SE
  • Country: Country Flag

Donator

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, 06 October 2007 - 04:28 PM.


#10
soporific

soporific

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 705 posts
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, 06 October 2007 - 10:57 PM.


#11
dencorso

dencorso

    Adiuvat plus qui nihil obstat

  • Super Moderator
  • 5,758 posts
  • OS:98SE
  • Country: Country Flag

Donator

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, 29 May 2009 - 02:38 AM.


#12
Offler

Offler

    Advanced Member

  • Member
  • PipPipPip
  • 497 posts
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, 09 October 2007 - 01:24 PM.


#13
glocK_94

glocK_94

    Advanced Member

  • Member
  • PipPipPip
  • 406 posts
  • OS:98SE
  • Country: Country Flag
Thanks Xeno. Really glad you're back in business! :thumbup:
Here's a french translation of your fix for those interested : win9x4ever.online.fr

Edited by glocK_94, 14 October 2007 - 04:07 PM.

Traductions françaises des packs & MAJs pour Win98 : Posted Image

Stand up for Windows 9x ! Use a 9x userbar in your sig : Posted Image

#14
soporific

soporific

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 705 posts

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, 11 October 2007 - 09:25 AM.


#15
soporific

soporific

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 705 posts

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, 11 October 2007 - 11:37 AM.


#16
dencorso

dencorso

    Adiuvat plus qui nihil obstat

  • Super Moderator
  • 5,758 posts
  • OS:98SE
  • Country: Country Flag

Donator

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

Well, AFAIK, from my own experiences and from what I read around, MinFileCache is not critical and could be left out altoghether. However, setting it to 0 (zero) lets the system potencially to use no cache, and bad things might happen in this case. So I set it to a bare minimum that is a multiple of all ChunckSizes used, so as not having to worry about it anymore. But any value less than the MaxFileCache ought to do equally well. BTW, I disagree with Offler and others that recomend MinFileCache=MaxFileCache, because that makes the cache static, and if MS took the trouble of making it dynamic, I don't see the point of disabling the dynamic behaviour for no aparent reason. Be as it may, in every real word system I ever used, the cache rapidly goes up to the MaxFileCache value set and stays there, after less than 1h of use, and that's why I don't find it critical. There is one more motive to my choice: Intel and AMD processors use 4kB as the standard size for their virtual memory pages, thus I see no point in setting a MinFileCache that's less than a page, although there is no clear relation between these two things, because the cache should never be paged out of memory.

[...] 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.
[...]
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.


Yes, it is! :thumbup Then again, you might set it to 39A00, just to have exactly 922MB (I do love round numbers :D).

PS: There are two more interesting links to follow: VCACHE SETTINGS WIN9x/Me, a classic, already mentioned by Offler elsewhere, and the old Q108079, that I forgot to mention before. HTH.

Obs.: In view of Offler's cautionary post above, I'd revise my sugestions for 1.5GB to read as:
RAM ... MinFileCache ... MaxFileCache ... ChunkSize
1536 .. 4096......... 65535 ...... 1024
just to be on the safe side, if the idea is to create a general use .reg file.

Edited by dencorso, 13 October 2007 - 11:46 PM.


#17
dencorso

dencorso

    Adiuvat plus qui nihil obstat

  • Super Moderator
  • 5,758 posts
  • OS:98SE
  • Country: Country Flag

Donator

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?

As both Win 98SE and XMSDSK by Frank Uberto are XMS clients, since one has to load XMSDSK first, not forgeting to use the important /T command line switch to have the virtual disk load from the top (of extended memory) down, when Win 98SE gets to load it only sees the memory the virtual disk left unused. So, provided one sets XMSDSK to a reasonable size, Win 98 SE usually loads even if the MaxPhysPage is left altogether out, although I do like to set it anyway, just to remain on the safe side.

#18
galahs

galahs

    Advanced Member

  • Member
  • PipPipPip
  • 401 posts
I am currently doing some tests using Cacheman 5.50 to find out how much Disk Cache Windows 98 SE likes to use.


So far opening a whole heap of programs at once has taken it up to 90MB then closing them all reduced it to just 70MB.

Posted Image
Australia, it's time we became a Republic!


#19
galahs

galahs

    Advanced Member

  • Member
  • PipPipPip
  • 401 posts
Ok, I tried opening and closing and opening and closing and opening different programs over a few hours. I included playing some media files (video and music) and playing a few windowed games.

My system has 256MB of RAM and the system was running stock vcache settings (ie. nothing added to system.ini)

With all the programs open I had NO Free Physical Memory available.
57MB of Paging File in Use
At one stage my DiskCache peaked at 103.8 MBytes but once all free Physical RAM was in use, the DiskCache was shrunk to 60.3 MB.


Someone should repeat this type of experiment with larger amounts of RAM so we can determine how Windows responds when it has more RAM available.

Edited by galahs, 15 October 2007 - 08:51 PM.

Posted Image
Australia, it's time we became a Republic!


#20
galahs

galahs

    Advanced Member

  • Member
  • PipPipPip
  • 401 posts
Interesting I did the test again, trying to overload the system with running apps and again the DiskCache peaked at 103.8MB before shrinking!

Could it be that 103.8MB is a built in limit for systems with 256MB of RAM?


I'll carry out some more testing to see if I can replicate this behaviour.

Posted Image
Australia, it's time we became a Republic!


#21
galahs

galahs

    Advanced Member

  • Member
  • PipPipPip
  • 401 posts
Further testing has proven that theory wrong.

I just had it peak at 110.2MB


But the fact that Windows is dedicating that much DiskCache makes me think 65535 is a tad too small a limit or am I missing something?

Posted Image
Australia, it's time we became a Republic!


#22
soporific

soporific

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 705 posts
This is the settings table i'm working from to set the values in the AutoSYSTEMini project i'm working on:

Posted Image

as you can see there's two values i'm not sure what to put for ... if anyone has ever used over 1 gig, what did you use for the MaxPhysPage value? Did you use it?

If anyone has any comments about the table, please type now or forever hold your peace! :lol:

Edited by soporific, 16 October 2007 - 04:50 AM.


#23
galahs

galahs

    Advanced Member

  • Member
  • PipPipPip
  • 401 posts
Why are your MaxFileCache settings so low?

Why not 70% of the available RAM?

I also don't see the point of specifying a minimum cache size.

Posted Image
Australia, it's time we became a Republic!


#24
galahs

galahs

    Advanced Member

  • Member
  • PipPipPip
  • 401 posts
This website: http://adriansrojakp...peed_Demonz.htm is the first one I have found that actually done some benchmark testing to see the improvement using MaxFileCache and Chunksize settings.

The conclusion was the stock 512 byte chunk size was the best performer and that limiting the MaxFileCache didn't improve performance.

Posted Image
Australia, it's time we became a Republic!


#25
dencorso

dencorso

    Adiuvat plus qui nihil obstat

  • Super Moderator
  • 5,758 posts
  • OS:98SE
  • Country: Country Flag

Donator

This is the settings table i'm working from to set the values in the AutoSYSTEMini project i'm working on:
[...]
If anyone has any comments about the table, please type now or forever hold your peace! :lol:

soporific, my friend, as I have said above: :whistle:

Obs.: In view of Offler's cautionary post above, I'd revise my sugestions for 1.5GB to read as:
RAM ... MinFileCache ... MaxFileCache ... ChunkSize
1536 .. 4096......... 65535 ...... 1024
just to be on the safe side, if the idea is to create a general use .reg file.

That said, AFAIK your 1158 MB configuration with MaxPhysPage=48899 IS the record.
I just don't recall where I read about someone else allowing windows to see 1022 MB...
The maximum value ever mentioned by MS is MaxPhysPage=40000 (1024 MB), in Q304943, and Offler, in a post above, reported 1024 MB. And that's all I know about it. For the time being, I think 39A00 is a good idea for 1.5 and 2.0 GB, until some experimentation shows one really can go further.
I think you and Offler are the only ones presently in position to start such testing. As for me, I'll try to add 512 MB more memory asap (I already do have such a stick), but I have serious doubts my mobo can manage that much memory well. The A7V600-Xs are know to have problems with more than one memory stick at or near FSB 400 (despite what ASUS says), so I cannot guarantee I'll be able to perform such testings anytime soon. I'll keep you posted, though. And, just for the record, I use ConservativeSwapFileUsage=0.

galahs, the point is not performance: above 512 MB, the question is whether windows is able to start at all, and if it does start, whether it will perform normally or throw all sorts of errors at you, the infamous "out of memory" errors in Q253912 among them. But, as I said before, IMHO the key parameters are MaxFileCache and MaxPhysPage. The others can be tweaked for performance, but are not crucial for starting ability and stability.

Edited by dencorso, 17 October 2007 - 02:12 AM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users



How to remove advertisement from MSFN