Sign in to follow this  
Augustin320214

P3D affinity mask?

Recommended Posts

Hello there!

 

I have a question about affinity mask. I tested prepar3d with AM of 14 like everyone recommends with an I5 and it was buttersmooth for the whole flight. Except one thing. When I took off the textures were fine but after a few miles the textures are blurry and the autogen stops loading and it stays like this unless I pause the sim for a very long time just to have it return after a few miles... I then tried an AM of 15 and it seemed OK but I experienced some stutters here and there and the experience wasn't so smooth anymore :( I would like to know what I have to do to keep an AM of 14 but to get rid of the "blurries" problem.

 

My system isn't the best for simming (yes it's a laptop, don't tell me to get a desktop, already saving up for 1), but with an AM of 14 and the cfg wich you find below, I can achieve a solid 30FPS with ASN and the aerosoft airbus and rex soft clouds.

 

I5 4200M

 

GTX 760M

 

500GB HDD

 

Windows 8 64-bit

 

CFG:

http://pastebin.com/dmXi2met

 

Thanks in advance!

Share this post


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

A lot of unofficial and potentially troublesome mods to that .cfg. 

 

Why not try a fresh one ? You shouldn't even need an AM setting with that rig.

Share this post


Link to post

The i5-4200M is a dual core processor with hyperthreading. HT is recommended, so with HT enabled you have 4 logical processors. However, you will want the first P3D thread to use a core to itself so the recommended AM=14=(11,10) moves the second P3D thread onto the next core. With HT=Off don't use an AM.

Share this post


Link to post

I for one vote to elect someone to set the record straight.  I am now seeing an influx of people claiming that AM helps the sim.  I have yet to use it, but at the same time, I haven't found a need to.  No OOMs (yet and I pray I don't).  Part of the reason I switched from FSX to P3D was to avoid the excess tweaks in FSX but now I see folks with Bufferpools and AffinityMask being used...doesn't seem right to me, but then again, what the heck do I know.

 

Signed,

 

Confused beyond belief

(Jim)

Share this post


Link to post

We are talking about the AM, not 'tweaking'. If you have HT enabled then you need an AM with P3D and FSX. However FSX-SE manages itself on an HT enabled CPU. Notice I refer to HT enabled.

 

Have a look at more than 8% throughput lost with no AM (in the lower half image) to the main P3D thread on an HT enabled 6 core. In the upper half image the CPU has kept the companion LP7 clear to LP6 running the main thread on core 3 (core 0, LP 0 top lefts):

 

AM3392AM0.jpg

 

In the lower half LP0 (top left) runs the main P3D thread and a second P3D thread is present on LP1 (to its right). Both on core 0 sharing the total throughput capability of the core.

Share this post


Link to post

So, I'm running an i7 5930k with HT enabled... what is the recommended AM?

Share this post


Link to post

The recommendation is that the AM should help the first P3D thread to lunch on its own core. So with an i7 5930k = 6 core 12LP, an AM of 1016=(00,11,11,11,10,00) would provide an ample 4 of the 6 cores, with one of those masked (LP 2), to move the second P3D thread onto core 2 (core 0 is represented with the rightmost pair of zeros). For all 6 cores try 4094=(11,11,11,11,11,10).

Share this post


Link to post

244=(11,11,01,00) so it's providing three cores with the first available having one LP masked, it's a good AM for a 4 core HT=0n.

Share this post


Link to post

The recommendation is that the AM should help the first P3D thread to lunch on its own core. So with an i7 5930k = 6 core 12LP, an AM of 1016=(00,11,11,11,10,00) would provide an ample 4 of the 6 cores, with one of those masked (LP 2), to move the second P3D thread onto core 2 (core 0 is represented with the rightmost pair of zeros). For all 6 cores try 4094=(11,11,11,11,11,10).

 

Excellent... thanks, Steve.  I'll give that a shot tonight and see how it goes.  I really have nothing to complain about right now as P3D runs exceptionally smooth and stable on my machine.  Not sure what I might notice after modifying this cfg setting, but we'll see.

Share this post


Link to post

Not much, but every little helps!

Share this post


Link to post

Going back to the image the lower half shows the main thread sharing a core with AM=0, and the main thread with a core to itself above. Masking only reduces the number of LPs. The main and secondary threads of P3D invoke upward of 40 threads, as it utilises various resources on the system. These also work within the core affinity of the application. Those interested can check out FSX-SE as it avoids running secondary threads on the same core as the primary sim thread in an HT enabled system, yet leaves the CPU unmasked with an AM=0.

Share this post


Link to post

I have an i7-4790K with HT.  I have tried the various recommendations and came to the conclusion, that for my setup, the best solution is no Affinity Mask setting and allow P3D to manage the threads.  I do monitor with Process Explorer and get good results by excluding ASN process from core 0 but the advantage is subtle and I often forget to do it.  (FSX is a whole different story)

Share this post


Link to post

Hi,

 

also have an i7-4790K with HT=on.

 

I use AM = 253 (11111101) in P3D.cfg (just to mask the LP 1 of the first physical core - so the main thread can make full use of it)

 

Then I set the affinity mask for (almost) all other processes running in the background, to get them off the physical core 0 (they use cores 2-7). I use Process Lasso for that purpose.

 

This gives me a really fluid sim, because P3D can make full use if the first core without interruptions. The other cores are never at 100% and can serve all the other threads easily.

 

Thanks to Steve for pointing me in the right direction :smile:

Share this post


Link to post

 

 


We are talking about the AM, not 'tweaking'. If you have HT enabled then you need an AM with P3D and FSX.

Steve, as your in a giving mode could i be as cheeky and ask what mine is.   I fly P3D I have an i7-3930k 3.2 clocked up to 4, with HT on so ive got 12 running cores.  I tried working out what it was before and i think i ended up with nearly 8 thousand and something  

Share this post


Link to post

Remember that the overall setup of the sim can possibly mean that a % improvement available in the main thread throughput may not necessarily allow the sim to perform better, why the does-nothing/improves-everything arguments start.

 

I would try 1016=(00,11,11,11,10,00), how things work out finally depends on what's running before and after but everythings got a good chance to flow with an AM equating to 4 HT enabled cores with the first LP masked.

Share this post


Link to post

 

In the top half image above, although it shows around 8% up on throughput, was only 3% up on fps. However, an fps graph showed less chopping as the scenery changed, producing a shorter line overall.

Share this post


Link to post

Great Steve, thank you.  I was just looking in my Prepar3d.cfg file,  do i just pop it on the top somewhere and save,  or do i put it in a specific position in the list 

 

[JOBSCHEDULER]
AffinityMask=1016 

Share this post


Link to post

That's it, anywhere will do as long as it's not mid way into another section - make it the top slot is easy.

Share this post


Link to post

Also sometimes if P3D does not like its location the edit will be re-located in cfg file automatically 

Share this post


Link to post

The i5-4200M is a dual core processor with hyperthreading. HT is recommended, so with HT enabled you have 4 logical processors. However, you will want the first P3D thread to use a core to itself so the recommended AM=14=(11,10) moves the second P3D thread onto the next core. With HT=Off don't use an AM.

So what AM should I set now? My HT is on so...

BTW, thanks for all the replies!

Share this post


Link to post

If you have four core cpu then 84 should do it

I have dual core with hyperthreading (4 logical threads)

Share this post


Link to post

I have dual core with hyperthreading (4 logical threads)

Not much you can do other than AM=14 or AM=0.

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