Jump to content
Sign in to follow this  
bbain1187

Dynamic Frame Rate Limiter?

Recommended Posts

13 hours ago, bbain1187 said:

Thanks for the response. Are you saying I should block off the first two cores from hyperthreading, and use an affinity mask of 253, or to leave HT off with affinity mask=253?

My first two cores are the ones that get the hottest so that might work if only cores 3 and 4 are hyperthreading.

Like Bert said, using the affinity mask tells P3D where to run its threads. So by specifying the AM, we can tell P3D not to run competing threads on Logical Processors (LPs) that live on the same physical core. One of the big points of confusion over the years was that hyperthreading was 'bad' - to the contrary it can improve performance if the right AM is used. Hyperthreading HELPS with terrain/scenery loading and other background tasks, but it HURTS if the main P3D thread has to run on an LP that is competing with another P3D thread on the same physical processor. That's why we use the AM to block the second LP on at least Core0 and sometimes Core1 as well.

What I'm suggesting is that you try out blocking one of the LPs on Core0 and also on Core1, and then also test just blocking the second LP on Core0. I can't test this because I have a six core i5 that doesn't support HT.

So, in your case I would start here...

For testing, start with a fresh prepar3d.cfg file.

1) Turn on HT and then add the AM 245 for starters. This will block P3D from using the second LP on each of your first two physical cores, giving you a total of six LPs for P3D to use. This will allow P3D to use both hyperthreaded LPs on your physical cores 2 and 3 (but not on physical cores 0 and 1).

[JOBSCHEDULER]
AffinityMask=245

2) Make sure you're either using vsync on in P3D or that you're setting a specific target frame rate.  Typically, using vsync will result in a lower overall load on the first thread (on Core 0) [and lower temps] because when you specify a target framerate in P3D, P3D will (almost) always hold Core 0 at 100% utilization - that is how it is designed to work. This works well for some and not well for others. In your case with a possible temps issue, I would steer towards finding a vsync setup that works. And avoid using the voodoo some suggest in messing with P3D's CPU affinity through the Task Manager. This just confuses P3D's logic and results are unpredictable. I also have had nothing but bad luck in using external affinity managers, like Process Lasso on or with P3D.

3) Depending on how the above works for you, you may want to test out affinity mask 253, which will add another LP for P3D to use, and will only block off an LP on Core 0, but will use both hyperthreaded cores on your physical cores 1,2 and 3. You can test this easily just by changing the 245 to 253 in the cfg file and restarting P3D. This will give P3D seven LPs.

4) Once you've tested the above, you can then 'tweak' how much time P3D spends on terrain loading vs overall sim framerate by adjusting the FFTF value. By default it is 0.33 and there's no entry in the cfg file. If you add that entry under the [MAIN] section of the prepar3d.cfg file, you can adjust it. Lower values (0.1 to 0.32) will spend LESS than the default CPU time loading terrain; this is a good choice when you're struggling with framerates. Higher values (0.34 and above) will spend MORE than the default CPU time loading terrain; this is a good choice if your framerates are good, but you are struggling with blurries. I haven't used FFTF in v5, I've found I don't need it with v5. YMMV.

[MAIN]
FIBER_FRAME_TIME_FRACTION=0.45

The above steps SHOULD get you running well in P3Dv5 from a performance perspective. Stability still remains elusive for some, but I've found settings that make me happy and keep my sim from crashing. I would be very interested in your results, so keep us informed 😉

 

  • Like 1

5800X3D | Radeon RX 6900XT

Share this post


Link to post

Thank you cwburnett and Bert! I tried HT On/AM=245 and did a KDFW-KMCI-KDFW turn using FSDT KDFW, TropicalSim KMCI, MegaScenery Earth plus Nuvecta autogen in the MaddogX and my textures were sharp, even with LOD set on high. The only time I saw any blurries at all was on descent but they went away once I slowed down to 250 knots. Not a single stutter, except for the green text information bar (which is a known P3D bug) even with thunderstorms in the KDFW area+ActiveSky P3D. I was also using FFTF Dynamic to reduce the FFTF value from .33 to .01 when transitioning from 1000 AGL to ground level.

I could hear my CPU fan switching into full gear at various times, which is something I hadn't noticed before. My 5 year-old i7 6700 is getting more of a workout, which brings me to the only downside:

I registered an 87 degree reading on core 1 (2nd physical core) using RealTemp while I was flying around some weather in Oklahoma. My next highest reading was 80 degrees on core 3. I'm planning on getting a new system when FS2020 comes out, but still don't think I should be flying every day with those temps. I've got a Noctua DH-14 cooler, I'll have to get in there and try to clear out some dust. I don't remember temps ever going that high, even when running HT on before. I guess it is a 5 year-old chip.

