Archived

This topic is now archived and is closed to further replies.

Guest Hedgehog

"OOM Error" explained in comprehensible English

Recommended Posts

The following is offered as yet one more attempt to explain just what the "OOM Error" is, and how it can be addressed.Since this seems to affect users of FSX primarily, this seems appropriate for this forum, allowing as how it is really neither fish nor fowl... ;)-----------------------------------First of all -and critical for understanding is that this issue has absolutely nothing whatsoever to do with the amount of physical memory (RAM) you have installed. Period.All 32 bit operating systems (WinXP and Vista32) have 4 GBs of Virtual Address Space (VAS) to work with, as that is the maximum number that can be expressed with only 32bits. The VAS table is the same size whether your system has 512MB RAM or 4GB of RAM...By default, 2GB of VAS addresses are reserved for the operating system, with the remaining 2GB of VAS reserved for application programs. Note that every application running maintains it's own set of VAS addresses, and that the operating system will take care of shuffling both the application's address table and the data contents back and forth from the Virtual Memory on the hard drive as necessary.Obviously, everytime a running application needs to access it's VAS table and data, the OS needs to swap things around. The more application programs running at once, the more things get slowed down.When you add the /3GB switch, what you are doing is increasing the total available slice of VAS for FSX to use, which in turn reduces the available slice of VAS for the operating system.It's a case of "robbing Peter to pay Paul..."What the 3GB "tweak" accomplishes in both WinXP and Vista32 is that you essentially increase the size of the VAS table available to ALL running programs for which the "flag" for "LARGEADDRESSAWARE" has been set. The FSX.exe for both RTM, SP1 must be manually made "LARGEADDRESSAWARE", where the SP2 FSX.exe has already been marked as "LARGEADDRESSAWARE."In all cases though, the onus is on the user to tell their operating system to increase the VAS for all "enabled" application programs. The procedure for WinXP and Vista are different, but the results are identical.This next bit of information is critical to coming to a more full understanding of what is causing the "OOM Error" to occur:FSX will only use "contiguous 1MB blocks of VAS."Anytime FSX cannot find a 1MB block of VAS in which to "load stuff," it will summarily crash to desktop...The following is offered as yet one more attempt to explain just what the "OOM Error" is, and how it can be addressed.-----------------------------------All 32 bit operating systems (WinXP and Vista32) have 4 GBs of VAS to work with, as that is the maximum number that can be expressed with only 32bits. The VAS table is the same size whether your system has 512MB RAM or 4GB of RAM...By default, 2GB of VAS addresses are reserved for the operating system, with the remaining 2GB of VAS reserved for application programs. Note that every application running maintains it's own set of VAS addresses, and that the operating system will take care of shuffling both the application's address table and the data contents back and forth from the Virtual Memory on the hard drive as necessary.Obviously, everytime a running application needs to access it's VAS table and data, the OS needs to swap things around. The more application programs running at once, the more things get slowed down.When you add the /3GB switch, what you are doing is increasing the total available Virtual Address Space (VAS) for FSX to use, which in turn reduces the available VAS for the operating system.It's a case of "robbing Peter to pay Paul..."What the 3GB "tweak" accomplishes in both WinXP and Vista32 is that you essentially increase the size of the VAS table available to ALL running programs for which the "flag" for "LARGEADDRESSAWARE" has been set. The FSX.exe for both RTM, SP1 must be manually made "LARGEADDRESSAWARE", where the SP2 FSX.exe has already been marked as "LARGEADDRESSAWARE."In all cases though, the onus is on the user to tell their operating system to increase the VAS for all "enabled" application programs. The procedure for WinXP and Vista are different, but the results are identical.This next bit of information is critical to coming to a more full understanding of what is causing the "OOM Error" to occur:FSX will only use "contiguous 1MB blocks of VAS."Anytime FSX cannot find a 1MB block of VAS in which to "load stuff," it will summarily crash to desktop...Incidentally, it's also important to note that the amount of memory on a video card can actually hinder performance rather than help......that is because the video card's memory addresses are mapped to the operating system's slice of VAS, and therefore reduces the total number of Virtual Addresses available the operating system...For example, a video card with 512MB of onboard RAM will consume 512MB of the available operating system's slice of VAS, so robbing too much from the OS's slice can cause a lot of problems. As always, this is a balancing act...FINE TUNING VASAs I stated previously, since it's a case of "robbing Peter to pay Paul," it may be best to allocate LESS than a full GB of VAS to applications, which is why Phil Taylor recommends using /2560 rather than the full /3072 MB.NOTE: The following applies only to WinXP users:--------------------------------------------------------In your boot.ini file, if you have added the /3GB switch already:multi(0)disk(0)rdisk(0)partition(1)WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect /3GBTo "fine tune" the actual amount of VAS allocated, you need only add another switch to the end of the entire entry:/Userva=2560or whatever size you wish, keeping in mind the 1MB contiguous limit of FSX. In such a case, using any number that isn't a multiple of 512MB simply doesn't make much sense...NOTE: The following applies only to Vista32 users:--------------------------------------------------------BCDEDIT /set increaseuserva 2560BCDEDIT /set increaseuserva 3072WARNING!It is possible to starve the operating system's slice of VAS to the point that your system will no longer boot!If this happens, you must reboot the computer into "Safe Mode" (which bypasses the /3GB switch, and then edit your boot.ini (WinXP) or use bcdecit (Vista) to reduce the size of the application slice of the VAS..FINE TUNING VASAs I stated previously, since it's a case of "robbing Peter to pay Paul," it may be best to allocate LESS than a full GB of VAS to applications, which is apparently why Phil Taylor recommends using /2560 rather than the full /3072 MB.NOTE: The following applies only to WinXP users:--------------------------------------------------------In your boot.ini file, you have added the /3GB switch already:multi(0)disk(0)rdisk(0)partition(1)WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect /3GBTo "fine tune" the actual amount of VAS allocated, you need only add another switch to the end of the entire entry:/Userva=2560or whatever size you wish, keeping in mind the 1MB contiguous limit of FSX. In such a case, using any number that isn't a multiple of 512MB simply doesn't make much sense...NOTE: The following applies only to Vista32 users:--------------------------------------------------------BCDEDIT /set increaseuserva 2560BCDEDIT /set increaseuserva 3072WARNING!It is possible to starve the operating system's slice of VAS to the point that your system will no longer boot!If this happens, you must reboot the computer into "Safe Mode" (which bypasses the /3GB switch, and then edit your boot.ini (WinXP) or use bcdecit (Vista) to reduce the size of the application slice of the VAS.

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Thanks for the clear and concise explanation, Bill. I never really understood prior explanations of this topic, but I believe I do now.I may try this when I get home and see how it works (Vista32 w/4GB of memory)Thanks you,Mark

