Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

AffinityMask - Why?

Featured Replies

If you're familiar with powershell (the scripting language included with windows since Win7) you can use

 

Get-Process app | Select-Object ProcessorAffinity

 

Where 'app' is the name of the application you're interested in as it appears in task manager. For example use 

 

Get-Process prepar3d | Select-Object ProcessorAffinity

 

to see the affinity mask of prepar3d.

 

You can set the affinity mask too but in the case of prepar3d it's better done in the config file.

 

  • Replies 73
  • Views 27.4k
  • Created
  • Last Reply
  • Commercial Member
16 minutes ago, boez said:

If you're familiar with powershell (the scripting language included with windows since Win7) you can use

 

Get-Process app | Select-Object ProcessorAffinity

 

Where 'app' is the name of the application you're interested in as it appears in task manager. For example use 

 

Get-Process prepar3d | Select-Object ProcessorAffinity

 

to see the affinity mask of prepar3d.

 

You can set the affinity mask too but in the case of prepar3d it's better done in the config file.

 

works well! good post.

Steve Waite: Engineer at codelegend.com

  • 3 weeks later...
On 19/06/2017 at 8:38 PM, mikeymike said:

116 has been working great with ht on

I7 4790k

...with Process Lasso.

13600KF - AIO - 32GB DDR4 - RTX4070 - UW1440p GSync - USB DAC - 2TB NVMe - Windows 11 Pro - Gladiator NXT EVO - 1 Gbps Fiber  - MSFS 2024

  • Commercial Member

For me, i7 7700k with HT on, 245 seems to work the best.  But what is odd to me, locking FPS in P3D seems to peg my core 0 at 100% regardless of settings.  Setting them to unlimited and locking FPS via nVidia Inspector lessens the load, gives me nice FPS but consistent stutters.

 

Without any AM, my core 0 also seems to peg at 100% and temperatures are rather warm (definitely with an audible ramp up in my fans).

Kyle Weber (Private Pilot, ASEL; Flight Test Engineer)
Check out my repaints and downloads, all right here on AVSIM

  • Commercial Member

When we see the main process taking the LP to 100% in the Task Manager performance graphs, this is because the sim is making the next frame as soon as it finishes the last.

That may be because:

We are setting Unlimited with no VSync. P3D VSync is used to determine the monitor refresh frequency and in effect acts as a frame rate limiter at the monitor frequency. If we have a 60Hz monitor the sim needs to produce more than 60fps when set to unlimited VSync=Off, then when we enable VSync=On it relaxes to ~60fps. If the sim is set so that it cannot achieve >60fps, VSync does nothing.

Or we are setting a locked fps on the slider. VSync and Triple buffer are ignored, the GPU produces look ahead frames, there is a time-lag between control input and sim equal to the buffer period, usually three frames. However each frame is built with an accurate time between frames for accuracy of the sim physics, the location of terrain with respect to aircraft and so on. If the sim cannot maintain a very high fps then this buffer is depleted and never replenished after any drop in fps.

 

When we set VSync=On and the sim is set-up to produce a higher fps than the monitor frequency we can see the LP zero use drops below 100%.

 

The Triple buffer setting with VSync/Unlimited is interesting because it introduces a more strict time between frames for accuracy and introduces lag similar to locking fps on the slider.

 

Steve Waite: Engineer at codelegend.com

Thanks, Steve - but a question.  Given all that, is there a best VSync settings that balances smoothness and accurate physics?  Or is it system-dependent?


Alan Ampolsk

"Ah, Paula, they are firing at me!"
-- Saint-Exupery

  • Commercial Member

With Unlimited alone the sim makes the next frame in accordance with average time between frames. Technically the next frame is computed for a given time ahead and may not be shown at that actual time. Locked fps and vsync/triple buffer use consistent time between frames, but it's only going to work if that fps can be maintained.

Steve Waite: Engineer at codelegend.com

OK, got it.  So in theory, either locked FPS or vsync/triple buffer should be smoother than unlimited/no vsync/no triple buffer, IF (big if) frames don't fall below the target level.

Will keep an eye on that during the next round of experiments.

Many thanks for all the P3D4 research you're sharing.


Alan Ampolsk

"Ah, Paula, they are firing at me!"
-- Saint-Exupery

Hi,

Some of you may have noticed some recent changes in my sig in relation to my preferred setting for HT. In P3Dv3.4 I have been enjoying an i7-5960X with HT=OFF and an idiosyncratic Affinity Mask setting of 21760 which, for whatever reason, 'randomised' the core allocation for the main P3D thread. This seemed to work well and produced very fluid performance in the majority of situations.

More recently, with the installation of P3Dv4, I have revisited this configuration and discovered that in fact P3Dv4 prefers a different setup:

HT=ON

TEXTURE_SIZE_EXP=9

UPPER_FRAME_LIMIT=31

Affinity Mask=21845 (01,01,01,01,01,01,01,01)

(Testing at KVPS in IRIS Raptor)

