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

>>>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. :)Dirk, the 512MB I cited in the above example was directed at the specific case of using a video card with 512MB memory.In fact, you can fine tune the parameter to nearly any increment you like, provided it is a power^2 value. ;)

Share this post


Link to post
Share on other sites
Yikes! Somehow during the migration of the forums to this new platform, the original post in this thread has now become #26!This is the orginal post in this thread:http://forums1.avsim.net/index.php?showtopic=65741&st=26See this Wiki Article also:OOM Errorhttp://forums.flightsim.com/fswiki/index.php/OOM_Error
>If you dont see any OOM errors on 4GB, don

Share this post


Link to post
Share on other sites

Agreed BillBut we are talking about FSX and FS9 here, not multitasking, and I know what you mean.and at the same time if the value needs tweaking because of system/application requirements that should become apparent to the user from seeing how the system normally ran in the past without the edit and memory installed There is no way I can think of for the typical user to calculate that value unless they understand everything there is to know about the needs of the installed software and their use of it so the baseline is general to get the ball rolling, and in that my statement was generalMost wont have any need to change from there unless something dictates otherwise like Dirks FS9 crash.. etc

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?My research has so far indicated that while at one time this may have been the case, with all SP2 and all Updates current, it is now working. In any event, here is a method that will allow you to try it in a non-destructive method. It will allow you to choose at boot time which environment you want to load:a) Access the boot.ini file by opening the System Properties dialog on "My Computer". Under the Advanced tab and Startup and Recovery press Settings. In the startup and recovery dialog press the edit button. This should open a text file with something close to the following content: [boot loader] timeout=30 default=multi(0)disk(0)rdisk(0)partition(1)WINDOWS [operating systems] multi(0)disk(0)rdisk(0)partition(1)WINDOWS="Microsoft Windows XP Home Edition" /fastdetect /noexecute=optin :( Were are going to modify it and make a failsafe so that if the mod doesn't work we can go back to the original setting: Copy the last line and add /3GB to the end of it (make sure you spell it right). Between the parentheses type 3GB at the end so you'll be able to recognize it when XP restarts. Also if you don't have noexecute=optin add that too. The whole thing will look like this [boot loader] timeout=30 default=multi(0)disk(0)rdisk(0)partition(1)WINDOWS [operating systems] multi(0)disk(0)rdisk(0)partition(1)WINDOWS="Microsoft Windows XP Home Edition" /fastdetect /noexecute=optin multi(0)disk(0)rdisk(0)partition(1)WINDOWS="Microsoft Windows XP Home Edition 3GB" /fastdetect /noexecute=optin /3GB c) Save the file and restart the machine. Now you will have 2 choices when booting. Pick the '3GB'. If it crashes or you experience any other problems go back to the first option. Later try adding the userva=nnn switch to the last line of boot.ini and save. This is how the last line would look: multi(0)disk(0)rdisk(0)partition(1)WINDOWS="Microsoft Windows XP Home Edition 3GB" /fastdetect /noexecute=optin /3GB /userva=2560 Also check System Properties and make sure that under the General tab it say Physical Address Extension at the bottom.

Share this post


Link to post
Share on other sites

Very Interesting post that brings up a question.Is there any way to limit the amount of memory the video card uses on a temp basis? I have an ATI 2900XT with 1gig of video memory. Hindsight being what is it, probably not the best choice for trying to run FSX. And it is clearly evident in that I have BSODs referencing ATI dlls when I tried w/o a USERVA switch.Hate the thought of giving up a less than six month old card . . .Joe Lorenc

Share this post


Link to post
Share on other sites

Doesn't SP2 automatically address this issue for Vista? Thanks...

Share this post


Link to post
Share on other sites

>Dirk, the 512MB I cited in the above example was directed at>the specific case of using a video card with 512MB>memory.>>In fact, you can fine tune the parameter to nearly any>increment you like, provided it is a power^2 value. ;)>Thanks, Bill. It does make sense for me finally. But what am I gonna do with my 1024Mb video card? Buy a new one with 512Mb onboard? I know that /Userva=2048 is too little (getting OOMs in FS9) and /Userva=3072 would be too much (I'm thinking in 1024Mb chunks here per your explanation). For what it matters I got 4GB of RAM, but I understand it is not relevant. Nick_N assured me it should not be a problem, but your post leaves questions. What if I'm loosing on the performance with this 1Gb card? No one has answered yet how much VAS the system needed to run comfortably? What are your thoughts on this?Many thanks.

Share this post


Link to post
Share on other sites

And btw, is /3G /Userva=2048 setting + modified FS9.exe (over 2Gb aware) situation the same like non-3Gb boot and non-modified FS9.exe for the system running FS9? I'm thinking about this 2048 value. I'll try /userva=2048 and see if it cures my OOMs. For me it will be important since I'll be able to keep my 1GB RAM card. I calculate it this way: 2048Mb for FS9.exe, 1Gb for my card and 1Gb for the system. Does my estimate look right? :)

Share this post


Link to post
Share on other sites

>Doesn't SP2 automatically address this issue for Vista?>Thanks...The only thing SP2 did was mark the fsx.exe file with the /LARGEADDRESSAWARE flag. It's still up to the user to enable the /3GB switch and specify (if desired) the precise amount of UserVA to use.

Share this post


Link to post
Share on other sites