Jump to content
Sign in to follow this  
AviatorMoser

A Frame-Time Analysis of P3D v3 -- Effects of CPU Affinity, Frame Lock, and HT

Recommended Posts

You are simply demonstrating that your various AMs are working correctly. With 116=01,11,01,00 your first two LPs show little activity (the pair of zeros on the right is the first two LPs), and your LP 2 has the main sim job. With your 253 example the main sim job is on LP 0 and nothing on LP 1, perfect. With 116 you can leave be your addons to find their way onto core zero, but restricts the sim to three cores, it's a magic number because the second and third sim jobs on the third core don't generally call for maximum throughput at the same time, seen on your graphs.

 

In your example with AM=253=11,11,11,01, you can clearly see that the missing activity is on LP1. Remember that LP1 is on core zero, LP 0 & LP 1 are the same core. Looking at the lower right pair of LPs or graphs, LPs 6 & 7, these are both looking like 80+%, but in fact are each consuming only half that in reality since they share the same core.

 

116 will have the good rendering performance and good load time, this also allows core zero to be utilised by addons that call for maximum throughout at times the sim is running. 85 spreads the sim onto four cores and just about produces the best rendering performance, as long as addons are kept off of core zero. Finally 253 produces good rendering performance and also can reduce the load time with most scenery and systems by increasing the thread count gathering data, again keeping addons off of core zero.


Steve Waite: Engineer at codelegend.com

Share this post


Link to post

And here's with Affinity Mask set to 116... If you look at my graph, it looks like the set of CPU on the far right are getting used the least. So does that mean I should change the affinity mask so that it will move those last 2 cores on the right to the left instead? Basically swap them around so that core 0 is using the least amount of processing power.

 

No.

As Steve says, those graphs show it working as it should.

 

But in the end there is no iron clad guarantee that any particular AM is going to work for you.

Just go fly with a few AM examples and see what happens.

 

gb.


YSSY. Win 10, 6700K@4.8, Corsair H115i Cooler, RTX 4070Ti, 32GB G.Skill Trident Z F4-3200, Samsung 960 EVO M.2 256GB, ASUS Maximus VIII Ranger, Corsair HX850i 850W, Thermaltake Core X31 Case, Samsung 4K 65" TV.

Share this post


Link to post

But in the end there is no iron clad guarantee that any particular AM is going to work for you.

Just go fly with a few AM examples and see what happens.

 

I'm afraid I have to agree. Believe you me I've tried numerous permutations using the HT=ON scenario which, logically, should and, indeed, did work, yet all produced intermittent micro-stuttering to a greater or lesser degree. I'd reached the point of reluctantly accepting a compromise when, and quite by accident, I stumbled on the solution which continues to deliver that silky smooth fluid sensation of flight >90% of the time. This applies to a wide variety of situations on my rig providing I can keep frame rates higher than 30:

 

System specs - see signature

HT=OFF

AM=21760

 

This flies in the face of everything said in these forums and the enormous efforts Steve, in particular, has made to educate us. We owe him a huge debt of thanks. In my case, it has helped me enormously to understand what's been happening during lengthy (obsessive?) periods of testing. Steve, I apologise for bringing this up again, but felt I should mention it as, like it or not, my finding does appear to underline the fact that there is never likely to be a single answer that fits everyone's setup.

 

The strange thing about applying an AM of 21760 on my 8-Cored CPU is each time the sim is started the selection of Core for the main P3D thread is randomised and all remaining cores are active but never maxed out. As a consequence core temps rarely rise above 50C. In addition, my two 980ti's in SLI never exceed 80-90% usage and temps remain around 68-70C under maximum load. All is good

One would think that running Addons concurrently with P3D using this setup would eventually inevitably lead to conflict of core assignment when a particular session is started. So far, this has not happened, or at least I am not yet aware of any significant degradation in fluidity of performance when, for example, Active Sky 2016 is updating on the fly. Admittedly I don't use many Addons routinely and these would include EZCA, Traffic Manager and FSUIPC. Also my installation is heavily loaded with ORBX related stuff and a good selection of third party quality aircraft.

 

For sure it's a strange one, but for some reason it works!

 

Mike

Share this post


Link to post

I said earlier the AMs cannot increase performance, only optimise the system. Leaving an 8 core with HT off can soak up anything you throw at it. The jobscheduler has seven other cores to use and great probability to avoid the main sim job that way. Whereas with HT enabled the jobscheduler can place other processes on the unoccupied LP of the main sim job core, and other processes can make double the jobs they need to make. Even so this account of Mikes setup doesn't seem to be related to any of that, I think something else in in the mix since I've been unable to recreate similar behaviour. It'll bubble to the surface eventually, but it's a shame to leave HT disabled, my six core performance is hit fairly hard with no HT. Getting more kit soon.

 

