Sign in to follow this  
FSXCYYZEGLL

Affinity Mask, value needed

Recommended Posts

Hello

 

I have a question about affinity mask settings. I have a 4ghz quad core system and it appears the system has 8 logical cores so which affinity mask setting should I use, I tried a 84 setting and I kept getting freezes due to one of the cores getting overloaded, so my question. What setting should I use to make sure that core #0 is not being used. Thanks for the help.

 

Signed Jon.

Share this post


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

Maybe I should've rephrased the question, how exactly would I change the affinity mask setting to exclude core 0 because I'm just really confused on that step.

 

 

 

Signed Jon.

 

Use any even number.  Core zero is the only value that can make the number odd, so, if your number is even it is excluded.  I use 244, giving the sim 5 cores.

 

BTW, are you overclocking? 

Share this post


Link to post
Share on other sites

Use any even number.  Core zero is the only value that can make the number odd, so, if your number is even it is excluded.  I use 244, giving the sim 5 cores.

 

BTW, are you overclocking? 

 

Yeah tried 244, it still froze trying to fix the fsx freeze as I've narrowed it down to the affinity mask setting.

 

Signed Jon

Share this post


Link to post
Share on other sites

With HT enabled remember cores have two logical processors. With a four core HT enabled, first try it with four straight cores AffinityMask=85=01,01,01,01, next make sure all your exe addons run on cores 2 and 3 avoiding cores 0 and 1 so in that case assign LPs 5 and 7 (cores 2 and 3) to all addon exe apps (10,10,00,00).

Share this post


Link to post
Share on other sites

Use any even number.  Core zero is the only value that can make the number odd, so, if your number is even it is excluded.  I use 244, giving the sim 5 cores.

 

 

I would think that the underlying question is actually:  How do I exclude the first of my four (physical-) cores.

 

In that case you want to have an AM that ends in  00.

 

Examples: 244 = 11 11 01 00

                  84  = 01 01 01 00

Share this post


Link to post
Share on other sites

the underlying quetion is why he gets the freezes, and since the first LP is always running hot he's probably mistaking that for the "one of the cores getting overloaded"

 

So if you do want to only use those three physical cores for the sim put those addon exe apps on LPs 0 and 1, the two logical processors of core zero, and use an AffinityMask=116 for the sim.

Share this post


Link to post
Share on other sites

Generally all those AMs are going to amount to similar performance, whereas "freezing" might be caused by a number of problems; try running the sim in stock trim then bring in addons like weather and ai traffic and retest.

Share this post


Link to post
Share on other sites

Hey Bert, my problem with this Q. is that I don't think AMs (esp. those AMs discussed so far) are really going to be responsible for any pauses glitches or freezes.

 

I would check there's no overheating and for more testing rename the dll.xml and exe.xml temporarily.

Share this post


Link to post
Share on other sites

If you are using steam edition, affinity mask is no longer needed, only if you want to try different settings. I have read complete fsx steam changelog, affinity mask is set during installation based on your CPU. Just tested it yesterday, you don't need to change anything even if you play with HT on / off, it seems to detect changes too. It sets FSX not to use first core, and to use the rest of physical cores(probably 14 / 84 values). 

 

HT off:

https://s22.postimg.org/lv7re36xd/Capture.jpg

 

HT on:

https://s21.postimg.org/hxm57ywpz/Capture.jpg

 

I am impresed with Steam edition, they changed a lot of things, not too much tweaking is needed anymore. I'm using BP=0 only. It works great even without it, but BP=0 helps with complex airliners over fps hungry sceneries. 

 

To add something about freezing - try to disable windows update service - set it to manual. There is a problem with(at least in windows 7). For some people, this solved bluries, for me, it increased FSX performance too. It puts additional load on CPU(a lot)while FSX is running.

I still get some microstutters with orbx vector enabled, but only since my SSD decided to day a month after warranty period expired  :P

Share this post


Link to post
Share on other sites

Hey Bert, my problem with this Q. is that I don't think AMs (esp. those AMs discussed so far) are really going to be responsible for any pauses glitches or freezes.

 

 

I understand.. the pauses may have an other origin entirely.. :wink:

Share this post


Link to post
Share on other sites

I would think that the underlying question is actually:  How do I exclude the first of my four (physical-) cores.

 

In that case you want to have an AM that ends in  00.

 

Examples: 244 = 11 11 01 00

                  84  = 01 01 01 00

Thanks I've tried 244 it failed as I mentioned, I also tried 84 so that didn't do much either although the freezes were less frequent, I'll try the other numbers.

 

Hey Bert, my problem with this Q. is that I don't think AMs (esp. those AMs discussed so far) are really going to be responsible for any pauses glitches or freezes.

 

I would check there's no overheating and for more testing rename the dll.xml and exe.xml temporarily.

There doesn't seem to be overheating although I'll check I also haven't overclocked it in any way. What do you mean by rename the dll.xml and exe.xml, I've already tried other methods, basically all I could find and the only thing that increased or decreased the frequency of the freezes was affinity mask, for default aircraft it doesn't come on, but as soon as I use something like pmdg 747 they come., There also seems to be no connection with my weather program, while the freezes did stop on some flights with the weather program I've tried 2 different weather programs and they both have had freezing occur, it also doesn't appear to relate as whether the weather program could find a station since the freezes occurred several times in area where the stations were bountiful in number. I mostly came to affinity mask because everything else that had worked for anyone else apart from affinity mask had done nothing for me. By the way thanks everyone for all the responses.

 

Signed Jon.

Share this post


Link to post
Share on other sites

Renaming the dll.xml file temporarily to for example dll.xml.sav is what we might do to quickly test to see that there's no big problems coming from those loaded dlls, we can do the same for exes. If your AM changes are making a difference then there could be some kind of problem with where other apps run on the CPU. With the sim on four straight cores (AM=85 or 170) you'll get the best result but you need to move your exe apps up onto the last two cores. Otherwise reserve the first core for apps by the use of AM=116.

Share this post


Link to post
Share on other sites

Renaming the dll.xml file temporarily to for example dll.xml.sav is what we might do to quickly test to see that there's no big problems coming from those loaded dlls, we can do the same for exes. If your AM changes are making a difference then there could be some kind of problem with where other apps run on the CPU. With the sim on four straight cores (AM=85 or 170) you'll get the best result but you need to move your exe apps up onto the last two cores. Otherwise reserve the first core for apps by the use of AM=116.

 

How can I move my exe apps unto the last 2 cores? By just manual input?

 

Signed Jon

Share this post


Link to post
Share on other sites

Renaming the dll.xml file temporarily to for example dll.xml.sav is what we might do to quickly test to see that there's no big problems coming from those loaded dlls, we can do the same for exes. If your AM changes are making a difference then there could be some kind of problem with where other apps run on the CPU. With the sim on four straight cores (AM=85 or 170) you'll get the best result but you need to move your exe apps up onto the last two cores. Otherwise reserve the first core for apps by the use of AM=116.

ASN recommends using 3 cores top, I looked up the affinity mask calculator and it said an affinity mask of 16. so would 16 only make me use 3 cores and only physical cores? Also does AM=116 just mean core 0 is being used for apps and everything else is on for simulator.

 

Signed Jon.

Share this post


Link to post
Share on other sites

How can I move my exe apps unto the last 2 cores? By just manual input?

 

Signed Jon

Batch file, FSUIPC, Process Lasso...

 

ASN recommends using 3 cores top, I looked up the affinity mask calculator and it said an affinity mask of 16. so would 16 only make me use 3 cores and only physical cores? Also does AM=116 just mean core 0 is being used for apps and everything else is on for simulator.

 

Signed Jon.

I think you misinterpreted their intent, I think they are talking about a four core and reserving one for ASN. Yes 116=01,11,01,00 means the sim utilises three cores (cores 2, 3 on the left) but four LPs, the two LPs on the same core (core 2, LPs 4, 5) generally don't max out together during the regular running of the sim, combining any other two LPs reduces performance. Four straight cores yeilds slightly better performance and loads the scenario faster but inevitably you'll have your addon exe processes mixing with those. At least with 116 you leave one core free for ASN (core 0, LPs 0, 1) but you need to keep all your exe addons there.

Share this post


Link to post
Share on other sites

my understanding is that hyperthreading should be turned off for best results and an affinity mask of 15 should be used (binary 1110).

Share this post


Link to post
Share on other sites

You need to carry out your own tests and investigate the theory. AM=15 thats binary 1111. If you have a Hyperthreading CPU then turning off your HT is a bit of a howler to be honest. Better to run a four core+HT with HT enabled and AM 85 or 170, or reserve core zero and AM=116.

Share this post


Link to post
Share on other sites

my understanding is that hyperthreading should be turned off for best results and an affinity mask of 15 should be used (binary 1110).

1110 is actually 14, not 15

Share this post


Link to post
Share on other sites

Let's put it in a very simplified way; take a CPU core and imagine it has two stages, the first stage shall we say "arranges" the code to be computed, there's a lot going on here branch prediction for example, call it the pre-compute stage, the second stage does the real process of computing all that. So if we imagine an 8 core non HT CPU we have 8 compute stages supplied by 8 pre-compute stages. Now look at the four core+HT with HT enabled, this is 8 pre-compute stages supplying 4 compute stages, 8 logical processors (LP) but only 4 cores. So in effect the doubling of the pre-compute stages can increase the overall performance of the PC by up to 30%. Certain software looks at each LP as a real core and creates a process on each core to run tasks in parallel, it would make 2 processes per core instad of one, which can detract from the performance depending on how those processes communicate their results. So a program (P3D for example) will occupy all 8 LPs even though it really only wants to occupy 4 cores. That's why the AffinityMask (AM) is provided. At first the sim will look at it's AM and decide what to do, as it is started up it will inherit the affinity of the starting process, generally all LPs enabled when started from the desktop icon, it first divides its processes (containing over 50 threads) across the unmasked LPs in the AM and asserts its AM on the system, the jobscheduler only utilises the LPs the sim is working on, and starts all subsequent threads, network clients addon dlls gauges and so on within that affinity. Addon exe apps don't run in the affinity of the sim.

Share this post


Link to post
Share on other sites

 

What of the CPU cache memory? Part of the cache memory (L3) is divided amongst all the cores on the CPU, with the intel core CPUs it's divided amongst all the threads running on that CPU, AMDs may be different. Whether we have HT enabled or not two threads on that CPU will use the same cache. However, if we have apps making two processes per core we doubled the number of processes which will obviously have the effect of thinning out the available cache. The wiki docs suggest that since the core has two pre-compute stages it can sort of run two threads instead of one and in this way the available cache is shared between them. This can be mis-interpreted as the cache effectiveness is reduced with HT enabled, but it's not, you actually have to add more threads to the CPU to do that.

 

...all subsequent threads, network clients addon dlls gauges and so on...

I should add that network clients include addons that invoke SimConnect clients on the sim. Remember that although addon exe apps don't run in the affinity of the sim, their SimConnect clients do, and those clients are there even if we don't have another networked PC on the router, the sim uses the network locally.

Share this post


Link to post
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
Sign in to follow this