Jump to content
Sign in to follow this  
willy647

Affinity app

Recommended Posts

Willy, thank you so much for this, I use task manager before every flight. Did not like PL at all. This is great, thank you so much for your work and for sharing it.

Kind Regards

David.


David Murden  MSFS   Fenix A320  PMDG 737 • MG Honda Jet • 414 / TDS 750Xi •  FS-ATC Chatter • FlyingIron Spitfire & ME109G • MG Honda Jet 

 Fenix A320 Walkthrough PDF   Flightsim.to •

DCS  A10c II  F-16c  F/A-18c • F-14 • (Others in hanger) • Supercarrier  Terrains = • Nevada NTTR  Persian Gulf  Syria • Marianas • 

• 10900K@4.9 All Cores HT ON   32GB DDR4  3200MHz RTX 3080  • TM Warthog HOTAS • TM TPR • Corsair Virtuoso XT with Dolby Atmos®  Samsung G7 32" 1440p 240Hz • TrackIR 5 & ProClip

Share this post


Link to post
3 hours ago, willy647 said:

Did you run the shortcut as administrator ?  That is a must !

Hi, yes I did and it was that that was causing the problem. The add-ons concerned

worked fine if I didn't run it as Administrator but then the Affinity didn't work which

is obviously why you stated it as a requirement. Some add-ons worked perfectly

but not LINDA or VRinsight.

Thanks anyway, I'm sure a lot of people will find it really helpful.

Share this post


Link to post
2 hours ago, AnkH said:

Does this app work with executables that are started together or on demand of the simulator? E.g.: I use .bat files to set the affinity of my external addons such as ActiveSky, REX EF, ProATC/X etc. However, this does not work for UT2.exe for example, as this executable is only executed upon starting P3D and it does not work if I put the .bat file into the config. Only work-around to set an affinity for UT2 is running the .exe manually after starting P3D, but that is not convenient

It is actually creates a cmd file to start the app. So, unfortunately you will run into the same problem

  • Upvote 1

i7-7700K @ 4.9 GHz, 32GB DDR4, GTX1080, 2 x Samsung 1TB NVMe, 1 x 3TB HDD, Windows 10 Prof

Share this post


Link to post

Willy,

I have set up using you program short cuts for Pro-atc/ASp4/EF 

Question, After I load P3D v4.5 to the opening splash screen, at this point I normally open task manager/detail to set up my AM's.

I don't know how to make Chaseplane/FSDT/Simobjects and UT_live start with the AM i want as these program start with P3D, any ideas how to?

Thank you.

Edited by Nyxx

David Murden  MSFS   Fenix A320  PMDG 737 • MG Honda Jet • 414 / TDS 750Xi •  FS-ATC Chatter • FlyingIron Spitfire & ME109G • MG Honda Jet 

 Fenix A320 Walkthrough PDF   Flightsim.to •

DCS  A10c II  F-16c  F/A-18c • F-14 • (Others in hanger) • Supercarrier  Terrains = • Nevada NTTR  Persian Gulf  Syria • Marianas • 

• 10900K@4.9 All Cores HT ON   32GB DDR4  3200MHz RTX 3080  • TM Warthog HOTAS • TM TPR • Corsair Virtuoso XT with Dolby Atmos®  Samsung G7 32" 1440p 240Hz • TrackIR 5 & ProClip

Share this post


Link to post
1 hour ago, Nyxx said:

Willy,

I have set up using you program short cuts for Pro-atc/ASp4/EF 

Question, After I load P3D v4.5 to the opening splash screen, at this point I normally open task manager/detail to set up my AM's.

I don't know how to make Chaseplane/FSDT/Simobjects and UT_live start with the AM i want as these program start with P3D, any ideas how to?

Thank you.

You could use the batch file shown earlier in the thread with a longer delay set so that

all the programs have started. Start the batch file just before you load the flight. So the 

delay would be the time it takes your flights to load plus a little bit - say 130 seconds.

  • Like 1

Share this post


Link to post

BTW, the app is now in the library under download ID 215453.

James M Driskell

AVSIM Library Manager


Boeing777_Banner_Pilot.jpg

James M Driskell, Maj USMC (Ret)

 

 

Share this post


Link to post

Some exe apps are started from exe.xml and that is invoked just after SimConnect server is running, and that a few seconds before the sim starts.

We need only look at one at a time and consider what it does. If it only jumps into operation when we operate within the menus or the simulator is paused we need not worry about it.

If it springs into operation due to events in the simulation or after certain times, or constantly runs an operation alongside the simulator, then that might be a candidate for concern.

Say we have a stack of panels, switches and radios, and that is run by for argument's sake Panels.exe, and Panels.exe is installed to start up in exe.xml.

