Board index FlightGear Support Flying

Monitor System Performance Zeros

Controlling your aircraft, using the autopilot etc.

Monitor System Performance Zeros

Postby William » Thu Mar 11, 2021 1:53 pm

Hello all,

While investigating slight stutter on a fair PC (i7, GTX780), I want to monitor system performance.

When running Debug:Monitor System Performance it shows mainly zeros.

What can be done to get more relevant output ?

Cheers
William
William
 
Posts: 23
Joined: Thu Mar 11, 2021 1:32 pm
OS: W7

Re: Monitor System Performance Zeros

Postby zakalawe » Thu Mar 11, 2021 2:35 pm

'Cycle on-screen statistics' will show rendering information: use it twice or three times to see spikes in drawing. Of course if the stutter is systems/simulation/Nasal, this won't show it.
zakalawe
 
Posts: 1259
Joined: Sat Jul 19, 2008 5:48 pm
Location: Edinburgh, Scotland
Callsign: G-ZKLW
Version: next
OS: Mac

Re: Monitor System Performance Zeros

Postby Hooray » Thu Mar 11, 2021 3:27 pm

William wrote in Thu Mar 11, 2021 1:53 pm:What can be done to get more relevant output ?


Several options:

- don't use the built-in GUI dialog to display the performance monitor, instead use the property browser to enable the performance monitor and then use the property browser and/or Phi (mongoose) to browse those stats - otherwise, the stats will be heavily affected by the PUI graphics engine and the Nasal overhead
- use nvidia nsight
- compile with google perftools support: https://sourceforge.net/p/flightgear/co ... 2560/#5802
- use oprofile (on Linux)
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Monitor System Performance Zeros

Postby William » Thu Mar 11, 2021 3:48 pm

Thanks a lot !
Ill try the suggestions and report back later
Cheers,
W
William
 
Posts: 23
Joined: Thu Mar 11, 2021 1:32 pm
OS: W7

Re: Monitor System Performance Zeros

Postby William » Fri Mar 12, 2021 3:10 pm

No luck yet.
- Configured PM in property browser, but cant find where output goes: any idea where stats are in Phi ?

Other suggestions
- Nvidia nsight seems incompatible with Windows 7 combined with GTX780 card (I know, its old, like it that way)
- Oprofile: Ill try some Windows alternatives
- Recompiling is not within my experience

Cheers, William
William
 
Posts: 23
Joined: Thu Mar 11, 2021 1:32 pm
OS: W7

Re: Monitor System Performance Zeros

Postby Hooray » Fri Mar 12, 2021 4:10 pm

Browse to /sim/performance-monitor, enable the performance monitor by toggling the "enabled" property.
Next, a corresponding "subsystems" entry will show up that lists all subsystems underneath.

See: https://wiki.flightgear.org/Howto:Using ... ty_browser
(and please feel invited to edit/improve the article by adding your own instructions/screen shots)

There's also a Canvas based dialog available that can be modified to show the same stats (without going through PUI):
https://wiki.flightgear.org/Howto:Reset ... leshooting

Image


Alternatively, consider using Phi and/or telnet.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Monitor System Performance Zeros

Postby Octal450 » Fri Mar 12, 2021 10:51 pm

William wrote in Thu Mar 11, 2021 1:53 pm:While investigating slight stutter on a fair PC (i7, GTX780), I want to monitor system performance.


Interesting WIlliam, I have the same problem since many months.

i7 4790k and GTX780. Here is what interesting, I just updated proc from i5 3570 to i7 4790k, and later also the WIndows from Window 7 to Window 10 20H2 (clean instal both times, when updating and when I got new proc). Seems all of that did not affect it at all - seems something with the graphics card. That we both have the same card with that issue is interesting. For me, downgrading the GPU driver to one I used a long time ago (365.19) made no improvements. I've been looking into that aswel.

Kind Regards,
Josh
Skillset: JSBsim Flight Dynamics, Systems, Canvas, Autoflight/Control, Instrumentation, Animations
Aircraft: A320-family, MD-11, MD-80, Contribs in a few others

Octal450's GitHub|Launcher Catalog
|Airbus Dev Discord|Octal450 Hangar Dev Discord
User avatar
Octal450
 
Posts: 5601
Joined: Tue Oct 06, 2015 1:51 pm
Location: Huntsville, AL
Callsign: WTF411
Version: next
OS: Windows 11

Re: Monitor System Performance Zeros

Postby V12 » Sat Mar 13, 2021 5:07 am

I observed similar periodical stuttering on all FG version after 2019.2 even with UFO.
Fly high, fly fast - fly Concorde !
V12
 
Posts: 2757
Joined: Thu Jan 12, 2017 5:27 pm
Location: LZIB
Callsign: BAWV12

Re: Monitor System Performance Zeros

Postby Hooray » Sat Mar 13, 2021 9:33 am

if you think it might be related to your graphics card/drivers, the first step should be running different OpenGL benchmarks and OpenGL-based games to see if you can reproduce the issue or not.

