Nytro

Set up AffinityMask in v4 = 60 fps all the time!

Recommended Posts

Hello guys,

maybe some of you remember I criticized v4 hard when it came out. I even removed it from my hard drive due to very bad performance. Now, after v4 Hotfix was out, I gave it another try with the same result. Then I found something about AffinityMask setting on Youtube. The guy was mention that AffinityMask gives only a HUGE advantage if you just dedicate ALL cores for rendering tasks. Without any blurred textures/terrain as usual when using AffinityMask...

So what I did was, I set up for my Ryzen 6 Core 12 Threads processor - according to this - an AffinityMask of 4095:

[JOBSCHEDULER]
Affinity Mask=4095

It gaves me a huge performance gain in almost every area 60 fps+ now with my Ryzen 1600 + GTX 1060 + 16 GB DDR4. Without OC! Almost every area because next to LAX, NYC Skyline I get only around 33 - 40 fps. Shortly after takeoff again 60 fps.

My settings: 1080p, SSAA x4, ULTRA Texture, 16x Antisop, VSync On + Triple Buff + Unlimited fps, Mesh/Terrain all maxed out, Autogen all on Very Dense/Very High, Shadows, HDR Lighting on, Water on Ultra, Cloud distance 100 mi, volumetric fog, detailed precipitation. Switched off: Dynamic lights (huge fps drop), Dynamic Reflections OFF (see nothing + huge fps drop) Some shadows such as: Internal shadows (I dont like them), Buildings, Vegetation, Objects.

Addons I use:

FTX Global + Vector, OpenLC EU, North America, ORBX FTX NorthCal + SoCal. Here and there some addon airports such as Dubai, Sydney. NYC / Miami from Dzrewicki Design.

Here Is a list and explanation about AffinityMask: I marked my recommed settings for your CPU as BOLD:

 

For 4-core 4-thread CPU (for example Core i5):

15=1111 = ALL 4 Cores

For 4-core 8-thread CPU (for example Core i7)
255=11111111 = ALL 8 cores
254=11111110 = last 7 cores
252=11111100 = last 6 cores
127=01111111 = first 7 cores
63=00111111 = first 6 cores
84=1111= all 4 cores HT on
14=1110 = last 3 cores HT off

For 6-core 12-thread CPU (Ryzen 6 Core CPUs, or Intel Core i7 5820K+)
4095=111111111111 = ALL 12 cores
4094=111111111110 = last 11 cores
4092=111111111100 = last 10 cores

For 8-core 16-thread CPU (Ryzen 8 Core CPUs 1700X, 1800X)
65535=1111111111111111 = ALL 16 cores

 

Hope you can improve your fps :)

Greets Nytro

  • Upvote 1

Share this post


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

But you're just using what amounts to default values, as P3D will use as many cores as possible on a clean config. You haven't actually changed anything. 

  • Upvote 5

Share this post


Link to post

But without that setting im back to 20 - 25 fps in LAX and max. 40 - 50 fps in other areas. CPU cores goes max to 60 - 70 %, in LAX when its lagging with 20 fps only 30 %. With AM on 4095 I have now 60 - 70 % usage in LAX and sometimes even 90 %+ when its need loading textures.

Share this post


Link to post

Then there's something wrong at your end, you've changed settings between your AF mask testing, simulation conditions aren't the same or there's something wrong with how Windows assigns the jobs to a Ryzen CPU. Because by default, P3Dv4 will use every core available and use as much power as it needs. An affinity mask won't make it be able to use each core "more". What you usually do with affinity masking is limit how many CPUs you allocate to the sim, maybe remove logical cores from the mix. That means you can free up entire cores for background applications to use or the sim's addons, to free up additional render time for the sim itself. While V4 will use a many cores as it's given, it doesn't seem to have any performance or improved rendering to show for it, so when you've got 8 cores, you can happily chop off two cores and use them for something else.

So while I may sound like a stick in the mud, which I do apologise for, your approach just defies how affinity masking works and your results are slightly questionable. So again, unless this is a Ryzen specific bug, then this won't do anything.

  • Upvote 3

Share this post


Link to post
1 minute ago, Sethos1988 said:

