Lewis Steeper

AffinityMask

Recommended Posts

Hi there,

Ive tried using the Gatwick Sim tool but it only supports 8 cores.

Does anyone know how to work out / provide me with a affinity mark for 18 core / 36 thread CPU? 

 

Thanks in advance,

 

Lew

Share this post


Link to post
Help AVSIM continue to serve you!
Please donate today!

Lew, it's actually pretty easy to figure out for youself, as it follows a standard decimal coded binary scheme.

That said, you can also Google for a Binary to Decimal Converter and a Decimal to Binary Converter. Just use 1's for core on and 0 for core off, and remember that it works LEFT TO RIGHT, not RIGHT TO LEFT.

Hope this helps.

 

Share this post


Link to post

Here's an Affinity Mask calculator that can be downloaded and saved.  Doesn't require installation (portable), can be set to any number of cores, and can be set to calculate AM with HT on or off.  Read the entire first post in the forum thread... the Media Fire download requires a password (must be super secret stuff :biggrin:).

https://www.sas1946.com/main/index.php?topic=32520.0

Super easy to use!

HTH,

Greg

Share this post


Link to post

Is a entry for AM useful in P3Dv4?

If I recall, it was needed in FSX.

Share this post


Link to post

Affinity Mask works in all Windows programs which are written to take advantage of multiple cores, so technically the answer is yes.

That said, only the user would know if Affinity Mask is beneficial with any ESP derivative as (particularly with P3DV4) it's use is based on what other software is running and what the person wants to accomplish by assigning specific cores to specific software.

I run at least 7 other programs while running P3DV4 under an i7-4770K running at 4.3GHz with a GTX 1080 and I have yet to find any benefit to manually assigning cores, but again it depends on what software someone is using and generally speaking someone's system specs.

I found using Affinity Mask was not beneficial under FSX:SE as well, though it made a difference with FSX:MS.  The reason is that DTG found and eliminated some dual thread processing of autogen, and this made processing more streamlined.

Best wishes.

 

 

  • Upvote 3

Share this post


Link to post
15 hours ago, DaveCT2003 said:

and remember that it works LEFT TO RIGHT, not RIGHT TO LEFT.

Dave, I have to ask what you mean by this?  for example in a 4 core machine with HT on (8 LPs) 254 = 11 11 11 10 so the RIGHT most bit (LSB) is LP0 and the rest go RIGHT to LEFT.  I know I am missing what you mean, your advice is always a must read.

Share this post


Link to post
42 minutes ago, bbuckley said:

Dave, I have to ask what you mean by this?  for example in a 4 core machine with HT on (8 LPs) 254 = 11 11 11 10 so the RIGHT most bit (LSB) is LP0 and the rest go RIGHT to LEFT.  I know I am missing what you mean, your advice is always a must read.

 

Hello my friend,