Only after that, I'd look at FlightGear. Specifically, try the minimal startup profile (draw masks set) and try disabling Nasal entirely. And then take it from there step by step by re-adding more and more bits.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Monitor System Performance Zeros

Postby William » Sat Mar 13, 2021 7:02 pm

Some config info
MSI-Z97, i7-4790, 32Gb DDR3, Evo-970, GTX-780
Nvidia setting: Performance

Benchmarked with Heaven
- fullscreen, AA=2x, Tess=off, High Quality => stutter observed when objects are closing in
- Medium Quality => hardly any stutter observed when objects are closing in

FG:
Changed settings and observed stutter vs image quality
1) minimum settings: NoALS, No3D, 5000 tiles, Quality=1, Objects disabled, LOD ranges default, Basic weather => no glitches, but average visuals
via average settings where Quality=3 downto
3) maximum settings: ALS, 3D, 10000 tiles, Quality=5, Objects enabled, LOD ranges default, Advanced weather => sure: stutter and great visuals

While tuning noticed GPU ran at 100%, this coincided with stutter

To narrow down:
Quality=5 > GPU 100%, stutter
Quality=3 > GPU ~ 70%, rather smooth

Noticed ALS and 3D Clouds can impact performance, but for in this config stutter seems mainly caused by the quality setting.
Have not tried all combinations of settings of course,

Choking the GPU seems to result in stutter.

Cheers, William
William
 
Posts: 23
Joined: Thu Mar 11, 2021 1:32 pm
OS: W7

Re: Monitor System Performance Zeros

Postby Johan G » Mon Mar 22, 2021 11:40 am

Regarding periodical stuttering I have from time to time seen the suggestion to throttle the framerate (Main Menu > View > Rendering Options > Throttle frame rate). I have set mine to 25 Hz and get quite smooth framerate with it.
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Some YouTube videos
Johan G
Moderator
 
Posts: 6634
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: Monitor System Performance Zeros

Postby Octal450 » Thu Apr 01, 2021 2:13 am

Hmm - I have no 100% and I get stutter. Weird. I'll tray that suggestion Johan. Seems scenery related perhaps...

Kind Regards,
Josh
Skillset: JSBsim Flight Dynamics, Systems, Canvas, Autoflight/Control, Instrumentation, Animations
Aircraft: A320-family, MD-11, MD-80, Contribs in a few others

Octal450's GitHub|Launcher Catalog
|Airbus Dev Discord|Octal450 Hangar Dev Discord
User avatar
Octal450
 
Posts: 5601
Joined: Tue Oct 06, 2015 1:51 pm
Location: Huntsville, AL
Callsign: WTF411
Version: next
OS: Windows 11

Re: Monitor System Performance Zeros

Postby V12 » Fri Apr 02, 2021 6:31 am

I had very similar experience. I did not found solution how to eliminate that periodical stuttering with around 1 Hz freqency.
Fly high, fly fast - fly Concorde !
V12
 
Posts: 2757
Joined: Thu Jan 12, 2017 5:27 pm
Location: LZIB
Callsign: BAWV12

Re: Monitor System Performance Zeros

Postby Hooray » Fri Apr 02, 2021 9:41 am

I'd suggest to approach this step by step:

If it's scenery/terrain related, the issue should not persist once you have disabled scenery and/or set the draw masks to hide the terrain - or simply have flown to a location without any scenery at all (sea/ocean).

One brute force method to start narrowing down whether this is Nasal related is renaming the Nasal folder under $FG_ROOT and if that improves/removes stuttering completely, the next step would be restoring the Name and begin renaming individual scripts there to see if you can identify any particular script to cause the stuttering. Obviously, it makes sense to ensure first of all that the issue is not specific to any particular aircraft, e.g. by using an aircraft without any of its own Nasal modules (think ogel, ufo, santa etc).

That way you can ensure that primarily $FG_ROOT/Nasal provides scripts to run.

Alternatively, you could patch/rebuild fgfs to enable additional Nasal diagnostics - for instance, Richard has added dedicated logging to log various stats to the console related to the garbage collector, as well as to different timers and listeners invoking Nasal callbacks.

You can also find a rather simple patch on the wiki to disable Nasal entirely at the SGSubsystemMgr level.

While this will basically give you a "broken" fgfs session (without any Nasal scripting whatsoever), continuing to see stuttering in that mode would be a pretty clear indicator that stuttering is unrelated to Nasal, whereas seeing it disappear entirely would suggest that looking more closely at Nasal timers, listeners and the garbage collector would make sense.

Obviously, people who are familiar with patching/rebuilding fgfs could also just as well run dedicated profilers to see for themselves whether the stuttering they're seeing is related to code triggered by Nasal scripting or not.

Here's a comparison between two different startup profiles, one running with very little Nasal code, and the other running with the Nasal/Canvas based FG1000 MFD instrument:

https://wiki.flightgear.org/Understandi ... erformance
Image

Image

Instructions on disabling Nasal entirely can be found here: https://wiki.flightgear.org/Howto:Disab ... l_entirely
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU


Return to Flying

Who is online

Users browsing this forum: Dean and 3 guests