Then there's something wrong at your end, you've changed settings between your AF mask testing, simulation conditions aren't the same or there's something wrong with how Windows assigns the jobs to a Ryzen CPU. Because by default, P3Dv4 will use every core available and use as much power as it needs. An affinity mask won't make it be able to use each core "more". What you usually do with affinity masking is limit how many CPUs you allocate to the sim, maybe remove logical cores from the mix. That means you can free up entire cores for background applications to use or the sim's addons, to free up additional render time for the sim itself. While V4 will use a many cores as it's given, it doesn't seem to have any performance or improved rendering to show for it, so when you've got 8 cores, you can happily chop off two cores and use them for something else.

So while I may sound like a stick in the mud, which I do apologise for, your approach just defies how affinity masking works and your results are slightly questionable. So again, unless this is a Ryzen specific bug, then this won't do anything -- Sans for Ryzen users, obviously.

Agreed

Share this post


Link to post
3 hours ago, Nytro said:

Hello guys,

maybe some of you remember I criticized v4 hard when it came out. I even removed it from my hard drive due to very bad performance. Now, after v4 Hotfix was out, I gave it another try with the same result. Then I found something about AffinityMask setting on Youtube. The guy was mention that AffinityMask gives only a HUGE advantage if you just dedicate ALL cores for rendering tasks. Without any blurred textures/terrain as usual when using AffinityMask...

So what I did was, I set up for my Ryzen 6 Core 12 Threads processor - according to this - an AffinityMask of 4095:

[JOBSCHEDULER]
Affinity Mask=4095

It gaves me a huge performance gain in almost every area 60 fps+ now with my Ryzen 1600 + GTX 1060 + 16 GB DDR4. Without OC! Almost every area because next to LAX, NYC Skyline I get only around 33 - 40 fps. Shortly after takeoff again 60 fps.

My settings: 1080p, SSAA x4, ULTRA Texture, 16x Antisop, VSync On + Triple Buff + Unlimited fps, Mesh/Terrain all maxed out, Autogen all on Very Dense/Very High, Shadows, HDR Lighting on, Water on Ultra, Cloud distance 100 mi, volumetric fog, detailed precipitation. Switched off: Dynamic lights (huge fps drop), Dynamic Reflections OFF (see nothing + huge fps drop) Some shadows such as: Internal shadows (I dont like them), Buildings, Vegetation, Objects.

Addons I use:

FTX Global + Vector, OpenLC EU, North America, ORBX FTX NorthCal + SoCal. Here and there some addon airports such as Dubai, Sydney. NYC / Miami from Dzrewicki Design.

Here Is a list and explanation about AffinityMask: I marked my recommed settings for your CPU as BOLD:

 

For 4-core 4-thread CPU (for example Core i5):

15=1111 = ALL 4 Cores

For 4-core 8-thread CPU (for example Core i7)
255=11111111 = ALL 8 cores
254=11111110 = last 7 cores
252=11111100 = last 6 cores
127=01111111 = first 7 cores
63=00111111 = first 6 cores
84=1111= all 4 cores HT on
14=1110 = last 3 cores HT off

For 6-core 12-thread CPU (Ryzen 6 Core CPUs, or Intel Core i7 5820K+)
4095=111111111111 = ALL 12 cores
4094=111111111110 = last 11 cores
4092=111111111100 = last 10 cores

For 8-core 16-thread CPU (Ryzen 8 Core CPUs 1700X, 1800X)
65535=1111111111111111 = ALL 16 cores

 

Hope you can improve your fps :)

Greets Nytro

With what aircraft...Default? With what view spot mode outside the cockpit. If you can get that sitting in the VC of any PMDG aircraft at FlyTampa EHAM I may be game.

 

Share this post


Link to post
1 hour ago, Sethos1988 said:

Then there's something wrong at your end, you've changed settings between your AF mask testing, simulation conditions aren't the same or there's something wrong with how Windows assigns the jobs to a Ryzen CPU. Because by default, P3Dv4 will use every core available and use as much power as it needs. An affinity mask won't make it be able to use each core "more". What you usually do with affinity masking is limit how many CPUs you allocate to the sim, maybe remove logical cores from the mix. That means you can free up entire cores for background applications to use or the sim's addons, to free up additional render time for the sim itself. While V4 will use a many cores as it's given, it doesn't seem to have any performance or improved rendering to show for it, so when you've got 8 cores, you can happily chop off two cores and use them for something else.

