Board index Other Hangar talk

Microsoft Flight Simulator, a small graphics study

Talk about (almost) anything, as long as it is no serious FlightGear talk and does not fit in the other subforums.
Forum rules
Please refrain from discussing politics.

Re: Microsoft Flight Simulator, a small graphics study

Postby wkitty42 » Sun Jun 23, 2019 10:52 pm

how's your memory consumption?
also which craft?
there are a few known problems with timers being instantiated over and over which will lead to slowdowns... this has been a craft-side problem in some cases... FG-side some time back when it was a problem with the particle system...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 5694
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: Microsoft Flight Simulator, a small graphics study

Postby Thorsten » Mon Jun 24, 2019 5:18 am

Or another example - I have 45 and more fps, but there are still visible and annoying frame pauses. Something is wrong in the rendering pipeline.


It would seem you do not know what the rendering pipeline is in the first place, because the rendering pipeline executes the same tasks over and over frame by frame and conceptually can not produce delayed frames.

The OSG model loader can though, texture mapping can, poorly designed aircraft systems can,...

IMHO, FGFS needs multithreaded core, rendering, nasal, weather.


... and you know that because?

FYI, you can multi-thread both the CPU part of rendering (just set the config flag) or Nasal (use thread.newthread() ). However, multi-threading has a synchronization problem - at one point you need to exchange variables in a consistent way, so you need to hold all threads till the slowest thread is ready to synchronize before entering the next step - combined with the actual time to synchronize, in practice that may actually be slower than single-thread computations - which is why I use thread.newthread() sparingly and only for tasks which do not require sync while they compute.

