Jump to content
Sign in to follow this  
dukeav

Traffic Optimizer for P3D

Recommended Posts

Mark,

 

It took me a while to figure out why you were getting an "odd" result with very low AI aircraft settings in the Air Traffic Manager. The ATM when set at a low number like 1 or 2 keeps killing AI in the user bubble, but the user aircraft bubble engulfs new schedules faster than the ATM can delete AI. The behavior is perfectly normal.

 

Jay

Thanks. I tried it again today sitting on the ground at EGLL. It worked quite well when I chose 10 AI, particularly since most of the deletions were in the air where the AI is useless to me (sorry AI pilots, nothing personal). 

 

I see how the program would be quite useful at smaller airports where one could perhaps crank up the AI slider like Pete describes and use ATM to keep the AI at a consistent figure (I have a 4k monitor, PMDG, Orbx, etc., so my overhead is low). 

 

BTW, everyone knows this of course, but AI traffic is a major FPS hog.  I experimented at EGLL without ATM. Every 5 percentage point increase in the AI traffic slider above the 20% level decreased my FPS about 10%. I see a lot of posts from people complaining about stutters when landing at big airports. My first advice would be to turn down or off AI traffic (both ground and air) or use this tool to limit the numbers.

Share this post


Link to post

I guess that we are presently stuck with the present level of performance hit induced by both AI traffic and autogen buildings. P3d 2.2 saw autogen tree placement moved to the GPU and a refinement in tree memory usage:

 

http://www.prepar3d.com/wp-content/uploads/2014/03/AutogenDevBlog.jpg

 

P3d will now use as many processors as are available to load scenery. But the maintenance of AI traffic and schedules and the placement of autogen buildings is still being done by the CPU core that is running the main thread. With a lot of complex AI aircraft models and buildings to draw, the performance is bottlenecked by the main thread (usually on CPU0 unless one tinkers with the AM).

Share this post


Link to post
Guest

AI traffic isn't "batched" and conceptually could never be batched because they move (not a static position) and need "some" awareness of each other (line up and wait) ... this means they will always be CPU dependent.  I use the word "CPU dependent" loosely since what we're really talking about is draw calls initiated by the CPU which are still handled by the GPU.  Same goes for the injection of other dynamic objects ... much the same issue.

 

Other tricks can be used to reduce draw calls, but when it comes to AI and their dynamic nature, such tricks would not work.

 

But I seem to recall reading some time ago that AI is threaded and loads are distributed across CPUs, however, they are still bound by synchronization (main thread, usually coreo) in order for them to move thru the virtual world in a realistic manner.

 

If you are into lots of AI traffic at airports only, this tool works well, can help FPS and VAS.

 

I guess I'm one of the few that actually likes to see other aircraft going to/from on the same airway(s) as my flight plan ... kinda nice to see the closure speeds enroute and hopefully verifies I'm at the correct airway altitude ... I typically like to fly with 10-15% AI (using MT6 schedules), just enough to provide additional realism but not so much as to bring performance drastically down.

 

I've tried AI traffic at 50% or higher (with MT6 schedules) at a busy airport and I personally don't see how you folks don't get frustrated with having to wait an hour or more for clearance?  But to each his or her own.

 

Either way, this is a great tool to have ... IMHO, it should incorporated into the core P3D AI settings and we should have the same options as we do with this very handy tool.

 

Cheers, Rob.

Share this post


Link to post

But I seem to recall reading some time ago that AI is threaded and loads are distributed across CPUs, however, they are still bound by synchronization (main thread, usually coreo) in order for them to move thru the virtual world in a realistic manner.

 

I'd be interested to see where you read that if you can find it again. I looked on the LM forums/blog and there's nothing there about it, but maybe I used the wrong keywords. In any case, even if other cores are used for AI traffic (like scenery loading) the main thread still does keep track of all the AI (again, just like scenery loading). As long as one core keeps getting maxed, it will be tough to make major improvements in performance.

 

My point about offloading tasks to the GPU is that other parts of the P3d code use CUDA to do CPU-like calculations and the more of this the better. Intel CPUs are not improving in efficiency fast enough to keep up with software needs.

Share this post


Link to post

 

AI traffic can be a FPS killer at even moderate settings. This situation has not changed much since FSX. Many of us like to decent amount of traffic around, but this finally becomes a tussle between volume and FPS.
 