So while I may sound like a stick in the mud, which I do apologise for, your approach just defies how affinity masking works and your results are slightly questionable. So again, unless this is a Ryzen specific bug, then this won't do anything.

I didn't try any tweak yet, but I can guarantee that P3D v4 does not use all my resources, my GPU stays around ~40% while my CPU ~50% and the first core is the most used.
btw I have an i7 7700k @ 5ghz

  • Upvote 1

Share this post


Link to post

Just tried this at Uk2000 EGLL in the PMDG 747, didn't work for me.

Share this post


Link to post

I dont have PMDG 747. I never fly with VC since I cannot see every button and always have to adjust camera viewing angles. Then you have to spin your head to read things, very annoying. Can only imagine flying with 3D Cockpit with VR glasses, but on a display, no way...

I do have an A320 2D panel which is bugged. There I got only 20 fps in LAX, but CPU is on 80 % then.

And yes this is what I understand too, P3D uses all cores, but the first core always 100 %. But it holds back power for "unknown task to come" as a LM dev mentioned few month ago. So with that setting you force P3D to split up all rendering task on all cores to the max without reserve power. For my understanding...

And sure it could be on Ryzen only, people have to test it if they have similar problems with low CPU usage and low FPS at the same time...

Share this post


Link to post
29 minutes ago, Berike said:

I didn't try any tweak yet, but I can guarantee that P3D v4 does not use all my resources, my GPU stays around ~40% while my CPU ~50% and the first core is the most used.
btw I have an i7 7700k @ 5ghz

Don't recall saying P3D uses all your resources, that would be quite a bogged down machine if it did. It'll use up as many cores that are available and use up as much of its power as it 'needs'. Not sure why you'd want your GPU sitting at 100%, that has little to do with your overall framerate or rendering smoothness of terrain / autogen. If you want it to use my GPU power, just pile on GPU specific settings. 

And you also need to understand how rendering works if you think your CPU will be sitting at 90%+ usage all the time. That, again, has nothing to do with affinity mask settings. First core is responsible for all the rendering / calculation of the simulation, planes, their systems, physics. That will often spike or run high, depending on your framerate target too. It does NOT multi-thread, not even on a logical core. You cannot affinity mask yourself out of that, nor tweak a .cfg, that just comes down to how the ESP engine works.

Every other core is used to prepare and render terrain. Also believe autogen to some extend, though I am not sure. So all your other cores will only work when there's secondary render tasks to complete, so they may see 0% use, they might spike to 100% over cities or complex terrain, or when travelling fast. 

So looking at an arbitrary number like overall usage is absolutely pointless. This is how the engine works, this is why people always talk about poor multi-threading capabilities, because your framerate is directly linked to what the capabilities and speed of your primary rendering core is.

Again, has nothing to do with affinity masking.

Share this post


Link to post

With no AM,

613e4e3b1e52ea8.png

With AM on,

67df7585011a393.png

Noticed that load was shifted from CPU 0 to CPU 2, and the rest are doing very little.

I7 4770 HT on.

Share this post


Link to post

AM war is back !!!

This is the P3D forum I use to know when I first started with LM P3D v3.0

Great,  I missed it so  much 😂

Clear skies,

  • Upvote 2

Share this post


Link to post

My 6 core 5820 runs best at AM = 340 in V3 and AM = 980 in V4.

That is because I have all kind of addons running too.

In V3 I tested with AM = 4095 . It seemed a little smoother when the system was not taxed very much , but caused some stutters in heavy scenery + rain. AM = 340  handled that better ..

 

Share this post


Link to post

Looking forward to SteveW's take on all of this.

  • Upvote 1

Share this post


Link to post

I have NOT checked in V4 but I noticed that in V3, my system worked better with AM=15 added to the cfg file. I *KNOW* it's the default but it made a difference in V3. CUrrently I'm running default in V4 and it's running just fine so I don't mess with it.

 

Vic

  • Upvote 1

Share this post


Link to post

Shouldn't it be AffinityMask=XX, not Affinity Mask=XX

Share this post


