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

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. 

  • Like 1
  • Upvote 5

Asus TUF X670E-PLUS | 7800X3D | G.Skill 32GB DDR @ CL30 6000MHz | RTX 4090 Founders Edition (Undervolted) | WD SNX 850X 2TB + 4TB + 4TB

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

Asus TUF X670E-PLUS | 7800X3D | G.Skill 32GB DDR @ CL30 6000MHz | RTX 4090 Founders Edition (Undervolted) | WD SNX 850X 2TB + 4TB + 4TB

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


David Graham Google, Network+, Cisco CSE, Cisco Unity Support Specialist, A+, CCNA

 

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.

 


Intel I7 6700 4.0 CPU Western Digital Caviar 1TB SATA 6.0Gb/s Hard Drive  16GB DDR4 Crucial RAM. Corsair 750 Watt PSU.

EVGA NVIDIA GTX1080 FTW GPU

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.


Jack Cannon

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.


Asus TUF X670E-PLUS | 7800X3D | G.Skill 32GB DDR @ CL30 6000MHz | RTX 4090 Founders Edition (Undervolted) | WD SNX 850X 2TB + 4TB + 4TB

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.


Ali A.

MSFS on PC: I9-13900KS | ASUS ROG STRIX Z790 MB | 32GB DDR5/7200MHz RAM | ASUS TUF RTX4090 OCE | 1TB M.2 Samsung 990 Pro (Windows) +2TB Samsung 990 Pro for MSFS + 2TB Samsung 860 EVO SSD for DATA | EK-Nucleus AIO CR360 Lux D-RGB CPU cooler.

HP Reverb G2 VR (occasional use) | ASUS ROG Strix XG43UQ 4K monitor | Tobii Eye tracker 5 | Logitech sound system 7.1 | VIRPIL Controls (Joystick + thrust levers + rudder pedals) | Windows 11 Pro.

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

Massimo Burti

Intel Core i9-13900K ¦ 64GB DDR4-3200 - 2x 32GB - Kingston Fury Beast - black ¦ 2x 2TB - m.2 NVMe Gen4 - Samsung 980 Pro ¦ Asus ROG Strix Z690-A Gaming WiFi D4  ¦ Asus TUF RTX 3080 Gaming OC LHR - 12GB ¦ 1000W - 80+ Platinum - Seasonic Prime PX

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 ..

 


13900 8 cores @ 5.5-5.8 GHz / 8 cores @ 4.3 GHz (hyperthreading on) - Asus ROG Strix Gaming D4 - GSkill Ripjaws 2x 16 Gb 4266 mhz @ 3200 mhz / cas 13 -  Inno3D RTX4090 X3 iCHILL 24 Gb - 1x SSD M2 2800/1800 2TB - 1x SSD M2 2800/1800 1Tb - Sata 600 SSD 500 Mb - Thermaltake Level 10 GT case - EKWB Extreme 240 liquid cooling set push/pull - 2x 55’ Sony 4K tv's as front view and right view.

13600  6 cores @ 5.1 GHz / 8 cores @ 4.0 GHz (hypterthreading on) - Asus ROG Strix Gaming D - GSkill Trident 4x Gb 3200 MHz cas 15 - Asus TUF RTX 4080 16 Gb  - 1x SSD M2 2800/1800 2TB - 2x  Sata 600 SSD 500 Mb - Corsair D4000 Airflow case - NXT Krajen Z63 AIO liquide cooling - 1x 65” Sony 4K tv as left view.

FOV : 190 degrees

My flightsim vids :  https://www.youtube.com/user/fswidesim/videos?shelf_id=0&sort=dd&view=0

 

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

 

RIG#1 - 7700K 5.0g ROG X270F 3600 15-15-15 - EVGA RTX 3090 1000W PSU 1- 850G EVO SSD, 2-256G OCZ SSD, 1TB,HAF942-H100 Water W1064Pro
40" 4K Monitor 3840x2160 - AS16, ASCA, GEP3D, UTX, Toposim, ORBX Regions, TrackIR
RIG#2 - 3770K 4.7g Asus Z77 1600 7-8-7 GTX1080ti DH14 850W 2-1TB WD HDD,1tb VRap, Armor+ W10 Pro 2 - HannsG 28" Monitors
 

Share this post


Link to post
Guest
This topic is now closed to further replies.
Sign in to follow this  
  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...