This delivers performance very close to that previously observed in Prepar3Dv3 (see above) and the activity of LPs 4,6,8,10,12,14 are rarely seen to rise above 75-80%, often lower. Maximum Temp recorded during an hour long session (Core Temp) was 68C. Temps mostly fell between 40-66C. No blurries.

Affinity Mask=5460 (00,01,01,01,01,01,01,00)

LPs 6,8,10,12 frequently maxed out with frequent appearance of blurries close to a/c. Performance generally smooth although occasional micro stutters noted.

So, there's seems to be little doubt that the sim benefits from the availability of the additional 2 LPs. Indeed, my impression is that texture loading is as efficient as seen without an Affinity Mask.

Mike

Edit: Does anyone else see hesitations during the initial take off run and for a short period thereafter in flight at KVPS? I find this can be mostly eliminated by slewing forward and backwards along the length of the runway a couple of times before the take off run. Same behaviour noted in Prepar3D v3.4. There is also a 4 second pause while approaching KHRT on heading 275. Slightly annoying.

 

  • Commercial Member
On ‎15‎/‎07‎/‎2017 at 11:01 PM, Cruachan said:

Affinity Mask=5460 (00,01,01,01,01,01,01,00)

LPs 6,8,10,12 frequently maxed out

 

That's absolutely correct Mike, a very good post. Looking back at v3 we can simplify and say we need to split out over at least four LPs to bring the rendering section to its leanest and we protect the cores of the first two jobs and with the rest - the more the merrier. With v4 similarly we split it out over at least six LPs and protect the cores running the first three jobs. This corresponds to your LPs 6, 8, 10 and 12 maxing out as they gather data, the first three unaffected.

 

On ‎15‎/‎07‎/‎2017 at 11:01 PM, Cruachan said:

my impression is that texture loading is as efficient as seen without an Affinity Mask

 

I would be more careful and say that we can use both LPs per core after the first three jobs: For example the pattern 11,11,11,01,01,01 (on six cores would be AM=4053). Again for example on the eight core CPU we can place the pattern where we like: 16212 = 00,11,11,11,01,01,01,00 which draws on the benefit you noticed in your 'No AM' texture loading in those cores that can use both LPs per core without disturbing those valuable first three jobs and leaving them to the leanest rendering having the core to themselves.

The four core users finding that 245=11,11,01,01 which at least provides the six LPs but only leaves the first two jobs a core to themselves, suggesting that six cores is the new four here.

Steve Waite: Engineer at codelegend.com

  • Commercial Member

...and Mike, I just realise re-reading you are saying LP6 maxing out during loading and so job three appears combined with loading and texture tasks. This is counter to my description as I said the first three and is an interesting situation, you can check that with certain numbers of LPs that frees up as well leaving loading to other cores. Experimentation beckons...

:biggrin:

Steve Waite: Engineer at codelegend.com

I've tried pretty much every AM/HT on/off and have found it different (from the Latin meaning it ain't the same) for some reason compared to v3; why that is so I really don't know. 4770k/32gb/SSDs/4.4OC/TitanBlack 6gb is my gear.

Running photo scenery exclusively with no autogen, loading efficiency (blurries) is at the top of my list. I've come across an unlikely combination that seems to be working pretty well given my flying style and setup.

I'm running no HT, standard 4 cores. I've masked UTLive and ASNv4 to cores 2 and 3. ChasePlane is self selecting at this time. I've set FFTF to 0.60, LOD to Ultra along with high res textures checked. Locked at 30fps. 

I've done two tests, KLAS > KSFO and KLAX > KSFO. Crystal clear way out and no stutters, very smooth. PS is MegaScenery Nevada and CA is Ultimate VFR. I have tomorrow off and am going to run KSEA > KSFO along with a few others to be sure my eyes aren't deceiving me :biggrin:

Cheers,

Mark

  • Commercial Member

If you are using HT off Mark I would suggests there's something you didn't manage to tie down properly when testing with HT enabled. The problem with four cores is that we can't split out the second and third jobs onto separate cores, that takes five cores of six minimum. With only four cores 245=11,11,01,01 should be good, and 253=11,11,11,01 improves loading for a minor expense of rendering performance.

 

Coming back to Mike's comment, Mike I've mentioned in another discussion that the pattern equivalents to AM=3028=10,11,11,01,01,00 over six cores, (HT on obviously) although only five used for the sim, is the minimum requirement that ekes out the three main rendering jobs so that they are placed on cores of their own, and also doubling LP use with the loading stage using four cores for great performance on five cores. The order of rendering tasks is not necessarily in order of importance, the first and last LPs of 3028 have the heaviest rendering tasks. 

Steve Waite: Engineer at codelegend.com

Hi Steve, been trying to follow this thread looking for the never ending perfect solution. Am I understanding correctly that for my i7 5930k with hyperthreading on you feel the best affinity mask may be AF=3028?  Then offload all other apps to the last two cores?  Or have I gotten lost?

 

thabks Jason

Archived

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.