Link to post
2 hours ago, GSalden said:

My 6 core 5820 runs best at AM = 340 in V3 and AM = 980 in V4.

That is because I have all kind of addons running too.

In V3 I tested with AM = 4095 . It seemed a little smoother when the system was not taxed very much , but caused some stutters in heavy scenery + rain. AM = 340  handled that better ..

 

In V4 all surrounding scenery is blurry at any affinity mask. I have an old 6-core i7 overclocked at 4ghz and HT on.

Share this post


Link to post

I tried AM and my FPS dropped to 7-9 at KATL in the 717 as a stress test.  I get 15-20 with HT on and no AM. 

Share this post


Link to post

Far be it for me to dampen anyone's enthusiasm,  but on the thread I linked here, AM is being discussed by people who understand how it works.   :)

Share this post


Link to post

The confusion is because of the same reasons before when Hyperthreaded CPU"s came about . AMD is different than Intel and the mechanism LM used for affinity mask isn't working the same with Ryzen CPU's somehow, so he's basically having to manually tell it to use all cores.

  • Upvote 1

Share this post


Link to post

I figured out another fps performance trick by accident. You can fly with dynamic lights, but only switch landing lights or taxi lights on. If you use all lights strobes etc. huge fps impact! But if you switch only ONE taxi/Landing light on fps impact is only 10 % instead of 60 % :D

As well dynamic lights cost no performance when all lights are switched off :D Since this is a sim and not real live i will now fly completely dark and will only turn on one light for landing. Difference is huge. With standard lights you see nothing like always, with dynamic lights everything looks very nice. In some cockpits cockpit lights costs as well nothing tho...

Share this post


Link to post
On 11/7/2017 at 4:22 PM, Nytro said:

I figured out another fps performance trick by accident. You can fly with dynamic lights, but only switch landing lights or taxi lights on. If you use all lights strobes etc. huge fps impact! But if you switch only ONE taxi/Landing light on fps impact is only 10 % instead of 60 % :D

As well dynamic lights cost no performance when all lights are switched off :D Since this is a sim and not real live i will now fly completely dark and will only turn on one light for landing. Difference is huge. With standard lights you see nothing like always, with dynamic lights everything looks very nice. In some cockpits cockpit lights costs as well nothing tho...

Agree , tried some light Combos as well .

The NGX taxi light that moves with your rudder/tiller is nice (like in the Dash8-Q400)

I still have some weird freezes/stutter/fps drops sometimes which is a ###### on approach or on takeoff. (GPU´s at about 50-60%)

Maybe my SLI also helps to these problems , who knows.

Mir/Flightbeam also explains why Dynamic lights is more demanding in HD textures vs low quality textures. 

 

Thanks

Michael Moe

Share this post


Link to post

All of this 'tweaking things' reminds me of Graphic Equalisers that were so prevalent in Hi-Fi stacks back in the 70's

I could never understand why people bothered with them  ....

Bands and singers spend thousand and thousands of pounds/dollars on sound engineers trying to get the perfect sound on their records only for them to be tweaked and altered by so called audiophiles

This is 'sort of' similar

 

Paul

Share this post


Link to post

I really don't get this obsession with 60FPS and AM

Share this post


Link to post
3 hours ago, Paul_ said:

All of this 'tweaking things' reminds me of Graphic Equalisers that were so prevalent in Hi-Fi stacks back in the 70's

I could never understand why people bothered with them  ....

Bands and singers spend thousand and thousands of pounds/dollars on sound engineers trying to get the perfect sound on their records only for them to be tweaked and altered by so called audiophiles

This is 'sort of' similar

 

Paul

This is very true, though inevitably the sound system being used to playback the recording in a home scenario is sub-standard compared to the original high-end equipment used in the studio, and the room has crap dynamics etc, so in this case an equaliser can go some way to alleviating too much bass, not enough top end etc. And i guess P3D is no different in that there is a huge difference in systems being used and all can probably be tweaked in some way to make the a little better.

The thing to remember is that there is no magic bullet. You don't get silly FPS increases and you don't get to push your sliders up any more than you could before, but you may end up with a smoother overall experience.

  • Upvote 1

Share this post


Link to post
Guest
This topic is now closed to further replies.