Here is a terrific thread that explains what I mean. We may be saying the same thing (forgive me for not taking too much time at the moment, I'm neck deep in testing).

 

 

 

Share this post


Link to post

AffinityMask is not needed at all and especially with P3D and Windows 10.  All of your cores are operating at 100% in Windows 10 when P3D is running.  It use to be just one core was at 100% and the other cores were at 0.  Microsoft fixed.  To verify, click on the Windows key + R, type resmon, start up P3D, in resmon, click on CPU tab and make sure the P3D box is enabled so you will know it is just monitoring P3D.  Look to the right and you will see that every core is being used 100%.  In Resource Monitor, it will also show what each core is doing.  Cool stuff...

EDIT:  It even works for FSX.

Share this post


Link to post
15 minutes ago, Jim Young said:

AffinityMask is not needed at all and especially with P3D and Windows 10.  All of your cores are operating at 100% in Windows 10 when P3D is running.

This is not accurate, at all!  Dave said it best above:

...only the user would know if Affinity Mask is beneficial with any ESP derivative as (particularly with P3DV4) it's use is based on what other software is running and what the person wants to accomplish by assigning specific cores to specific software.

Greg

 

Share this post


Link to post

My very good friend Jim's technical advice and expertise is top notch, so I must have misunderstood what he means.  I'm currently running P3DV4 in testing, and you can see below that several cores are under utilized (not at 100%).

I'll say again that I don't USUALLY use AF with P3DV4, however there are circumstances where it would be beneficial to use for P3D and other programs as well. I usually set this via a BAT file which loads with the software, however Process Laso is also another good means.

BssARcg.png

  • Upvote 1

Share this post


Link to post
3 hours ago, lownslo said:

This is not accurate, at all!  Dave said it best above:

...only the user would know if Affinity Mask is beneficial with any ESP derivative as (particularly with P3DV4) it's use is based on what other software is running and what the person wants to accomplish by assigning specific cores to specific software.

Greg

 

I would also agree with that statement - if you do not know what you want to accomplish, you may as well leave out any AffinityMask, since you are likely to make it worse, not better..

Having said that, I find that I get a smoother ride when I move P3D off the first core and give it it's very own place to run.. Windows will always run other housekeeping processes in the background which can interfere with smooth operation.  On the other hand, for every core that you set aside, you are taking away CPU power from the pool that Windows assigns work to..  :happy:

Share this post


Link to post
1 hour ago, Bert Pieke said:

I would also agree with that statement - if you do not know what you want to accomplish, you may as well leave out any AffinityMask, since you are likely to make it worse, not better..

Having said that, I find that I get a smoother ride when I move P3D off the first core and give it it's very own place to run.. Windows will always run other housekeeping processes in the background which can interfere with smooth operation.  On the other hand, for every core that you set aside, you are taking away CPU power from the pool that Windows assigns work to..  :happy:

Why move it off of the first core?  Before all cores were being used with Windows 10, we had to use the AF tweak to get it to use some of our other cores.  Now it is using all of the cores (the person who has the most cores wins) and some cores are more active than others indicating some cores are processing Windows chores, P3D is using other cores but the main point is that all cores are being used and that's what the AF tweak was set up to do.  I have seen so many crashes while using this tweak in the past and many members are confused, very confused.  I like the fact all cores are being used now.  Moving P3D off the first core is probably just a waste of time as the benefits, if any, will be minimal.  I think we need to get away from members risking the chance of putting in the wrong parameters for AF and subsequently crashing occasionally and move on to the future.

Best regards,

Jim

Share this post


Link to post

I agree with Jim and also SteveW

Dont use a AM on 4 cores with or without HT.

Boot off ASv4, ProATC and anything else you run with the sim OFF 0 and 1

 

  • Upvote 1

Share this post


Link to post
45 minutes ago, Jim Young said:

 I think we need to get away from members risking the chance of putting in the wrong parameters for AF and subsequently crashing occasionally and move on to the future.

Best regards,

Jim

Jim, my starting line was:

"if you do not know what you want to accomplish, you may as well leave out any AffinityMask, since you are likely to make it worse, not better.."

So, on that, we agree :cool:

BTW,  I run Windows 7..

Share this post


Link to post
28 minutes ago, Jim Young said:

Moving P3D off the first core is probably just a waste of time as the benefits, if any, will be minimal.

Perhaps on your simmimg computer, but not on mine.  Mine is smoothest when the first process of P3Dv4 is assigned it's own LP, and the LP after it is not assigned.

An Affinity Mask is not a solution, it is a tool that can be used to create a solution to the problem of processes crashing into each other.  It does so by assigning specific applications to specific LP's.  To say the sim doesn't need an AM or that moving it off the first core is just a waste of time forgets the fact that each of our systems is different (system=hardware + all software), and indeed that each of our sims is different, and finally that we each have different goals/reasons for simming.  Not every aspect of the computers we each use is one size fits all.

Greg

  • Upvote 1

Share this post


Link to post
3 hours ago, Bert Pieke said:

So, on that, we agree :cool:

BTW,  I run Windows 7..

Appreciate your comments Bert.  As you know I respect your expertise and your help on the AVSIM FSX Configuration Guide.  I just cringe when members do a tweak like the Affinity Mask and think it is the holy grail of flight simulation (know you do not).  Didn't realize you were still on Windows 7 and understand more fully your comments.  I like Windows 7 too but upgraded my MB and CPU this year and they make you install Windows 10 as Win 7 is not compatible with the new stuff.  I thought I would hate Windows 10 but like it more and more.  I remember jumping to Windows 7 when it first came out and skipped Windows 8 and 10 for several years.  Windows 7 is like what Windows XP Pro was in its day.  Thanks again for your comments!

Best regards,

Jim

Share this post


Link to post
8 hours ago, Bert Pieke said:

Having said that, I find that I get a smoother ride when I move P3D off the first core and give it it's very own place to run.. Windows will always run other housekeeping processes in the background which can interfere with smooth operation.  On the other hand, for every core that you set aside, you are taking away CPU power from the pool that Windows assigns work to..  :happy:

Hi Bert,,

With that, are you saying you're running your P3D with Affinity Mask=254, i.e. blocking out the 1st core.

thx,

Mike

Share this post


Link to post
1 hour ago, orbmis said:

Hi Bert,,

With that, are you saying you're running your P3D with Affinity Mask=254, i.e. blocking out the 1st core.

thx,

Mike

I actually use 244=11 11 01 00,  but as we have established in this thread, that may not necessarily be the best setting for you.

You can try it if you want, and always go back to whatever you like better :happy:

Share this post


Link to post

I wanted to ask you for advice in setting the ‘affinity mask’ since i’m installing P3D4. As a processor i have an i7-8700K, what value should I put?

Thanks

Gianmarco Ragazzoni 

Share this post


Link to post
9 hours ago, gianmarcoragazzoni said:

I wanted to ask you for advice in setting the ‘affinity mask’ since i’m installing P3D4. As a processor i have an i7-8700K, what value should I put?

Thanks

Gianmarco Ragazzoni 

Suggest you read the above posts carefully... based on the way you worded your question, I would recommend not setting an affinity mask.

Share this post


Link to post

I recently switched to using hyperthreading on my 4790K and found out that using affinity mask to move P3D threads off the first core basically kills autogen loading performance in a scenario of view switches to live trafic injected with PSXSeekonTraffic and back to cockpit.

Share this post


Link to post
On 2017-12-17 at 3:56 PM, Nyxx said:

I agree with Jim and also SteveW

Dont use a AM on 4 cores with or without HT.

Boot off ASv4, ProATC and anything else you run with the sim OFF 0 and 1

 

Hi,

so the correct way would be to not boot P3d off 0 and 1???

that is what I have done 

and moved asp4 ezdok gsx etc

on 0 And 1

is that wrong?

thanks

mike

Share this post


Link to post

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