To help this situation I have written a program which automatically tries to manage the traffic. The logic is pretty simple, you give the program a target number of AI aircraft, by default 150. Every 60 seconds the program will check how many AI Aircraft are there and then it will delete AI Aircraft above this number. Aircraft farthest from your aircraft are deleted first, so traffic around you should remain largely unchanged. 
 
You can change the target number to your choice based upon your hardware.
 
Traffic Settings within P3D:
You should set the the traffic density in P3D to something which gives you decent traffic around you. For example I use MyTraffic, so I set the density to 35%, which I think reflects RW traffic. In my situation my FPS goes from ~12 to ~18 with this program in KJFK.
 
How to use:
Start P3D, let it come up fully
Start AirTrafficManager.exe
"Check" the "Auto Optimize" check-box
 
The first clean-up will happen 15 seconds after you check the check-box, and after 10-15 seconds of that you will notice your FPS increase.
 
I have not programmed in VB.Net for ages, so if you are going to try this out then you are a beta-tester :)
 
Notes:
1. This program runs separately from P3D so hopefully will not crash it.
2. If you get a message in the console saying unable to connect to P3D, please re-start AirTrafficManager.
3. Although the check for AI Aircraft is done every 60 seconds, the clean-up happens 15 seconds after the 60 seconds
 
Requirements:
1. P3D v2.3
2. FSUIPC
 
Acknowledgements:
1. Uses the FSUIPC Client DLL for .NET by Paul Henty

 

Does this work on P3D V3?


Intel I7 6700 4.0 CPU Western Digital Caviar 1TB SATA 6.0Gb/s Hard Drive  16GB DDR4 Crucial RAM. Corsair 750 Watt PSU.

EVGA NVIDIA GTX1080 FTW GPU

Share this post


Link to post
Guest

I'd be interested to see where you read that if you can find it again. I looked on the LM forums/blog and there's nothing there about it

 

I don't believe it was LM information ... "I think" this was going back to Phil Taylor days of FSX SP2 (I don't how much has changed in regards AI traffic in P3D but I would assume the threading code would still be in place).  Tried to locate the info, but can no longer find it ... even searched Phil's blogs here.

 

I don't think CUDA would be of much benefit for AI aircraft.

 

Cheers, Rob.

Share this post


Link to post

If you are into lots of AI traffic at airports only, this tool works well, can help FPS and VAS.

 

I guess I'm one of the few that actually likes to see other aircraft going to/from on the same airway(s) as my flight plan ... kinda nice to see the closure speeds enroute and hopefully verifies I'm at the correct airway altitude ... I typically like to fly with 10-15% AI (using MT6 schedules), just enough to provide additional realism but not so much as to bring performance drastically down.

 

I like lots of traffic both at airports and in the air. This is the only reason I'm currently sticking with FSX-SE for my 737 cockpit flying. On my VFR (Piper Arrow) cockpit I'll be using P3D for sure. Needs re-commissioning at present.

 

With FSX-SE and MT6 at 40% PLUS UT2 (the latter because I like to see aircraft on the airways -- generally BGL-made traffic flies direct, not via airways) I still get good usable frame rates and no VAS problems even at heavy airports like Aerosoft EGLL. I cannot do that with P3D.

 

I do use Traffic Optimizer, but the limit is 200 -- gives me realistic levels for EGLL. Without that limit I would get nearly 700 AI being generated, most of which you cannot see.

 

The automatic loading of the flight plan by the Optimiser is good as it ensures traffic at both departure and destination airports.

 

I've tried AI traffic at 50% or higher (with MT6 schedules) at a busy airport and I personally don't see how you folks don't get frustrated with having to wait an hour or more for clearance?  But to each his or her own.

 

Don't have to wait for clearance with ATC programs (I'm using ProATC/X at present, used to use Radar Contact). The main wait is the queue at the runway hold. but by the time I get there it has rarely built up to more than 3 in front of me. The longer I dally at the gate, the more it might build up.

 

When I fly with my friend Ray, he's not so patient as me, so we have to use a button assigned to the "Traffic Zapper" to remove some of those ahead of us! ;-)

 

I hope one day I can fly P3D with all the traffic I like, but I think optimizing this area will not be a priority item for L-M.

 

Pete


Win10: 22H2 19045.2728
CPU: 9900KS at 5.5GHz
Memory: 32Gb at 3800 MHz.
GPU:  RTX 24Gb Titan
2 x 2160p projectors at 25Hz onto 200 FOV curved screen