Edited by bbain1187

P3D 4.3, Windows 10/64 bit, Intel 6700k @ 4.7 air-cooled, NVidia 2080 Ti Founders Edition, ASUS Rog Maximus VIII Ranger, 16GB G.Skill Ripjaws DDR4 @3200, Phanteks Anthoo Pro Series Case, Samsung 950 Pro M.2 500GB, Sandisk 1TB SATA, Seagate 2TB Hybrid Drive, Cooler Master 700W, 40-inch Samsung 4k TV

Share this post


Link to post
45 minutes ago, bbain1187 said:

I registered an 87 degree reading on core 1 (2nd physical core) using RealTemp while I was flying around some weather in Oklahoma. My next highest reading was 80 degrees on core 3. I'm planning on getting a new system when FS2020 comes out, but still don't think I should be flying every day with those temps. I've got a Noctua DH-14 cooler, I'll have to get in there and try to clear out some dust. I don't remember temps ever going that high, even when running HT on before. I guess it is a 5 year-old chip.

Cut back a couple of 100s on your overclock, you'll still be better off with that AM and HT On.

  • Like 1

Share this post


Link to post
18 hours ago, bbain1187 said:

I could hear my CPU fan switching into full gear at various times

Speaking of fans, if you haven't, make sure you've configured your case and CPU fans to spin up earlier and together. I generally like all the fans to be working at 100% by about 75C, and I typically tie all fan controls to CPU temp. There's usually a section in the BIOS to control this.

18 hours ago, bbain1187 said:

I registered an 87 degree reading on core 1

Meh, there are varying philosophies on this, but peaking at 87 doesn't offend me at all.  If you were always in the 90s and peaking at 100, I'd be more concerned, but living in the 70s-80s with peak core temps up to 90 just don't get me super worked up. YMMV of course. It is one of the reasons I built my system on a $200 i5 9600k that I could clock to 5ghz...if it dies, I can buy a couple more to replace it before I've spent i9 money... But I also peak in the 80s, with temps mainly in the high 60s-low 80s, so I expect it will run strong until my next build.

  • Like 1

5800X3D | Radeon RX 6900XT

Share this post


Link to post
On 7/1/2020 at 9:53 AM, cwburnett said:

 I also have had nothing but bad luck in using external affinity managers, like Process Lasso on or with P3D.

I use PL and it's good for one purpose:  you can permanently assign other potentially competing processes off of any or all of the LPs you have assigned using P3D's AM function.  Whereas w/o PL in Win 10 you cannot permanently change affinity assignments--they will go back to default, i.e., no AM, upon rebooting.


Noel

System:  7800x3D, Thermal Grizzly Kryonaut, Noctua NH-U12A, MSI Pro 650-P WiFi, G.SKILL Ripjaws S5 Series 32GB (2 x 16GB) 288-Pin PC RAM DDR5 6000, WD NVMe 2Tb x 1, Sabrent NVMe 2Tb x 1, RTX 4090 FE, Corsair RM1000W PSU, Win11 Home, LG Ultra Curved Gsync Ultimate 3440x1440, Phanteks Enthoo Pro Case, TCA Boeing Edition Yoke & TQ, Cessna Trim Wheel, RTSS Framerate Limiter w/ Edge Sync for near zero Frame Time Variance achieving ultra-fluid animation at lower frame rates.

Aircraft used in A Pilot's Life V2:  PMDG 738, Aerosoft CRJ700, FBW A320nx, WT 787X

 

Share this post


Link to post
1 hour ago, Noel said:

I use PL and it's good for one purpose:  you can permanently assign other potentially competing processes off of any or all of the LPs you have assigned using P3D's AM function.  Whereas w/o PL in Win 10 you cannot permanently change affinity assignments--they will go back to default, i.e., no AM, upon rebooting.

👍 I used PL with v4.5 to do as you describe. With v5 I just setup Navigraph, ASP3D and PSX to start with a specific affinity with a batch file. But yes, if PL is setup to exclude P3D it works well to shuffle everything else off core0. V4.5 was way more sensitive though to core0 competition.


5800X3D | Radeon RX 6900XT

Share this post


Link to post
1 hour ago, cwburnett said:

👍 I used PL with v4.5 to do as you describe. With v5 I just setup Navigraph, ASP3D and PSX to start with a specific affinity with a batch file. But yes, if PL is setup to exclude P3D it works well to shuffle everything else off core0. V4.5 was way more sensitive though to core0 competition.

Could you send a link to where I might learn how to do this? With AM=245, which cores would I want my other programs to run on?

I backed it down to 4.4 with less voltage. Peaked at 77c on a flight last night. Got a couple stutters in the gate area with Flightbeam KPDX + TE Oregon.