We can test that exe and see if it can run at any time and it listens for the simulator in operation and connects then. So it might work whether the sim is operational or not.

Let's suppose we have a four core no HT so we don't apply an AM to the sim we leave that to do its job. It is the same as adding AffinityMask=0 to the .cfg file which equates with the binary 1111 = AM 15 or four cores.

We can use the affinity app to start our Panel.exe in 1100 = AM 12 and see how it goes then. We remove or disable Panel.exe in exe.xml. The rightmost zeros are where we have disallowed the Panel.exe to use those cores.

With AMs we can only disallow cores or LPs.

 

Edited by SteveW
  • Like 1

Steve Waite: Engineer at codelegend.com

Share this post


Link to post

We can see that we have corralled the exe:

1111 Simulator

1100 Addon exe

This means we allow the exe only onto the leftmost two cores (core 2 and 3). These leftmost cores run the background operations of the simulator which take seconds to complete, so if we allow only sharing those cores we don't affect the throughput on the rendering of the screen, maintaining our precious fps stability.

Generally the system will attempt to avoid busy places with other processes, but that doesn't meant it knows that the sim is a busy place at any time. So we provide the partition and that way we can be sure of our result. We need only do this process if we can make a better result.

  • Like 1

Steve Waite: Engineer at codelegend.com

Share this post


Link to post
13 hours ago, Nyxx said:

I don't know how to make Chaseplane/FSDT/Simobjects and UT_live start with the AM i want as these program start with P3D, any ideas how to?

These programs are probably  launched from the exe.xml.

Simple solution is to take them out of the exe.xml and use the app to created shortcuts. But then you will have to start them manually one by one 😞

Next you could look at the shortcut properties and copy the 'target' into a bat file. Make a shortcut to that bat file and run it as admin. Now add P3D to that same bat file and you are ready to go.

 

  • Like 2
  • Upvote 1

i7-7700K @ 4.9 GHz, 32GB DDR4, GTX1080, 2 x Samsung 1TB NVMe, 1 x 3TB HDD, Windows 10 Prof

Share this post


Link to post
16 hours ago, Nyxx said:

I don't know how to make Chaseplane/FSDT/Simobjects and UT_live start with the AM i want as these program start with P3D, any ideas how to?

With my method, the affinity of any process of you choice is set once it is in memory whatever the way it is launched. No need to restart anything.

  • Like 1

Share this post


Link to post
On 12/9/2019 at 9:08 PM, CoolCaptain said:

Personnally, I successfully use a small batch file in witch there are Powershell commands setting the affinity for each EXE process once P3D is launched (SODE, Linda, Couatl, etc...).

Here follows an example:

@echo off

ping 127.0.0.1 -n 60 >nul       -->          Waiting 1 mn for all P3D addons launched

PowerShell "$Process = Get-Process Couatl; $Process.ProcessorAffinity=240"

Exit

The value must be Decimal

Could you expand on your batch file with SODE, Linda, Couatl and other entries?

I'm curious if it is possible, for example, to make AOCService.exe (invoked by FSL A320X during loading of P3D4) seat on certain LPs.. 

Thanks!

 

Share this post


Link to post

Here is my entire batch file:

------------------------------------------------------------------------------

@echo off

Start /MAX C:\P3D\Prepar3d.exe

ping 127.0.0.1 -n 60 >nul

PowerShell "$Process = Get-Process SimObjectDisplayEngine; $Process.ProcessorAffinity=128"
PowerShell "$Process = Get-Process as_audio; $Process.ProcessorAffinity=16"
PowerShell "$Process = Get-Process Linda; $Process.ProcessorAffinity=64"
PowerShell "$Process = Get-Process LRM; $Process.ProcessorAffinity=2"
PowerShell "$Process = Get-Process Couatl; $Process.ProcessorAffinity=12"

exit

------------------------------------------------------------------------------

  • Like 1

Share this post


Link to post

Do you execute the batch file manually when starting P3D or how is this executed? Thanks for clarification :-)


Greetings, Chris

Intel i5-13600K, 2x16GB 3200MHz CL14 RAM, MSI RTX 4080 Gaming X, Windows 11 Home, MSFS

Share this post


Link to post

I have created a shortcut that calls this batch file instead of Prepar3D.exe directly. I have associated the P3D icon, so the difference is not visible on the desktop.

Share this post


Link to post

Yup, that sounds similar to "my" solution. My P3D takes quiet some time for the initial startup and as such, those 60 seconds seem to be a little tight, does it matter if I increase this to 120 seconds? It should not, no?


Greetings, Chris

Intel i5-13600K, 2x16GB 3200MHz CL14 RAM, MSI RTX 4080 Gaming X, Windows 11 Home, MSFS

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