Assetto corsa CPU not normal utilization

Hello everybody, I have a problem with my assetto corsa, it's just use one core of my CPU (I7 9750h), some know how I can fix that ?
thanks
 
I think there is some misunderstanding here of what a thread is. I'll try to explain in non-programmer language, so some details and examples might be a little off, simply to make it understandable.

A thread is a piece of code (a loop in a program for example) that has to be executed. Let's say we want to do something simple such as (1 + 1). We create a thread to calculate (1 + 1). Your operating system is now informed that you made a thread to calculate (1 + 1). However, your operating system has to use the CPU for other stuff too, such as calculating all the values you see in the taskmanager that you have open in the background. There is currently no CPU core available to do your calculation.
Once your operating system thinks it has time to do your (1 + 1) calculation, it will load that thread to the CPU and tell it to execute the code (do the calculation).

Once it is done with your calculation, your operating system will now tell the CPU to continue calculating all that stuff for taskmanager. Everything I just said can be summarized in the below picture from Wikipedia:
1024px-Multithreaded_process.svg.png

This example shows thread execution on a system with one CPU core. (Yes, you can have threading with only 1 processing unit!)

Now in 2021 we of course have systems that have a lot more than just 1 CPU core, which means we can execute stuff at the same time. This is also where it gets complicated and where most of the misunderstanding of threading comes from.
For big programs such as Assetto Corsa, we can now split the program into parts that can be executed in parallel.
Assetto Corsa is split into two large, important parts and a whole bunch of small, less important parts. The two large parts are the physics (LOTS of calculations, a lot of times per second) and the main loop. The main loop is for stuff like making the buttons clickable, telling your GPU (videocard) what to draw on your screen and so on.

We can run these parts in parallel and the operating system tells the CPU when and where to execute the code for these. However, they need to be synchronized. The physics part obviously can't still be calculating my physics for turn 1 while the main loop is drawing turn 4 on my screen. One will have to wait for the other. This only gets more complicated when you split a program up into more parallel parts.

Now, these two big parts we've split the game up into, the physics and the main loop, they both create more than one thread too. However, this does not mean that these are all executed in parallel, due to some things being dependent on others being completed.
Try to set THREADS to number of cores

Found description for those
[PHYSICS_THREADING]
THREADS=-1 ; -1 = automatic , 0 = disabled , 1...N number of threads dedicated to physics
So when Andrew suggested to set the number of threads to the number of CPU cores you have, you really shouldn't. The physics engine might need WAY more than those 4, 8, 16 and so on... The key here is that threads are not necessarily executed in parallel.

In conclusion, Assetto Corsa can in theory utilize all of your CPU cores. In practice, only 1 or 2 are significantly used. A lot of the time you'll only see one, as the physics calculations take the most time and the other parts will just be waiting for the physics to be done.

This post became a bit longer than I originally envisioned, but I hope it was clear enough. :)
 
Last edited:
Upvote 0
The physics part obviously can't still be calculating my physics for turn 1 while the main loop is drawing turn 4 on my screen

Not really.
Probably a bad example but in AC physics is totally unaware of what the main (graphics) loop is doing and just goes ahead and does its things trying to hit the target of 1 step every 3 milliseconds.
The graphics main loop simply draws whatever physics info is available at the beginning of the graphical frame. So there is basically no sync point at all between the 2.
 
Upvote 0
Not really.
Probably a bad example but in AC physics is totally unaware of what the main (graphics) loop is doing and just goes ahead and does its things trying to hit the target of 1 step every 3 milliseconds.
The graphics main loop simply draws whatever physics info is available at the beginning of the graphical frame. So there is basically no sync point at all between the 2.
As said, some of the specifics were never meant to be correct, as I tried to keep the explanation simple and leave out technical specifics. I just aimed to explain why a program can have many threads, but not utilize all processing units.

But thanks for the clarification! :)
 
Last edited:
Upvote 0
Not really.
Probably a bad example but in AC physics is totally unaware of what the main (graphics) loop is doing and just goes ahead and does its things trying to hit the target of 1 step every 3 milliseconds.
The graphics main loop simply draws whatever physics info is available at the beginning of the graphical frame. So there is basically no sync point at all between the 2.
What would cause these two to be out of sync?
GPU? CPU? Or something in between?
Also, I never thought to ask before, what brand of components do you use or did use with AC?
Could something as simple as dirty power be a factor?
 
Upvote 0
I literally said "there is no sync point", it means the entire system is designed so these 2 do not have to be in sync (physics at 333Hz and graphics as fast as possible) and you ask "what would cause them not to be in sync?".
Really don't know what to tell you.
 
Last edited:
Upvote 0
Not to necro this thread, but with all the modding that is going into the graphics side of AC, has anyone really looked to see if anything can be done to increase the ability of AC to utilize multiple CPU cores? I'm definitely seeing some CPU issues on my 5900X with two cores fully saturated by AC (really large AI counts; 50+ cars at Circuit de la Sarthe for example) and my 10 remaining cores essentially unused. I mean, the obvious answer is 'no' because that would mean rewriting the fundamental code of the engine; not just wedging something on top. But, as an example, an early version of Unreal Tournament 2004(?) was so poorly optimized that running the server as a separate app, even for single-player (and thus the AI in a separate thread) nearly doubled the performance in early multi-core or multi-cpu systems that had the GPU power to take advantage of the increase CPU threading.
 
Last edited:
Upvote 0
Not to necro this thread, but with all the modding that is going into the graphics side of AC, has anyone really looked to see if anything can be done to increase the ability of AC to utilize multiple CPU cores? I'm definitely seeing some CPU issues on my 5900X with two cores fully saturated by AC (really large AI counts; 50+ cars at Circuit de la Sarthe for example) and my 10 remaining cores essentially unused. I mean, the obvious answer is 'no' because that would mean rewriting the fundamental code of the engine; not just wedging something on top. But, as an example, an early version of Unreal Tournament 2004(?) was so poorly optimized that running the server as a separate app, even for single-player (and thus the AI in a separate thread) nearly doubled the performance in early multi-core or multi-cpu systems that had the GPU power to take advantage of the increase CPU threading.
I'm sure you could invest money and rewrite parts of the game but it might cause issues with mods, custom shaders patch etc.

Also there's no reason to rewrite it. How many more copies would that sell? You can't offer a patch as a dlc...

So our best hope are CPUs with more single thread performance (5800X3D looks tasty!) or AC2 with the possibility to use AC1 mod content.

The comparison with UT 2004 lacks a little. If AC would've been developed by Epic and published by Atari with the engine aimed to be licensed for other games, then I'm sure AC would scale nicely across 8 cores and more.

But it would also probably mean that it wouldn't by anything like the sim we love...
 
Upvote 0

Latest News

What's needed for simracing in 2024?

  • More games, period

  • Better graphics/visuals

  • Advanced physics and handling

  • More cars and tracks

  • AI improvements

  • AI engineering

  • Cross-platform play

  • New game Modes

  • Other, post your idea


Results are only viewable after voting.
Back
Top