Also, in my test scenario yesterday, I forgot to add that I accidentally left my Texture_Size_Exp=10 tweak in the config. And it still ran great! I'll chock that up to my 2080 TI though.

Edited by bbain1187

P3D 4.3, Windows 10/64 bit, Intel 6700k @ 4.7 air-cooled, NVidia 2080 Ti Founders Edition, ASUS Rog Maximus VIII Ranger, 16GB G.Skill Ripjaws DDR4 @3200, Phanteks Anthoo Pro Series Case, Samsung 950 Pro M.2 500GB, Sandisk 1TB SATA, Seagate 2TB Hybrid Drive, Cooler Master 700W, 40-inch Samsung 4k TV

Share this post


Link to post
2 hours ago, bbain1187 said:

Could you send a link to where I might learn how to do this? With AM=245, which cores would I want my other programs to run on?

I backed it down to 4.4 with less voltage. Peaked at 77c on a flight last night. Got a couple stutters in the gate area with Flightbeam KPDX + TE Oregon.

Also, in my test scenario yesterday, I forgot to add that I accidentally left my Texture_Size_Exp=10 tweak in the config. And it still ran great! I'll chock that up to my 2080 TI though.

SteveW actually just wrote up a bit on the batch file here:

I put my add-ons on cores 2 and 4 because those seem to not be used heavily with v5.  The trick with the batch file is that it uses the hex value instead of the dec value that P3D uses. If you landed on 245, then you're running 11 11 01 01 for P3D.  Then if you wanted to replicate my setup, you'd want your add-ons running like this 01 01 00 00 which is F6950 in hex... (yes I know, it's getting crazy!)

So in your batch file, you'd want something like:

C:\Windows\System32\cmd.exe /c start "MyExeApp" /affinity F6950 "C:\AddonFolder\MyExeApp.exe"

Where the MyExeApp is replaced in both spots with your actual add-on names.  What add-ons are you running?

After you try your batch file, open the task manager and go to set the affinity for your add-ons that you included in your bat file and you can see if they're on the right cores.

So, for example, here are the contents of my batch file to launch Activesky:

@ECHO OFF
start "ASP3D" /affinity 14 C:\HiFi\ASP3D\ASP3D.exe -simVersion=5

In order to set affinity, the batch file needs to be run as an administrator. Since I'm a little neurotic, I create the batch file in the app folder, then I create a desktop shortcut to the batch file. Then I set the shortcut to 'run as administrator' so that it will set the affinity and then I change the icon for the shortcut to the original Activesky icon. 😉

You can also combine different addons into the same batch file if you want to start a few together.

Edited by cwburnett
  • Like 1

5800X3D | Radeon RX 6900XT

Share this post


Link to post
On 7/3/2020 at 7:10 PM, cwburnett said:

SteveW actually just wrote up a bit on the batch file here:

I put my add-ons on cores 2 and 4 because those seem to not be used heavily with v5.  The trick with the batch file is that it uses the hex value instead of the dec value that P3D uses. If you landed on 245, then you're running 11 11 01 01 for P3D.  Then if you wanted to replicate my setup, you'd want your add-ons running like this 01 01 00 00 which is F6950 in hex... (yes I know, it's getting crazy!)

So in your batch file, you'd want something like:


C:\Windows\System32\cmd.exe /c start "MyExeApp" /affinity F6950 "C:\AddonFolder\MyExeApp.exe"

Where the MyExeApp is replaced in both spots with your actual add-on names.  What add-ons are you running?

After you try your batch file, open the task manager and go to set the affinity for your add-ons that you included in your bat file and you can see if they're on the right cores.

So, for example, here are the contents of my batch file to launch Activesky:


@ECHO OFF
start "ASP3D" /affinity 14 C:\HiFi\ASP3D\ASP3D.exe -simVersion=5

In order to set affinity, the batch file needs to be run as an administrator. Since I'm a little neurotic, I create the batch file in the app folder, then I create a desktop shortcut to the batch file. Then I set the shortcut to 'run as administrator' so that it will set the affinity and then I change the icon for the shortcut to the original Activesky icon. 😉

You can also combine different addons into the same batch file if you want to start a few together.

I'm running Active Sky P3D, ASCA, REX Sky Force (for cloud models when not using EA), TrackIR, VPilot, Dynamic FFTF, ChasePlane. 


P3D 4.3, Windows 10/64 bit, Intel 6700k @ 4.7 air-cooled, NVidia 2080 Ti Founders Edition, ASUS Rog Maximus VIII Ranger, 16GB G.Skill Ripjaws DDR4 @3200, Phanteks Anthoo Pro Series Case, Samsung 950 Pro M.2 500GB, Sandisk 1TB SATA, Seagate 2TB Hybrid Drive, Cooler Master 700W, 40-inch Samsung 4k TV

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