Share this post


Link to post
Share on other sites

Great post Billmake sure you save the link.. you KNOW you will be posting that link over and over againLOL

Share this post


Link to post
Share on other sites

>>>Great post Bill>>make sure you save the link.. you KNOW you will be posting>that link over and over againActually, I'm thinking that it would be a great topic for the FSDeveloper.com Wiki... :-cool

Share this post


Link to post
Share on other sites

Hi Bill-How do you reverse the entry if things go awry?Mark

Share this post


Link to post
Share on other sites

>Hi Bill->>How do you reverse the entry if things go awry?Mark, that is the last sentence of the article... ;)"If this happens, you must reboot the computer into "Safe Mode" (which bypasses the /3GB switch, and then edit your boot.ini (WinXP) or use bcdecit (Vista) to reduce the size of the application slice of the VAS."For WinXP users it's as simple as removing the /3GB and /Userva=nnnn entries from the boot.ini file.For Vista users they would open a command prompt and type:BCDEDIT /set decreaseuserva nnnn

Share this post


Link to post
Share on other sites

Hehehe...Maybe you should have repeated the whole thing one more time Bill :-DDD

Share this post


Link to post
Share on other sites

>For example, a video card with 512MB of onboard RAM will>consume 512MB of the available operating system's slice of>VAS, so robbing too much from the OS's slice can cause a lot>of problems. As always, this is a balancing act...>So, the question is: what is the minimal slice of VAS that the operating system comfortably needs? WinXP 32-bit here. >or whatever size you wish, keeping in mind the 1MB contiguous>limit of FSX. In such a case, using any number that isn't a>multiple of 512MB simply doesn't make much sense...How do you infer this? Pls read again and explain. I don't see the logical connection. I know I'm missing something. :)Thanks.