Share this post


Link to post

 

 


Correct but has a lite version switch of some sort

 

No it doesn't

Share this post


Link to post

I don't believe it was LM information ... "I think" this was going back to Phil Taylor days of FSX SP2 (I don't how much has changed in regards AI traffic in P3D but I would assume the threading code would still be in place).  Tried to locate the info, but can no longer find it ... even searched Phil's blogs here.

 

I don't think CUDA would be of much benefit for AI aircraft.

 

Cheers, Rob.

You are part of P3D Beta Tester right? Maybe you can tell LM they should focus on optimizing Ai Traffic. The impact is too huge.

  • Upvote 1

Share this post


Link to post

With FSX-SE and MT6 at 40% PLUS UT2 (the latter because I like to see aircraft on the airways -- generally BGL-made traffic flies direct, not via airways)

 

I could be wrong about this but doesn't another freeware addon, AI Controller:

 

http://www.avsim.com/topic/462339-ai-controller-14-sid-jet-route-star-and-final-approach-new-beta/page-56#entry3270409

 

have an option to make AI aircraft fly real world routes? The main purpose of the addon is to force AI aircraft to follow SIDs and STARs, but it does also have an option for AI to follow high altitude airways. I can't vouch for whether it really works or not, because it requires careful observation to figure that out.

Share this post


Link to post
Guest

 

 


Maybe you can tell LM they should focus on optimizing Ai Traffic.

 

Anyone can provide feedback to LM here ... I highly recommend people post there for feature requests.  I have provided LM my 2 cents in regard to this topic.

 

 

 


The longer I dally at the gate, the more it might build up.

 

I'm probably just slow to depart, usually takes me 15-30 min before I do push back when I do a "planned" flight ... by then taxi-ways are full and the approaches are a constant stream of aircraft ... eventually everything "normalizes" but that's usually after 60-90 minutes.  

 

Cheers, Rob.

Share this post


Link to post

I could be wrong about this but doesn't another freeware addon, AI Controller

have an option to make AI aircraft fly real world routes?

 

Yes, it probably does. i do have that program installed, but it seems to need a lot of configuration and data installing, or at least converting from AIRAC information. If it could use AIRAC data directly for SIDs and STARS it would be super. But otherwise it's finding the time to do it all for the airports I use. Maybe then airways too ...

 

 

I'm probably just slow to depart, usually takes me 15-30 min before I do push back when I do a "planned" flight ... by then taxi-ways are full and the approaches are a constant stream of aircraft 

 

Hmm. Takes me 15-30 minutes too. but I don't see an inordinate build-up of traffic. Certainly not at EGCC, my home airport. Can be 3 or more queuing at the runway hold at EGLL. The taxiways don't get chock-a-block either, but I applied the fix for AI taxi speeds so they move at 20-25 like me. Don't recall where I got that from.  Maybe there's one for P3D?

 

Pete


Win10: 22H2 19045.2728
CPU: 9900KS at 5.5GHz
Memory: 32Gb at 3800 MHz.
GPU:  RTX 24Gb Titan
2 x 2160p projectors at 25Hz onto 200 FOV curved screen

Share this post


Link to post

I'd be interested to see where you read that if you can find it again. I looked on the LM forums/blog and there's nothing there about it, but maybe I used the wrong keywords. In any case, even if other cores are used for AI traffic (like scenery loading) the main thread still does keep track of all the AI (again, just like scenery loading). As long as one core keeps getting maxed, it will be tough to make major improvements in performance.

 

My point about offloading tasks to the GPU is that other parts of the P3d code use CUDA to do CPU-like calculations and the more of this the better. Intel CPUs are not improving in efficiency fast enough to keep up with software needs.

With P3D the main thread is just the renderer, that's not talking directly with the threads doing the AI, the physics and logic all go through a thread coordinator and events handling thread. These threads all move onto other available cores/LPs in accordance with the affinity attributable to the app. It's possible that the AI can be moved out onto more specific threads and hence cores/LPs in future.


Steve Waite: Engineer at codelegend.com

Share this post


Link to post

34 pages about getting this unsupported program working and yet folks seem unaware of Super Flight Board which aside from displaying your departing and arriving Ai also can dynamically reduce your Ai levels as well as enforcing traffic arrival distances.

Well worth a look if you have a networked PC to run it on.

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