Mike I'll wager that setting HT off merely fixes an issue arising with HT on. Given the enormous performance of 8 straight cores it's always going to perform well, it's just that it's possible you've not seen the unhindered potential of the HT mode.


Steve Waite: Engineer at codelegend.com

Share this post


Link to post

I noticed that Flight1's GTN 750/650 ini file has an entry for Core= so I guess we can specify what core it will run on. I'm still confused as to what Core/LP my apps such as PFPX, ASN, EFB should run on. Can someone give me a definite answer? 

 

Only assigning core 1 works for me.

 

Regards

jja


Jim Allen
support@skypilot.biz
SkyPilot Software home of FSXAssist / P3DAssist

LionheartVictoryBanner02s-369x97.png

Share this post


Link to post

Mike I'll wager that setting HT off merely fixes an issue arising with HT on. Given the enormous performance of 8 straight cores it's always going to perform well, it's just that it's possible you've not seen the unhindered potential of the HT mode.

 

Hi Steve,

 

No argument there. In addition to P3D I have several graphically intensive games installed and they all perform flawlessly (fortunately) with or without HT active. On my i7-5960X P3D appears to be the only application that requires HT=OFF for consistently smooth performance with no frame rate limiting or GSync. As you know, my testing confirmed that AM=21760 was, without doubt, the optimum value while HT=ON and yet I have demonstrated objectively that it still has an unexpected but positive influence on the behaviour of the job scheduler delivering impressive performance with fewer long frames when HT=OFF.

 

The only other member I know who uses the same CPU is Rob and he has been unable to replicate my observations. So, it may have something to do with our respective setups and the external hardware employed during testing.

 

It's certainly an intriguing finding while, sadly, being of little use to others who are still seeking best performance. I'm just thankful I stumbled on something which, for me, appears to have resolved such irksome issues.

 

Regards,

Mike

Share this post


Link to post

I think most stories of "AM changed my sim performance" is more likely to be down to a result of fractional alterations to the sim causes changes to the GPU/Monitor relationship which shows up very well visually with desktop windows. Another theory is that too much autogen or LOD radius or shadows can be putting certain functions of the sim up against an end-stop or close to it. Fractional changes to throughput could be playing with that outcome.


Steve Waite: Engineer at codelegend.com

Share this post


Link to post

So I guess the only benefit of having an Affinity Mask setting at all is for users who want to run apps alongside their sim for better performance optimizations?

 

Else if you're just going to be running FSX or P3D without multitasking then its best to not use any affinity mask setting and let it use all your cores, right?


ASUS ROG Maximus Hero XII ▪︎ Intel i9-10900K ▪︎ NVIDIA RTX 3090 FE ▪︎ 64GB Corsair Vengeance RGB Pro ▪︎ Windows 10 Pro (21H1) ▪︎ Samsung 970 EVO Pro 1TB NVME SSD (OS Drive) ▪︎ Samsung 860 EVO 2TB SATA SSD ▪︎ Seagate 4TB SATA HDD ▪︎ Corsair RMx 850W PSU

Share this post


Link to post

Nope.

 

If you have four cores that's about optimum for the sim. So if you have a four core CPU no HT then no AM is great, but you still need to manage your addons exes to run above core zero.

 

If you enable HT you still have four cores but now you got 8 LPs that *will need* an AM to keep the sim on four LPs, or whatever you want, with no AM the sim four main jobs will occupy only the first two cores.

 

If you have more than four cores you need an AM, unless you have six cores no HT and want to run six cores for the sim then no AM again is great, enable HT and again it's going to need an AM to separate out the jobs across cores.


Steve Waite: Engineer at codelegend.com

Share this post


Link to post

Hi Aaron,

 

You will note I stated in post #501 that "AM=21760 was, without doubt, the optimum value while HT=ON". This was proved objectively during testing using features provided by Steve's excellent IdealFlight 10 software which makes the gathering of the required data so straightforward and free of hassle.

 

AM=21760 = 0101010100000000 (remember, my CPU is an 8-cored processor)

 

So, bearing in mind that the first core is core 0, P3D was using the first logical processor (LP) on 4 cores: 4,5,6 and 7.

 

This allowed great flexibility in experimenting with core assignments for various 3rd Party Addons, including 'IdealFlight', since cores 0,1,2 and 3 (8 LPs) were masked and hence unavailable to P3D.

 

My fortuitous 'discovery' centres around the fact that I forgot to disable the Affinity Mask (AM) entry in Prepar3D.cfg when I switched back to Hyperthreading (HT)=Disabled in the BIOS. I did this simply to remind myself how P3D performed with HT=OFF. So, in some strange way, as yet unexplained, the 21760 value is still influencing the behaviour of the job scheduler while P3D is running. All 8 cores of my i7-5960X are being used but the core assignment for the P3D main thread appears to be being randomised each time the sim is started. I say 'randomised' whereas the reality is likely still to be governed by logic. Whatever the explanation may be it does seem to be delivering in terms of fluidity of performance. This could be down to numerous factors not least being my chosen in-sim settings.

 

However, for your purposes, you should always follow Steve's advice and be prepared to experiment with your settings. Revealing my settings will not help you as they are specific to my rig.

 

Regards,

Mike

Share this post


Link to post

Well at the moment I am using AM=116. From the pictures I've provided it seems like this is the best setting for me until I can find a laptop to run ASN, PFPX, EFB, PRO-ATC, etc on.

 

I'm assuming that a majority of P3D users don't even use affinity mask settings in their cfg file. So would you guys say that AM is a must needed setting even with the latest P3D v3.3.5?

 

Is having no affinity mask setting better or worse than having one?


ASUS ROG Maximus Hero XII ▪︎ Intel i9-10900K ▪︎ NVIDIA RTX 3090 FE ▪︎ 64GB Corsair Vengeance RGB Pro ▪︎ Windows 10 Pro (21H1) ▪︎ Samsung 970 EVO Pro 1TB NVME SSD (OS Drive) ▪︎ Samsung 860 EVO 2TB SATA SSD ▪︎ Seagate 4TB SATA HDD ▪︎ Corsair RMx 850W PSU

Share this post


Link to post

I'm assuming that a majority of P3D users don't even use affinity mask settings in their cfg file. So would you guys say that AM is a must needed setting even with the latest P3D v3.3.5?

 

Hi Aaron,

 

I think your question has been answered by Steve in post #496. You are certainly correct in your assumption that the majority of P3D users are unlikely to be using an Affinity Mask with P3D. In most cases it will be because they are unaware of its importance where Addons are concerned, assuming they are intended to run alongside P3D on the same CPU. Possibly they may simply prefer just to avoid the hassle of experimentation. Getting to grips with this concept can be quite challenging until finally the light dawns. Few will persevere or have the necessary patience.

 

Lockheed Martin programmed P3D to run optimally on multi-cored CPUs. While they are aware that 3rd Party Addons are being brought into the mix they have made no provision to accommodate them as the variables are many and difficult, if not impossible to predict. However, in your case, by using the Affinity Mask = 116 you are able to provide 4 logical processors for the exclusive use of P3D while masking off the rest for use by the Operating System and any sim-related Addons. This allows the efficient allocation of available resources. You can choose whether to assign an Addon to a particular LP or just let the Windows Job Scheduler do the work for you. In the case of AM=116 the two logical processors on Core 0 become available and are likely to be assigned for such activity.

 

Regards,

Mike

Share this post


Link to post

Mike, thanks for your answer. I'll leave my settings at that then. I'm just trying to get the most performance I can out of my system for the time being until I can get a laptop to run those add-ons on. That way I can free up my main computer solely for P3D. Which then I can remove the affinity mask setting altogether from my .cfg file.

 

Would you say running google chrome or any other browser while using P3D qualifies as an "add-on"? Sometimes during long haul flights, I like to browse or surf the web. Was wondering if that affects P3D's performance much.


ASUS ROG Maximus Hero XII ▪︎ Intel i9-10900K ▪︎ NVIDIA RTX 3090 FE ▪︎ 64GB Corsair Vengeance RGB Pro ▪︎ Windows 10 Pro (21H1) ▪︎ Samsung 970 EVO Pro 1TB NVME SSD (OS Drive) ▪︎ Samsung 860 EVO 2TB SATA SSD ▪︎ Seagate 4TB SATA HDD ▪︎ Corsair RMx 850W PSU

Share this post


Link to post

Strange just loaded up my sim and textures were all blurry with AF=116... So I removed AF settings all together and it was sharp again. 

 

Any idea why setting AM=116 causes blurries? I thought that this setting would be optimal for me? Even with AM=253/254 I didn't get blurries.

 

But both a setting of 84 and 116 results in blurries.


ASUS ROG Maximus Hero XII ▪︎ Intel i9-10900K ▪︎ NVIDIA RTX 3090 FE ▪︎ 64GB Corsair Vengeance RGB Pro ▪︎ Windows 10 Pro (21H1) ▪︎ Samsung 970 EVO Pro 1TB NVME SSD (OS Drive) ▪︎ Samsung 860 EVO 2TB SATA SSD ▪︎ Seagate 4TB SATA HDD ▪︎ Corsair RMx 850W PSU

Share this post


Link to post

Would you say running google chrome or any other browser while using P3D qualifies as an "add-on"? Sometimes during long haul flights, I like to browse or surf the web. Was wondering if that affects P3D's performance much.

 

If you are using AM=116 then Core 0 of your CPU (with logical processors 0 and 1) will be excluded and hence available for the Windows Job Scheduler to assign such processes without interfering with P3D's performance. In other words you need do nothing more than allow Windows to handle things for you.

 

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