Share this post


Link to post
Share on other sites

>>>For example, a video card with 512MB of onboard RAM will>>consume 512MB of the available operating system's slice of>>VAS, so robbing too much from the OS's slice can cause a lot>>of problems. As always, this is a balancing act...>>>>So, the question is: what is the minimal slice of VAS that the>operating system comfortably needs? WinXP 32-bit here. >>>or whatever size you wish, keeping in mind the 1MB>contiguous>>limit of FSX. In such a case, using any number that isn't a>>multiple of 512MB simply doesn't make much sense...>>How do you infer this? Pls read again and explain. I don't see>the logical connection. I know I'm missing something. :)>>Thanks.DirkYou were fine with the numbers you originally started with which is what Bill posted above 2560Why you lowered that without the system showing any sign of OOM is a mystery to me. You seem to think (at least that is the impression I get) the system will run better if the OS has more? That

Share this post


Link to post
Share on other sites

>Why you lowered that without the system showing any sign of>OOM is a mystery to me. You seem to think (at least that is>the impression I get) the system will run better if the OS has>more? That

Share this post


Link to post
Share on other sites

You never mentioned you were getting OOM's in your other posts that I can remember.. You just asked about reducing it to give the OS more room because of concern about the memory size on your video card. That is why I suggested from Phils post on the issue you reduce the amount from 2560 if you see OOM's but to leave it if you didn't.I now know you are getting OOM's. Before I did not. Had I known my advice would have been different.According to the MS information I read you can reduce that value by 64, 128, 256, 512 and still be within the spec of using the feature, that is what I meant. I did not mean to say that the value you are using can be divided the same between 512 and 64. I will see if I can dig up the MS link in the developers area. its been a few years since I read that info.If you lowered the value of 2560 by 64 or even 128 until the OOM stopped, that is the point where it is best tuned. You could raise the value that you use now until the OOM comes back and then back off. 6 of 1 1/2 dozen of the other.:)

Share this post


Link to post
Share on other sites

>You never mentioned you were getting OOM's in your other posts>that I can remember.. You just asked about reducing it to give>the OS more room because of concern about the memory size on>your video card. My bad, I meant FSX. I had never seen OOM in FSX. But in FS9 I got it every time flying the 1st training flight of RC to KORD. But not anymore after the fixes, it's clear, right?>I did not mean to say >that the value you are using can be divided the same between>512 and 64.No, you didn't. Neither did I refer to it. I just said I couldn't make it out from n4gix's post:>To "fine tune" the actual amount of VAS allocated, you need only >add another switch to the end of the entire entry:>>/Userva=2560>>or whatever size you wish, keeping in mind the 1MB contiguous limit >of FSX. In such a case, using any number that isn't a multiple of >512MB simply doesn't make much sense...Still this doesn't make sense to me. Why, why 'SIMPLY DOESN'T MAKE MUCH SENSE...'? Read the above abstract again, please. Do you see why?

Share this post


Link to post
Share on other sites

Did you use the 'manual' method to mark the FS9.exe file to use >2GB?Perhaps that will help. It's the same method posted for doing it to to FSX.exe before SP2 was released and I do believe it works, but, I have never personally tried or researched itNo worries.. I see now why I was confused... LOLIf you did mark FS9.exe for 2G+ use then just raise the value until the crash comes back, then back off a touch.I can see where there can be confusion.

Share this post


Link to post
Share on other sites

Thanks, Nick. It's just english was not vey comprehensive in places. :)

Share this post


Link to post
Share on other sites

I once heard that that the boot.ini on Windows XP Home would not accept this line. Is that true?Glenn

Share this post


Link to post
Share on other sites