Jump to content
Sign in to follow this  
Guest

Profiling FSX via Process Monitor

Recommended Posts

Guest

I got some free time and I'm trying to determine what exactly FSX is doing while it's executing.  I started Process Monitor (64bit v3.05) and executed FSX.exe and applied filters (so that I only see what FSX.EXE is doing).

 

So the stream of data starts to get logged in Process Monitor (16,000,000+ events by the time I stopped monitoring) ... FSX is at the Free Flight screen.  I start looking at the event data and find a few interesting bits of info:

 

1.  You can copy any specific version of DX9 or DX10 (files/dlls) into the root of FSX and FSX will use that specific version rather than what's installed on your OS.

 

Examples: you can see where FSX.EXE doesn't find the DX file in the root of FSX so proceeds to get the currently installed version from the OS

http://robainscough.com/images/8bc8b037b366b4af600e2426c63ace4d.jpg

http://robainscough.com/images/8c36014d18f989fbade7ff21bcf438d3.jpg

http://robainscough.com/images/bcb244f81648771eb33f5fd8caa8e779.jpg

 

2.  Some well know Aircraft developers and Microsoft appear to be referencing fonts that may not exist on the destination computer (not a big deal, just a little sloppy).

 

http://robainscough.com/images/f1f7ca7fccc49854e361a8cfc0365a8b.jpg

 

3.  But I don't understand why FSX would be looking at my drive's root from where FSX is installed -- i.e. FSX is installed in E:\Microsoft Flight Simulator X, but I'm seeing "PATH NOT FOUND" references to E:\Scenery\Global\Texture?  This just seems like a bug - perhaps a known issue?  It should be referencing E:\Microsoft Flight Simulator X\Scenery\Global\Texture, so what is it doing and why?

 

http://robainscough.com/images/81603aa35548df3bf601aaca62289fb3.jpg

 

Anyway, lots of interesting stuff ... my goal is to try to equate FSX.CFG changes and scenery changes with real world performance.  I also noted that every single scenery add-on I have installed gets accessed regardless of display need - I think this is a know issue - but why it's important is it confirms that the more scenery you add, the slower FSX is going to operate - disabling scenery does seem help as those disabled scenery areas are no longer being looked at by FSX. 

 

I'm not specifically interested in FPS as that's less important than overall system throughput.  I'm specifically looking at FSX.EXE event durations (ms) during the course of a flight ... I've not really seen anyone or any group able to identify performance bottlenecks with a specific setting (or combination of settings) in a specific flight environment.  What I see a lot of is, person A tested this on a system and it was faster, person B tries it and no difference, person C tries it and it's slower ... in other words there is no concrete "cause and effect" being identified.

 

For example, lets say loading 4096 textures introduces stutters ... so what's actually the bottle neck/limitation, is it the IO device (SSD/HD), is it a saturated Bus, is the CPU just too busy and can't process the request, is the GPU taking to long to get the texture loaded and applied??  Process monitor alone can't do this, at least I haven't found one yet that can and log everything to a file over time (CPU,GPU,Audio,I/O,Bus, etc.).  

 

My goal is to find a way to hit the magic settings, but do it in a way that is NOT trial and error ... data flow is a balancing act ... but if you have good scales, one should be able to find the perfect balance ... now what to test on a system and one should have a repeatable formula for knowing what to set in all cases.

 