Erik has tested a while ago whether it is possible to run FG with 60 fps steady and no frame delays - he found that on his machine this was quite possible, just not with all options maxed out. I likewise can usually run FG without frame delays (well, short of loading 16k earth hires textures for the first time) at 60 fps on a gaming laptop (last year's release really made significant progress with canvas efficiency).

So usually you're looking at either an overworked hardware or sub-optimally designed aircraft systems - Richard has done some nice tests and optimizations for the F-15 systems as a proof of concept lately.
Thorsten
 
Posts: 11045
Joined: Mon Nov 02, 2009 8:33 am

Re: Microsoft Flight Simulator, a small graphics study

Postby V12 » Mon Jun 24, 2019 6:17 am

wkitty42 wrote in Sun Jun 23, 2019 10:52 pm:how's your memory consumption?
also which craft?
there are a few known problems with timers being instantiated over and over which will lead to slowdowns... this has been a craft-side problem in some cases... FG-side some time back when it was a problem with the particle system...


Memory consumption is not problem, in case of short flight for example LZIB - LOWI or EDDF - LOWI FG uses 8-10 GB from physics 16 GB. Problem is visible on 707, IDG 3xx, Concorde, 777, 737-800 YV, DHC6, 747-8i, Constellation and UFO too, but very little. I did not tested other planes.

Thorsten wrote in Mon Jun 24, 2019 5:18 am:
IMHO, FGFS needs multithreaded core, rendering, nasal, weather.

... and you know that because?


Because of viewtopic.php?f=37&t=35661&p=346537&hilit=threadripper#p346497. GPU waiting for in theory extremly powerfull CPU, but in reality with full load only on 1 core. Or on my (not extreme powerfull machine) CPU i5 2550K (physical quad core / quad thread, no hyperthread) at 40-50%, GPU at 60-70%, memory usage 8GB from 16GB without swap (swapon -s returned 0 usage of swap partition or file).
Or I have 45 and more fps, but rendering is choppy, jerky with many random significant frame pauses.
Last edited by V12 on Mon Jun 24, 2019 7:29 am, edited 1 time in total.
Fly high, fly fast - fly Concorde !
User avatar
V12
 
Posts: 1554
Joined: Thu Jan 12, 2017 4:27 pm
Location: LZIB
Callsign: BAWV12

Re: Microsoft Flight Simulator, a small graphics study

Postby Thorsten » Mon Jun 24, 2019 7:25 am

GPU waiting for in theory extremly powerfull CPU, but in reality with full load only on 1 core.


And that is the rendering pipeline and not some other computation or a driver issue because?
Thorsten
 
Posts: 11045
Joined: Mon Nov 02, 2009 8:33 am

Re: Microsoft Flight Simulator, a small graphics study

Postby V12 » Mon Jun 24, 2019 7:30 am

And who will preform that computation ? GPU / CPU or something another ? Badly optimized driver will overload CPU, this was good known ATI/AMD problem some years ago.
In my case - other software have not that issue => it should not be a driver related problem...
Fly high, fly fast - fly Concorde !
User avatar
V12
 
Posts: 1554
Joined: Thu Jan 12, 2017 4:27 pm
Location: LZIB
Callsign: BAWV12

Re: Microsoft Flight Simulator, a small graphics study

Postby Thorsten » Mon Jun 24, 2019 7:38 am

You didn't name your case as evidence though, you linked a thread where a driver issue is definitely in the cards.

Also, obviously a driver issue is also related to the software that uses it for rendering - driver developers test their stuff on some software, and we may safely assume that it passes the tests before it gets released.

But here's the thing - several people (including myself at some point) have done detailed benchmark tests measuring execution speed, frame delays of some subsystem,... We absolutely love when someone points at a random subsystem and without any test data declares it the culprit for his trouble and without a look at the code knows what the solution should be.

I really wish I could debug problems by just knowing! *sarcasm*
Thorsten
 
Posts: 11045
Joined: Mon Nov 02, 2009 8:33 am

Re: Microsoft Flight Simulator, a small graphics study

Postby wkitty42 » Mon Jun 24, 2019 4:07 pm

V12 wrote in Mon Jun 24, 2019 6:17 am:
wkitty42 wrote in Sun Jun 23, 2019 10:52 pm:how's your memory consumption?
also which craft?
there are a few known problems with timers being instantiated over and over which will lead to slowdowns... this has been a craft-side problem in some cases... FG-side some time back when it was a problem with the particle system...


Memory consumption is not problem, in case of short flight for example LZIB - LOWI or EDDF - LOWI FG uses 8-10 GB from physics 16 GB. Problem is visible on 707, IDG 3xx, Concorde, 777, 737-800 YV, DHC6, 747-8i, Constellation and UFO too, but very little. I did not tested other planes.

i was asking mainly to see if you could (re)test and determine if there was timers or similar being allocated over and over and over thus eating more memory and introducing more work to be done per frame... what you are seeing is certainly not a rendering pipeline problem... it is before that even comes into play...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 5694
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: Microsoft Flight Simulator, a small graphics study

Postby V12 » Mon Jun 24, 2019 5:06 pm

This is short video with test flight IDG Bus 320 from Innsbruck to Frankfurt and back.



As You can see, CPU load hit 50% only for few seconds, GPU load hit 70% too only some few seconds, but fps is very low. PCIe utilization after all GPU local memory allocation is very low too. IMHO, this is clear evidence that FG needs multithread. Test platform :
i5 2550K, 16 GB RAM, nVidia GTX750 Ti 2GB, LUbuntu 18.04 with installed all updates.
Fly high, fly fast - fly Concorde !
User avatar
V12
 
Posts: 1554
Joined: Thu Jan 12, 2017 4:27 pm
Location: LZIB
Callsign: BAWV12

Re: Microsoft Flight Simulator, a small graphics study

Postby Thorsten » Mon Jun 24, 2019 6:11 pm

As You can see, CPU load hit 50% only for few seconds, GPU load hit 70% too only some few seconds, but fps is very low. PCIe utilization after all GPU local memory allocation is very low too. IMHO, this is clear evidence that FG needs multithread.


Aka, because we're not even using one CPU with 100%, you propose to add more CPUs to the fray (so that they can be even less used?),

The logic behind that conclusion surely defeats me - I'd assume if neither CPU nor GPU saturate you're in some power-saving mode. But that's only me...
Thorsten
 
Posts: 11045
Joined: Mon Nov 02, 2009 8:33 am

Re: Microsoft Flight Simulator, a small graphics study

Postby Richard » Mon Jun 24, 2019 7:10 pm

V12 wrote in Mon Jun 24, 2019 5:06 pm:This is short video with test flight IDG Bus 320

IMHO, this is clear evidence that FG needs multithread. Test platform :


Alas not really clear evidence, because it's not that simple.

Those percentage numbers for the GPU aren't really that useful; because the GPU is really too complex to represent as a simple percentage; even though the GTX 750 is a low end card it's still quite complex - so it could be the GPU memory bandwidth, the render output processors, comparatively narrow memory bus (128 bit) or the lack of texture mapping units that is impacting the frame rate; and yes there are things that could be developed inside FG to make the rendering more efficient for lower end GPU's - but fundamentally it is almost certainly because there is too much geometry/texture/shading that is causing the frame rate to be limited to what the GPU can do.

I'd estimate that on the F-15 there is only a maximum of 5ms that could be obtained by having a fully multi threaded FG - and realistically this isn't going to be worth the amount of development effort.

The problem is that OpenGL is fundamentally single threaded, although OpenGL does support multi threading it doesn't really gain much because of the driver architecture; and because of this there isn't much that can be gained from OSG from running in multiple threads. This is the problem that Vulkan was designed to fix and until FG supports Vulkan (which is years of work) there is no benefit to be had from multiple CPU's.

The solution to low frame rates is simply to buy a better GPU; if you can afford it. If you can't afford a better GPU then you'll have to turn down the graphics detail or use less demanding aircraft to get decent framerates.

I made a short video to try to explain this


I'd be interested to see a video of the same thing on your hardware with the latest F-15 and see what sort of frame rates you're getting
Last edited by Richard on Tue Jun 25, 2019 6:10 am, edited 2 times in total.
Richard
 
Posts: 713
Joined: Sun Nov 02, 2014 10:17 pm
Version: Git
OS: Win10

Re: Microsoft Flight Simulator, a small graphics study

Postby legoboyvdlp » Mon Jun 24, 2019 7:18 pm

Using the IDG is not a fair comparison - because a majority of that is going to be inefficient property IO in the canvas displays - a known issue that we will be resolving.
User avatar
legoboyvdlp
 
Posts: 7072
Joined: Sat Jul 26, 2014 1:28 am
Callsign: YV-LEGO
Version: 2018.3.1
OS: Windows 10 HP

Re: Microsoft Flight Simulator, a small graphics study

Postby Icecode GL » Mon Jun 24, 2019 8:01 pm

V12 wrote in Mon Jun 24, 2019 5:06 pm:This is short video with test flight IDG Bus 320 from Innsbruck to Frankfurt and back. [...] IMHO, this is clear evidence that FG needs multithread.


It's also a clear evidence of you needing a new GPU if you plan on running FG on those settings. You are capping VRAM usage, see the "Used Dedicated Memory" item. Try reducing scene complexity (reduce scenery objects, terrain visibility, more aggressive LOD, smaller cloud visibility range etc.)

You are also recording at the same time, which skews the results as the GPU has to work even more.
Icecode GL
 
Posts: 540
Joined: Thu Aug 12, 2010 12:17 pm
Location: Spain
Callsign: icecode
Version: GIT
OS: Arch Linux

Re: Microsoft Flight Simulator, a small graphics study

Postby V12 » Mon Jun 24, 2019 8:31 pm

PCIe usage is very low, there is not traffic on bus caused by texture transfer from RAM to VRAM...
Fly high, fly fast - fly Concorde !
User avatar
V12
 
Posts: 1554
Joined: Thu Jan 12, 2017 4:27 pm
Location: LZIB
Callsign: BAWV12

Re: Microsoft Flight Simulator, a small graphics study

Postby Icecode GL » Mon Jun 24, 2019 8:37 pm

Textures are loaded to VRAM just once at program startup or when new models are added to scene graph. In fact, low bus traffic is a good sign: it means FG is doing a good job at keeping CPU<->GPU transfers at a minimum during runtime.
Icecode GL
 
Posts: 540
Joined: Thu Aug 12, 2010 12:17 pm
Location: Spain
Callsign: icecode
Version: GIT
OS: Arch Linux

Re: Microsoft Flight Simulator, a small graphics study

Postby V12 » Mon Jun 24, 2019 8:46 pm

Are MS DX9 and DX10 multithreaded ?
Fly high, fly fast - fly Concorde !
User avatar
V12
 
Posts: 1554
Joined: Thu Jan 12, 2017 4:27 pm
Location: LZIB
Callsign: BAWV12

PreviousNext

Return to Hangar talk

Who is online

Users browsing this forum: No registered users and 1 guest