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

My experience with P3D out of the box was just unwanted. I'm not the simmer that expects to get 40-60 FPS out of their computer, but instead I aim for a smooth rendering experience between 20-30 FPS. The default experience was horrendous, and can be summed into one word: stutters. Or maybe another word: micro-stutters.

 

So I attempted to understand what settings were creating the stutters. One thing I could rule out was my GPU. Although a GTX 660 is no Titan, it is never fully used and its VRAM is never depleted, so I suspected my CPU was bottle-necking the GPU: a i7-2600K. While several generations old, the i7-2600K is no slouch. Let's be honest. The latest offerings from Intel have not been turning heads. Each year, their new products only lend about 4-5% more performance over the last generation. So a four year old processor isn't such a big deal today than it was ten years ago.

 

I decided to create a benchmark for myself. One that I can load into after a fresh reboot of the simulation and after changing any settings. It also had to be simple and consistent.  So I chose a scenario in which I perform a single VFR left traffic pattern from runway 27R at LHR at a standard 1000' AGL.This takes approximately five minutes, sometimes exactly as soon as I touch down. Frame rate and time analysis were performed after each run.

 

For those interested, I provided the addons and settings I used, along with any other tweaks in the .cfg and nVidia Inspector below.

 

Scenery:

  • Aerosoft London Heathrow
  • FTX Global Base and Vectors 1.30
  • FTX openLC Europe 1.20
  • FreeMeshX Global

Aircraft:

  • Alabeo DA40 with user supplied mipmaps (WHY THE HELL WOULD ALABEO NOT MIPMAP THEIR TEXTURES!)

Weather

  • Active Sky Next
  • Historical Weather Mode: Tuesday, October 20 2015 10:32 UTC

nVidia Inspector settings:

  • Clamp negative LOD bias
  • High quality texture filtering
  • No SGSAA

Prepar3d.cfg settings modifications  --- (necessary because the default texture settings slow the loading of textures -- leaving some buildings black for five seconds at a time. IDK why we even have to hunt down these problems and solutions).

 

[DISPLAY]

TextureMaxLoad=30

TEXTURE_BANDWIDTH_MULT=160

 

Sliders:

 

VG7xSOA.png

 

3zC9Xz6.png

 

SK8MuOr.png

 

yDSHYib.png

 

 

No Affinity Mask, 30 FPS Upper Limit, HT on (P3D running threads on all 4 physical and 4 logical cores)

 

7Dm4s3h.png

 

As you can see, only 18 average FPS, and the micro-stuttering is very visible, along with intermittent spikes as long as 200 ms. That means some frames take a full 1/5 of a second to render. Way too long. It was no longer a question of why I felt nauseous with the out of the box settings. The stuttering problem was very real.

 

No Affinity Mask, Frames Unlimited, HT on

 

I70ONQ3.png

 

I tried to unlock the frames to increase the FPS, but the severity of the problem is only exacerbated, especially in regard to the micro-stuttering, and the mean FPS sees little improvement. Simply unplayable. Try panning around in this condition, and you might just vomit from the constant large swings in frame times.

 

Next I tried turning off HT and then applying an affinity mask of 14 to allow one core to process background threads while the rest deal with P3D, as recommended by many to reduce stutters.

 

AF = 14, 30 FPS Upper Limit, HT off

 

OtEn0WU.png

 

There is still significant micro-stuttering and stuttering, but the severity has lessened. The average frame rate is still quite poor at 20 FPS, and the minimum is still low.

 

AF = 14, Frames Unlimited (30 FPS Limit in NVInspector), HT off

 

Here is an attempt to boost the frame rates by unlocking the frame rate limit, but using an external limiter to avoid micro-stutters. We're successful in increasing the frame rate, but for decreasing the stutters?

 

O7n6REJ.png

 

Not so much. It is becoming clear that unlocked frames will create micro-stutters no matter what!

 

AF = 15, 30 FPS Upper Limit, HT off

 

I now go against recommendations and use the remaining 4th core, background apps be damned, and reapply the frame lock since no lock only makes the micro-stutters worse.

 

3TLmM6m.png

 

There is an improvement in reducing the micro-stutters, but they and the large stutters are still there. The frame rate is still more stable, so this is an improvement over the 3-core case. It seems using four cores is the way to go. It is definitely more playable! Time to turn hyper-threading back on in the BIOS and see what happens.

 

AF = 85, 30 FPS Upper Limit, HT on

 

Hyperthreading is now on, but only the four physical cores are being used. I suspect I will see little difference from the previous case.

 

fKfm4Tc.png

 

There are some subtle differences. My frame rate is slightly more unstable, but the longest frames are reduced in time. Overall, hyperthreading on or off doesn't seem to make much of a difference.

 

AF = 84, 30 FPS Upper Limit, HT on

 

Same case as before except P3D is limited to three physical cores.

 

BYiFiql.png

 

