MSFN Forum: VCACHE fix attempt - MSFN Forum

Jump to content


  • 5 Pages +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

VCACHE fix attempt Rate Topic: -----

#1 User is offline   Xeno86 

  • KernelEx Creator
  • PipPip
  • Group: Members
  • Posts: 250
  • Joined: 26-March 06
  • OS:98SE
  • Country: Country Flag

Posted 02 October 2007 - 09:47 AM

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 File(s)


This post has been edited by Xeno86: 11 February 2008 - 07:30 AM



#2 User is offline   soporific 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 705
  • Joined: 12-June 05

Posted 02 October 2007 - 09:56 AM

View PostXeno86, on Oct 3 2007, 01:47 AM, said:

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

This post has been edited by soporific: 02 October 2007 - 10:28 AM


#3 User is offline   Tihiy 

  • the creator
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,608
  • Joined: 19-November 04
  • OS:Windows 7 x64
  • Country: Country Flag

  Posted 02 October 2007 - 12:18 PM

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

#4 User is offline   Xeno86 

  • KernelEx Creator
  • PipPip
  • Group: Members
  • Posts: 250
  • Joined: 26-March 06
  • OS:98SE
  • Country: Country Flag

  Posted 02 October 2007 - 01:57 PM

View PostTihiy, on Oct 2 2007, 08:18 PM, said:

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

Quote

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.

#5 User is offline   Tihiy 

  • the creator
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,608
  • Joined: 19-November 04
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 02 October 2007 - 02:31 PM

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:
http://www.ixbt.com/...9x-memory.shtml (unfortunately, it is in Russian, and no online translator was able to handle it)

The solution is to reverse-engineer VMM (+ clean-room reverse-engineer rloew's patch?) to find the ways to work around it.
And i'm still unable to find 1GB sticks for my computer :blink:

#6 User is offline   soporific 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 705
  • Joined: 12-June 05

Posted 02 October 2007 - 06:50 PM

View PostTihiy, on Oct 3 2007, 06:31 AM, said:

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 User is offline   Tihiy 

  • the creator
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,608
  • Joined: 19-November 04
  • OS:Windows 7 x64
  • Country: Country Flag

  Posted 03 October 2007 - 03:19 AM

Quote

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 User is offline   Offler 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 497
  • Joined: 29-October 06

Posted 06 October 2007 - 03:48 PM

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 User is offline   dencorso 

  • Adiuvat plus qui nihil obstat
  • Group: Super Moderator
  • Posts: 4,861
  • Joined: 07-April 07
  • OS:98SE
  • Country: Country Flag

Posted 06 October 2007 - 04:15 PM

View PostOffler, on Oct 6 2007, 06:48 PM, said:

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!

This post has been edited by dencorso: 06 October 2007 - 04:28 PM


#10 User is offline   soporific 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 705
  • Joined: 12-June 05

Posted 06 October 2007 - 10:54 PM

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.

This post has been edited by soporific: 06 October 2007 - 10:57 PM


#11 User is offline   dencorso 

  • Adiuvat plus qui nihil obstat
  • Group: Super Moderator
  • Posts: 4,861
  • Joined: 07-April 07
  • OS:98SE
  • Country: Country Flag

Posted 07 October 2007 - 12:25 AM

View Postsoporific, on Oct 7 2007, 01:54 AM, said:

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!

This post has been edited by dencorso: 29 May 2009 - 02:38 AM


#12 User is offline   Offler 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 497
  • Joined: 29-October 06

Posted 07 October 2007 - 03:05 AM

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

This post has been edited by Offler: 09 October 2007 - 01:24 PM


#13 User is offline   glocK_94 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 405
  • Joined: 13-July 06
  • OS:98SE
  • Country: Country Flag

Posted 08 October 2007 - 03:11 PM

Thanks Xeno. Really glad you're back in business! :thumbup:
Here's a french translation of your fix for those interested : win9x4ever.online.fr

This post has been edited by glocK_94: 14 October 2007 - 04:07 PM


#14 User is offline   soporific 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 705
  • Joined: 12-June 05

Posted 11 October 2007 - 08:09 AM

View Postdencorso, on Oct 7 2007, 04:25 PM, said:

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.

This post has been edited by soporific: 11 October 2007 - 09:25 AM


#15 User is offline   soporific 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 705
  • Joined: 12-June 05

Posted 11 October 2007 - 11:37 AM

View PostOffler, on Oct 7 2007, 07:05 PM, said:

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?

This post has been edited by soporific: 11 October 2007 - 11:37 AM


#16 User is offline   dencorso 

  • Adiuvat plus qui nihil obstat
  • Group: Super Moderator
  • Posts: 4,861
  • Joined: 07-April 07
  • OS:98SE
  • Country: Country Flag

Posted 13 October 2007 - 04:48 PM

View Postsoporific, on Oct 11 2007, 11:09 AM, said:

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

Quote

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

This post has been edited by dencorso: 13 October 2007 - 11:46 PM


#17 User is offline   dencorso 

  • Adiuvat plus qui nihil obstat
  • Group: Super Moderator
  • Posts: 4,861
  • Joined: 07-April 07
  • OS:98SE
  • Country: Country Flag

Posted 14 October 2007 - 12:02 AM

View Postsoporific, on Oct 11 2007, 02:37 PM, said:

View PostOffler, on Oct 7 2007, 07:05 PM, said:

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 User is offline   galahs 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 401
  • Joined: 01-December 05

Posted 14 October 2007 - 09:51 PM

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.

#19 User is offline   galahs 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 401
  • Joined: 01-December 05

Posted 15 October 2007 - 12:11 AM

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.

This post has been edited by galahs: 15 October 2007 - 08:51 PM


#20 User is offline   galahs 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 401
  • Joined: 01-December 05

Posted 15 October 2007 - 08:43 PM

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.

Share this topic:


  • 5 Pages +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

3 User(s) are reading this topic
0 members, 3 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy