cleonpack93

CPU Affinity with P3D v4

Recommended Posts

I've seen varying opinions on using CPU affinity with v4. Some have said that because of new dynamic controls built in to  P3D itself, manual affinity is no longer needed (I use ProcessLasso to assign CPU affinity rather than changing the .cfg affinity mask). Right now I am running v4 on a 4-processor system (don't laugh. It has actually been working VERY well, way better than FSX was on the same system). Based on the old rules of affinity that I had read, I made it so that P3D is set to use CPU's 1, 2, and 3 and all of my add-ons use CPU 0. So far so good. But, I was wondering if I should just remove the affinity altogether and let it do it's thing.

What has been your experience with v4? What would you recommend?

Share this post


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

I'm in your boat with a 4790k and use Lasso on cores 1-3 with no Hyperthreading.  Works great for me and I'm going to leave mine alone.

  • Upvote 1

Share this post


Link to post
7 hours ago, cleonpack93 said:

But, I was wondering if I should just remove the affinity altogether and let it do it's thing.

Try it an you will see. My experience (4 core and 8 core) tells me P3Dv4 does not need AM/PL.

  • Upvote 2

Share this post


Link to post

I tried AM with 4.1 as i was used to do it in FSX.. BUT there is no really any need.

I fly with everything in one Machine with 2 Monitors:

  • P3Dv4.1
  • Active Sky + ASCA
  • FSrealtime
  • Charts Navigraph (mostly web based)
  • Chrome
  • vPilot (i fly exclusively online)

...and my machine hansles it very well (see it in the sig)...So i wouldn;t bother with Affinity mask.

Share this post


Link to post
7 hours ago, cleonpack93 said:

What has been your experience with v4? What would you recommend?

It works like allways, but you may get blurry textures. On 4 cores CPU with no AM - core 2 and 3 are loading textures, with AM=14 only core 3, and that's not enough on my system. I'm not using it with P3Dv4 becouse of this

Share this post


Link to post

I haven't found any need to mess with the cfg at all, including AM. Smooth like silk with very high settings on my i6700k and gtx1070. I do have dynamic lighting and high res ground textures off, though.

Share this post


Link to post

Prepar3D v4.1
i7 3770K @4.7Ghz (4 cores) running with HT
(980ti - 16GB Ram - Win10 updated - Latest Nvidia Drivers)

From my tests i've found out that setting AM to 252 (first logical and first thread for the apps like ai monitoring, external gauges, Littlenavmap, weather engine, Chaseplane, ecc..., and all other logical and threads on P3D) makes P3D running with slighlty better FPS, but most important a lot of less stuttering.

Logical 0 and thread 0: 10%-25% for the apps

Logical 1: full 100% for rendering. Thread 1: 70%-80%

Logical 2 and 3, Thread 2 and 3: 90%-100% (all other P3D tasks)

Hope this helps.

Share this post


Link to post

Ok W

3 hours ago, bean_sprout said:

AFFINITY_MASK - Just say no!

cheers bs

ok well... damn... before it was FSX... now P3D... it makes me go crazy....

After more testing, HT OFF and no AF, 3-4 fps more and even less stuttering.

DAMN.

This is not a flight simulator. It is a testing-benchmarking tool :D

Considering i ran P3D for one year, 10 months it was running for benchmarking and testing.

...

Share this post


Link to post

I decided to turn affinity off in ProcessLasso and saw an overall reduction in stutters. So there ya go I guess haha

  • Upvote 1

Share this post


Link to post

The only AF mask that works for me (6700K, HT on) is:

[JOBSCHEDULER]
AffinityMask=253

which does nothing else then mask out the first logical core as the main thread runs on Core 0 and I wanted to get rid of everything else on Core 0/1. This makes the sim more fluid for me, but does not give more FPS. All other settings don't really work for me. As this is highly dependent on all other software that is running it is hard to find the AF mask that suites the best for one personally. :-(

  • Upvote 1

Share this post


Link to post

+1 

[JOBSCHEDULER]
AffinityMask=253

CPU: 4770K@4.1, HT on.

The only other tweak I use, and it actually makes a bigger difference, is:

[TERRAIN]
TEXTURE_SIZE_EXP=9

GPU: GTX1070

 

  • Upvote 1

Share this post


Link to post

+1 

[JOBSCHEDULER]
AffinityMask=253

CPU: 4790K@4.6, HT on.

In my case 253 is also the best value at p3d launch.
But it is also interesting after the launch to set AF to 255.
All cores work without saturation.
You can watch this video to know how to do that :

You can also do this automatically.
In my case I launch p3d with a bat file and after 60 seconds I set AF at 255.

Here is the content of my file start_p3d.bat

cmd.exe /c start "Prepar3D" "C:\Program Files\Lockheed Martin\Prepar3D v4\Prepar3D.exe"
timeout 60 > NUL
PowerShell "$Process = Get-Process Prepar3D; $Process.ProcessorAffinity=255"

But to works the .bat must be launch in administrator mode.

 

Share this post


Link to post

Affinity mask has no effect on my P3D4 / 7700K which is the way it should be.

 

Cheers
bs

Share this post


Link to post

6700k 4 core, AM=85. This puts P3DV4 on the 4 physical cores LP 0, 2, 4, 6. LP 5 and 7 get add-ons.

Share this post


Link to post
On 11/20/2017 at 9:07 AM, swiesma said:

The only AF mask that works for me (6700K, HT on) is:

[JOBSCHEDULER]
AffinityMask=253

Recently installed P3D V4.1 and I had difficulties with very blurry ground textures.
Since we share the same processor, I thought why not try AF 253.

Result: Butter smooth framerates with no stutters at all and my blurries are gone.
I say: Thanks a lot for the hint!

  • Upvote 1

Share this post


Link to post
On 20/11/2017 at 4:56 PM, Bert Pieke said:

+1 

[JOBSCHEDULER]
AffinityMask=253

CPU: 4770K@4.1, HT on.

The only other tweak I use, and it actually makes a bigger difference, is:

[TERRAIN]
TEXTURE_SIZE_EXP=9

GPU: GTX1070

 

253 here as well, as normal Bert is right on the money.  Thanks for that I really appreciate it. 

Share this post


Link to post

So far -- I have not had any need to run Process Lasso, or any AM tweak, with P3Dv4  -- it's very smooth with my new rig (8700K).  After having barely run any FS since 2009, I'm amazed at how smooth the old ESP-based sim has become.  The old microstutters FSX had -- gone, seemingly.

I do run Process Lasso with FSX and it does seem to help it.

Share this post


Link to post

Since 2 weeks stopped using an AM for my 6 core 5820K and stopped using HT.

I now have my core 0 clocked at 100 MHz  higher than before and the terrain cores are now taxed almost equally. 

That resulted in eliminating all blurries and some higher settings.

I used Steve’s advice to startup all addons  with a batchfile that assigns cores to them. Each addon uses 2 cores and they have been devided over all terrain cores.

Share this post


Link to post
3 hours ago, GSalden said:

Since 2 weeks stopped using an AM for my 6 core 5820K and stopped using HT.

I now have my core 0 clocked at 100 MHz  higher than before and the terrain cores are now taxed almost equally. 

That resulted in eliminating all blurries and some higher settings.

I used Steve’s advice to startup all addons  with a batchfile that assigns cores to them. Each addon uses 2 cores and they have been devided over all terrain cores.

Could you elaborate on each core, what it carries from P3D and the addons, and post your batch file text here (or PM)? Also which cores do you consider 'all terrain cores'? That would be very helpful for my understanding.

Thanks!

Share this post


Link to post
4 hours ago, GSalden said:

Since 2 weeks stopped using an AM for my 6 core 5820K and stopped using HT.

I now have my core 0 clocked at 100 MHz  higher than before and the terrain cores are now taxed almost equally. 

That resulted in eliminating all blurries and some higher settings.

I used Steve’s advice to startup all addons  with a batchfile that assigns cores to them. Each addon uses 2 cores and they have been devided over all terrain cores.

This don't work well on a 4 core thus the reason I have HT on for my i7 6700k. OC at 4.3ghz and 1.25 volts fixed. 

Share this post


Link to post
On 11/20/2017 at 11:56 AM, Bert Pieke said:

+1 

[JOBSCHEDULER]
AffinityMask=253

CPU: 4770K@4.1, HT on.

The only other tweak I use, and it actually makes a bigger difference, is:

[TERRAIN]
TEXTURE_SIZE_EXP=9

GPU: GTX1070

 

I have been using AM 245 on my 4 core 6700k, 245=11110101. Running other background programs like Activesky, vPilot, etc.. on LP5 and 7. With your AM, 253
// 253=11111101, what are you running yours on? And I presume having LP3 active makes the difference noticeable as that is the only change. 

Share this post


Link to post
3 hours ago, Dirk98 said:

Could you elaborate on each core, what it carries from P3D and the addons, and post your batch file text here (or PM)? Also which cores do you consider 'all terrain cores'? That would be very helpful for my understanding.

Thanks!

No Am , no HT . Core ) is the mainj thread and the other 5 cores are for terrain loading.

Here one of my 2 batch files :

@Echo off
net sess>NUL 2>&1||(powershell try{saps '%0'-Verb RunAs}catch{}&exit)
pushd "C:\Prosim737"
start /affinity 10 Prosim737.exe
timeout /T 10 /nobreak
pushd "C:\ProsimMCP"
start /affinity 20 ProsimMCP.exe
timeout /T 5 /nobreak
pushd "C:\ProsimPanel"
start /affinity 34 ProsimPanel.exe
timeout /T 5 /nobreak
pushd "C\OpusFSI"
start /affinity 20 C:\OpusFSI\FSISERVER.EXE
timeout /T 10 /nobreak
pushd "C:\IOcards\SIOC"
start /affinity 10 C:\IOcards\SIOC\sioc.exe
timeout /T 5 /nobreak
pushd "C:\Program Files (x86)\FSPS\Dolby Cockpit Sounds FSX"
start /affinity 40 C:\"Program Files (x86)"\FSPS\"Dolby Cockpit Sounds FSX"\"Dolby Cockpit Sounds FSX.exe"

 

Affinity :

  • 10 = cores 1 + 3
  • 34 = cores 1 + 5
  • 20 = 2 + 4
  • 40 = 3 + 5

 

I also use P3Dv4 Booster Live 2018 from FSPS. With that I set the FTFF Live without re-loading.

P3Dv4 Booster Live settings

  • Fair weather 80%
  • Cloudy - OC 70%
  •  
  • Fair weather Frankfurt 50%
  • Cloudy - OC Frankfurt 50%
  •  
  • Fair weather Nice - Marseille - Barcelona - Milan 70%
  • Cloudy - OC Nice - Marseille - Barcelona - Milan 70%
  •  
  • Genova 70%
  • London 60%
  • Paris 60%

Framerate locked at 20 with Vsyc On + TB On and my 3 HD ( 40-32-32 ) tv's at 60 Hrtz. Very smooth Sim. I can land smoothly at AS Frankfurt + FTX Germany with an OC + multiple cloud layers , fog and rain ...

Before I always wanted to have at least 23-25 fps, but 20 locked is so smooth. Mike here at the forum has it locked at 20 too and he claimed that his sim was smooth. Now that I have tried it , he was right.       

 

Share this post


Link to post
2 hours ago, GSalden said:

No Am , no HT . Core ) is the mainj thread and the other 5 cores are for terrain loading.

Here one of my 2 batch files :

@Echo off
net sess>NUL 2>&1||(powershell try{saps '%0'-Verb RunAs}catch{}&exit)
pushd "C:\Prosim737"
start /affinity 10 Prosim737.exe
timeout /T 10 /nobreak
pushd "C:\ProsimMCP"
start /affinity 20 ProsimMCP.exe
timeout /T 5 /nobreak
pushd "C:\ProsimPanel"
start /affinity 34 ProsimPanel.exe
timeout /T 5 /nobreak
pushd "C\OpusFSI"
start /affinity 20 C:\OpusFSI\FSISERVER.EXE
timeout /T 10 /nobreak
pushd "C:\IOcards\SIOC"
start /affinity 10 C:\IOcards\SIOC\sioc.exe
timeout /T 5 /nobreak
pushd "C:\Program Files (x86)\FSPS\Dolby Cockpit Sounds FSX"
start /affinity 40 C:\"Program Files (x86)"\FSPS\"Dolby Cockpit Sounds FSX"\"Dolby Cockpit Sounds FSX.exe"

 

Affinity :

  • 10 = cores 1 + 3
  • 34 = cores 1 + 5
  • 20 = 2 + 4
  • 40 = 3 + 5

 

I also use P3Dv4 Booster Live 2018 from FSPS. With that I set the FTFF Live without re-loading.

P3Dv4 Booster Live settings

  • Fair weather 80%
  • Cloudy - OC 70%
  •  
  • Fair weather Frankfurt 50%
  • Cloudy - OC Frankfurt 50%
  •  
  • Fair weather Nice - Marseille - Barcelona - Milan 70%
  • Cloudy - OC Nice - Marseille - Barcelona - Milan 70%
  •  
  • Genova 70%
  • London 60%
  • Paris 60%

Framerate locked at 20 with Vsyc On + TB On and my 3 HD ( 40-32-32 ) tv's at 60 Hrtz. Very smooth Sim. I can land smoothly at AS Frankfurt + FTX Germany with an OC + multiple cloud layers , fog and rain ...

Before I always wanted to have at least 23-25 fps, but 20 locked is so smooth. Mike here at the forum has it locked at 20 too and he claimed that his sim was smooth. Now that I have tried it , he was right.       

 

Do you lock your frames in P3D or externally?

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