Not much difference. Maybe some improvement in frame stability. There doesn't seem to be much difference whether hyper-threading is turned on or off, as long as an affinity mask and the internal frame lock is applied.

 

AF = 85, 30 FPS Upper Limit, HT on, Overclock to 4.7 GHz

 

Now I decide to apply my overclock after finding that hyper-threading is irrelevant, four cores is generally better than three, and a frame lock is the way to go.

 

x5QWVUF.png

 

My goodness! What an improvement! The average frame rate is much improved, and 99% of the frames are rendered at a rate faster than 17 FPS. The stability of the frame rates are much better, but we still have some frames being rendered in times > 150 ms. Those stutters are still apparent to my eye. I figure the next thing to do is lower the LOD_RADIUS from Max to High.

 

AF = 85, 30 FPS Upper Limit, HT on, Overclock to 4.7 GHz, LOD_RADIUS = 4.5

 

azgvRQz.png

 

There it is. That's what I want to see. Most of the frames are rendered at 28 FPS. The frame rate is stable. Any longer frames are rendered in under 80 ms. The simulator is smooth as silk and the frame rate is acceptable.

 

The Bottom Line:

  1. The default setting of no affinity mask sucks. i5 users are probably not affected by it, but those who do have an i7 are subjected to very poor frame rates and rendering stability.
  2. Hyper-threading on or off makes no difference, as long as an appropriate AF is applied.
  3. I see no advantage in using 3 cores to free up one processor for background applications. It's best if you just just limit background applications, and run on all four cores.
  4. Use the internal frame limiter! Frame stability depends on the internal frame lock. Unlocking the frames creates horrendous micro-stuttering. An external frame limiter does not alleviate the problem.
  5. Overclock your CPU. The increases in frame stability and average frame rates are quantifiable.
  6. If you still see some stutters,  then temporarily lower your LOD_Radius until you are in a more suitable area to return it to the max value. Higher LOD values seem to be responsible for the longest frames, and it's probably due to the CPU just being swamped.
  • Upvote 13

Share this post


Link to post

Nice job - looks correct from what I am seeing 


Rich Sennett

               

Share this post


Link to post

Hi,

 

thanks for the careful testing. I have a i7-2600 as well, albeit the non-K version, which I've been quite pleased with so far, though. I didn't make a careful test series, however from my experience I can confirm items 1, 2, 3.

 

I am not sure on the framerate limiter (4.), at present it's off and still works quite well. I might test "on" again.

 

However, one point I'd like to add: Setting process priority to "high" for prepar3d.exe makes quite a difference on fluidity on my system. 

 

Kind regards, Michael


MSFS, Beta tester of Simdocks, SPAD.neXt, and FS-FlightControl

Intel i7-13700K / AsRock Z790 / Crucial 32 GB DDR 5 / ASUS RTX 4080OC 16GB / BeQuiet ATX 1000W / WD m.2 NVMe 2TB (System) / WD m.2 NVMe 4 TB (MSFS) / WD HDD 10 TB / XTOP+Saitek hardware panel /  LG 34UM95 3440 x 1440  / HP Reverb 1 (2160x2160 per eye) / Win 11

Share this post


Link to post

Very good. Only I am missing:  "No Affinity Mask, HT ON, 30 FPS, overclocked" Thats how I get smooth P3Dv3 experience.


- Harry 

i9-13900K (HT off, 5.5 GHz, Z690) - 32 GB RAM (DDR5 6400, CAS 34), RTX 3090Windows 11 Pro (1TB M.2) - MSFS 2020 (MS Store, on separate 4TB M.2).

 

 

 

Share this post


Link to post

Very good. Only I am missing:  "No Affinity Mask, HT ON, 30 FPS, overclocked" Thats how I get smooth P3Dv3 experience.

 

AF off, 30 FPS Upper Limit, HT on, Overclock to 4.7 GHz, LOD_RADIUS = 4.5

 

D3P8sOR.png

 

Not bad, but not as good as the result with the affinity mask.

Share this post


Link to post