What got me interested in this process is the Affinity setting ... what I noticed is that some Affinity settings will actually saturate the bus so much (in other words the threading IS working but it's killing my bus) that HD Textures don't always load with increased blank/corrupted tiles ... it's not a problem with the performance of the SSD it's a problem with bus saturation (too fast is actually bad in this case).  So this starts my quest ... I hope to report back with more than just trial and error.

 

Rob.

 

 

 

 

Share this post


Link to post
Share on other sites

Very interesting stuff....and beyond me but I get the general intent.

 

I'll stick to designing models for fsx.


Bryan Wallis aka "fltsimguy"

Maple Bay, British Columbia

Near CAM3

Share this post


Link to post
Share on other sites
Guest

Theoretically it should be just a matter of gathering the data and doing the math (it's a finite solution with repeatable results) ... similar to how many more recent game products profile one's computer to set the appropriate graphics settings, the primary difference will be end user objects vs. preset objective.

 

Keep designing models, it's all good.

Share this post


Link to post
Share on other sites

I also noted that every single scenery add-on I have installed gets accessed regardless of display need - I think this is a know issue - but why it's important is it confirms that the more scenery you add, the slower FSX is going to operate - disabling scenery does seem help as those disabled scenery areas are no longer being looked at by FSX. 

 

I wish I downloaded some scenery manager suggested by users in another thread, that quickly disables unused sceneries. Unfortunately I can't find the discussion now. Very interesting observations, robains.

 

Dirk.

Share this post


Link to post
Share on other sites

Can't you just untick the scenery you don't use in the scenery library manager? Or use the scenery config editor app?


ASUS ROG Maximus Hero XII ▪︎ Intel i9-10900K ▪︎ NVIDIA RTX 3090 FE ▪︎ 64GB Corsair Vengeance RGB Pro ▪︎ Windows 10 Pro (21H1) ▪︎ Samsung 970 EVO Pro 1TB NVME SSD (OS Drive) ▪︎ Samsung 860 EVO 2TB SATA SSD ▪︎ Seagate 4TB SATA HDD ▪︎ Corsair RMx 850W PSU

Share this post


Link to post
Share on other sites

Can't you just untick the scenery you don't use in the scenery library manager? Or use the scenery config editor app?

 

I don't want to enter FSX to mess with the library.

 

So was it scenery config editor? If it is in FSX SDK, then it was some different custom manager.

 

Dirk.

Share this post


Link to post
Share on other sites

I wish I downloaded some scenery manager suggested by users in another thread, that quickly disables unused sceneries. Unfortunately I can't find the discussion now. Very interesting observations, robains.

 

Dirk.

 

scenery config editor http://sourceforge.net/projects/fs-sceditor/

Share this post


Link to post
Share on other sites

In perfmon you can get some information, which could log to a file.  Go to Process, then look for ID Process, then in the box below look for  FSX.  I don't see anything for video right at this moment.  Maybe there's an nvidia utility for that?  Here's nvidia utility  https://developer.nvidia.com/nvidia-perfkit


10700k / Gigabyte 3060

Share this post


Link to post
Share on other sites
Guest

Ok, making some progress ... there does indeed appear to be a relationship between the quantity of scenery areas enabled causing delays in the loading of hires textures (Photo sceneries) over the current flight area.

 

I'm finding these entries have little to no affect at all in terms of loading HiRes textures (I'm running DX10 Preview):

 

AffinityMask

TextureMaxLoad

FIBER_FRAME_TIME_FRACTION

SWAP_WAIT_TIMEOUT

TEXTURE_BANDWIDTH_MULT

LOD_RADIUS  (yes, 9.5 or 4.5 doesn't impact hires texture loading)

TEXTURE_MAX_LOAD (4096, 2048, 1024 makes no difference in texture loading either)

 

These setting may (and do) affect FPS and/or remove/add stutters, but they appear to do nothing in terms of HiRes textures loading of photoscenery.

 

I my case, I'm using FB KIAD and MSE Virginia (and West Virginia) enabled, I disabled all other 3rd party photoscenery and airports (I have a lot 250+).  While looking at Process Monitor with and without all scenery enabled I can see FSX making the FILE IO calls to "enabled" scenery that has nothing to do with the current area I'm flying (like California - opposite side of the country).  IN contrast, when ONLY Virginia is enabled, I don't see any file IO events for California (which is disabled).

 

I'm guessing there is some threshold of "enabled" areas that will put my system over the top - need to find out.

 

I need to dig more and come up with some real world video and screen shot samples to present in a more formal manner and make sure I've got my variables restricted.

 

Rob.

 

EDIT: Just want to be clear, my goal is not FPS nor avoiding OOM (but on a side note, with most scenery disabled I'm seeing less memory used).

Share this post


Link to post
Share on other sites

No,  you have just opened a "whole can of worms" by looking at FSX in Process Explorer !!

 

Why one would look for Fonts  in   C:/windows/font/fonts   is beyond me.

 

C:Windows    +  /fonts    YES

 

but not

 

C:/Windows/font  + /fonts   !!!

 

---

You will also see the dreaded  uiautomationcore.dll being called   :)

 

--

 

I sometimes get an error with FSX.. a popup  that says  "Cannot read from File",   -- STUPID error messages does not say WHAT file  ...  but so far, have failed to see that file not being able to be read in Process Explorer.

 

  The more you watch Process Explorer, the more you realize why FSX runs so slowly and inefficiently  !!

Share this post


Link to post
Share on other sites

I my case, I'm using FB KIAD and MSE Virginia (and West Virginia) enabled, I disabled all other 3rd party photoscenery and airports (I have a lot 250+).  While looking at Process Monitor with and without all scenery enabled I can see FSX making the FILE IO calls to "enabled" scenery that has nothing to do with the current area I'm flying (like California - opposite side of the country).  IN contrast, when ONLY Virginia is enabled, I don't see any file IO events for California (which is disabled).

 

 

Curious if you had any AI running? I would expect that the game would need to know if California was there to route a flight from KSFO(?) to KIAD. But I am not well versed in the finer points of AI to know if it might affect flightplans that are in use.

Share this post


Link to post
Share on other sites
Guest

Running Traffic 360 at 20% - enabled in my testing.

 

With MSE California disabled FSX just loads default ... Which is what I'm seeing. But the feature that allows one to jump into AI aircraft could be reason FSX access the scenery (default or otherwise). May also explain why AI traffic introduce such a high performance impact.

 

But to be clear on the errors process monitor is showing - these are Handled Exceptions, meaning FSX deals with error. Unhandled exceptions are the ones a user would see as FSX doesn't deal with the error (like an OOM error).

Share this post


Link to post
Share on other sites

Actually,  FSX's  typical OOM  error message is the message from a Handled Exception !

ie

On memory allocation error, throw up useless error message, and then really upset the user, by telling them,  to" just" Restart FSX , (and start their 4 hour flight all over again).

 

At the time FSX was coded,  there were not the memory intensive addons, and it seems that little consideration was given to what, at the time, was a very rare occurrence, that memory would be exhausted, (or fragmented to such a state,  that it became unusable)

 

In hindsight, this particular exception handing could probably have been code to correct the  low memory condition, and the simulator  could have continued to run.

Share this post


Link to post
Share on other sites

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