This site is being deprecated.

Please see the official X‑Plane Support page for help.

0 votes
asked by (272 points)
When monitoring X-Plane with a system monitor I see that one thread and one CPU core does most of the work. I have another application that uses threads heavily (like >50 threads), and the CPU load seems to be distributed more evenly among the CPU cores. How does X-Plane distribute the load?

I could imagine that for a plane with four engines, each engine is modeled by a separate thread, as both wings are (just like ATC, GPSes, autopilot, AI pilot, etc).

What is the current state and what are the future plans?
commented by (272 points)
Things seems to have improved in 11.34, but still during loading the sim the CPUs are highly under-used.

2 Answers

+1 vote
answered by (112 points)
This one thread usage is due to the programming with OpenGL - at the time when this API was first introduced, one core writing to the GPU was more than enough. X-Plane still uses this OpenGL API. There was some discussion on the X-Plane blog about implementing Vulkan, but this re-write requires programming time/resources that are not available at this juncture.
commented by (570 points)
We just have to wait for vulkan to be implemented.
commented by (10 points)
Just to be clear, does this mean that there is no value in having a 6 cores processor instead of a 4 cores one?
commented by (112 points)
Basically, that's the situation - here I have an i7-6850k (6 cores/12 threads) whereby only 1-1/2 threads are used during flying. At initial loading, all 12 threads are more-or-less occupied. As long as your machine isn't GPU limited, the way to get better frame rates is to increase the CPU clock.
+1 vote
answered by (39 points)
edited by
In the Intel scheme, each "core" is an actual CPU chip with all its own hardware to process its own instructions, and each has some working memory, too. All your cores share access to the same memory and I/O. My desktop has an Intel i7, which is 4 separate CPU chips on a single heat-sink.

In C and Java programming, a "thread" is set of functions. Each thread can run independently, however this is not based on the "core" that houses it, but on the function that started it and expects its output. Each thread will have its own memory resources, especially a stack and some fixed variables. Your program will usually have one thread to manage the overall logic of your program, and another thread to respond to your input events and process its output.

A "process" is a program that performs a function. In my Windows desktop, each of the 4 cores in my Intel i7 will run 2 processes each,for a total of 8. But one of these processes is a core allocation manager, which dynamically picks which of the 7 processes to do each job that comes up. For example, Corel Painter keeps all 7 processes busy, and balances them pretty well, and it doesn't matter which part of painting is done by which process. The processes rarely hit 100% busy, and the cores rarely hit 100 degrees C. The sharing algorithm is planned by the software engineers, using a strategy that makes sense to them.

Your graphics GPU card is designed to process the graphics (doh!) by converting 3D scenes to 2D projections, dynamically, repeatedly, and fast. The architecture is designed to process many objects in parallel, so it works well with a lot of similar info. It takes commands from all your cores, all your processes, and all your threads. In X-Plane, I guess this is managed by the Open-GL system, although it starts with the programmer's strategy.

So you see, asking for "more cores" or "more threads" or "more cards" always depends on what each of those things do well in the environment. The hardware is easy to buy. To take advantage of them, you need the skills, experience, and resources to design the strategy. And every problem can be solved with more people, more time, and more money.
...