Interesting analysis - goes to show how results vary on different systems. I wanted to add that I get fewer stutters on my 5930K / GTX980 with unlimited frames, and setting AM to all cores is virtually the same as having no AM set at all (which is what I'd expect).

Share this post


Link to post

Absolutely superlative report!

… Just what I was looking for but was too lazy to figure out how ...when…etc,etc....

Just goes to show you what definitive, rigorous and enlightened objective and scientific research can garner… Speaking of which there is a great UTX set up page which shows it in detail every efficient and frame friendly setting…

http://www.simforums.com/forums/admin-utx-europe-v21-upgrade-released_topic52575.html

The effect of which can be seen on my latest vid below

 

Watch as I forget to switch my tip tanks, then my gear as I do a forced landing...back to boot-camp, boy...

but really watch the UTXUSA2 detail and NOT-the-frame-rate, but the smoothness of the UTXtweaks.

 

Add to that AviatorMoser's tweaks, and you will be be joining me in, crapping .....head down....

!!! shut up Siri!!!!

Clapping my virtual hands, and Huzzahs towards the sterling Aviator/Scientist, AviatorMoser!!!

 

...can't wait to tweak my I7-2600 K!!!!

Thank you SIR AviatorMoser!

Chas


My first sim flight simulator pD25zEJ.jpg

 

Take a ride to Stinking Creek! http://youtu.be/YP3fxFqkBXg Win10 Pro, GeForce GTX 1080TI/Rizen5 5600x  OCd,32 GB RAM,3x1920 x 1080, 60Hz , 27" Dell TouchScreen,TM HOTAS Warthog,TrackIR5,Saitek Combat Rudder Pedals HP reverbG2,Quest2

Share this post


Link to post

AF off, 30 FPS Upper Limit, HT on, Overclock to 4.7 GHz, LOD_RADIUS = 4.5.

 

Not bad, but not as good as the result with the affinity mask.

 

Great work, thanks.

 

Would be very interested in results for Texture Resolution 4096 v 1024.

 

Also Vsync/Tripple buffer on/off.

 

gb.

  • Upvote 1

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

for this one:

AF = 85, 30 FPS Upper Limit, HT on, Overclock to 4.7 GHz, LOD_RADIUS = 4.5

 

could you also test: 

AF = 85, *Frames Unlimited*, HT on, Overclock to 4.7 GHz, LOD_RADIUS = 4.5

 

Maybe the microstutter improvement is purely due to reduction of LOD_RADIUS?

 

By all means, as a scientist I love your approach. Fantastic job!

  • Upvote 1

7950X3D / 32GB / RTX4090 / HP Reverb G2 / Win11

Share this post


Link to post

Great work, thanks.

 

Would be very interested in results for Texture Resolution 4096 v 1024.

 

Also Vsync/Tripple buffer on/off.

 

gb.

 

Here, I internally unlocked the frames, but used NV Inspector to set 1/2 Refresh Rate V-Sync, and enabled triple buffering.

 

AF = 85, Frames Unlimited, 1/2 Refresh Rating V-Sync, Triple Buffering, HT on, Overclock to 4.7 GHz, LOD_RADIUS = 4.5

 

wVEYgHC.png

 

The micro-stuttering reappears.

for this one:

AF = 85, 30 FPS Upper Limit, HT on, Overclock to 4.7 GHz, LOD_RADIUS = 4.5

 

could you also test: 

AF = 85, *Frames Unlimited*, HT on, Overclock to 4.7 GHz, LOD_RADIUS = 4.5

 

Maybe the microstutter improvement is purely due to reduction of LOD_RADIUS?

 

 

AF = 85, Frames Unlocked, HT on, Overclock to 4.7 GHz, LOD_RADIUS = 4.5

 

nbfjDZj.png

 

Turning off the frame lock certainly increases my average FPS from 28 to 35, but frame time instability certainly returns. However, the instability and microstutters are not as unbearable as before, but still noticeable as the sim is no longer as smooth.

Share this post


Link to post

I need a mod for NVidia inspector using 2 GTX 660Ti doing SLI, and using intel i7 2600K at 4.2GHZ and HT off.


My%20Signature.jpg

Share this post


Link to post

Thanks! Really really nice analysis.

 

I wonder whether your results may help to justify the fiber frame time fraction (FFTF) = 0 or FFTF=0.1 trick.

 

By reducing FFTF, you can set the frame limit with much less loss of FPS. Therefore you can keep higher LOD_RADIUS without suffering too much microstuttering.

  • Upvote 1

7950X3D / 32GB / RTX4090 / HP Reverb G2 / Win11

Share this post


Link to post

i7 here, i3770k @ 4.6ghz, without AM, using FFTF=0.01 twak only, and locket internally at 60 - P3Dv3 smooth as silk, 50-60fps at max settings, around 30-40 with the NGX. GTX 960 2gb is the GPU. So, as far as I can see, P3Dv3 is another FSX, behaving weird on different systems. Correct me if I'm wrong.


Current system: ASUS PRIME Z690-P D4, Intel 12900k, 32GB RAM @ 3600mhz, Zotac RTX 3090 Trinity, M2 SSD, Oculus Quest 2.

Share this post


Link to post

Thanks! Really really nice analysis.

 

I wonder whether your results may help to justify the fiber frame time fraction (FFTF) = 0 or FFTF=0.1 trick.

 

By reducing FFTF, you can set the frame limit with much less loss of FPS. Therefore you can keep higher LOD_RADIUS without suffering too much microstuttering.

 

AF = 85, 30 FPS Upper Limit, HT on, Overclock to 4.7 GHz, FFTF = 0.01

 

sFBvgOx.png

 

Great call! Minimum and average frame rates increased, and no long frame times, even when LOD_Radius is at MAX. Best results yet. This is such an improvement from what I started with.

  • Upvote 3

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