Jump to content

Under-utilization of my pc


blazen1te
 Share

Recommended Posts

I rarely hit 40% utilization on my pc even during very intensive matches with lots of ai's. Is that an issue with my pc or is that an issue with the game. It stutters constantly even in the very early game. Not sure why it's doing this.

Link to comment
Share on other sites

I am on A27.1 RC2 and this is what the consumption looks like when playing a giant 2v2 fight: 

image.thumb.png.053ea018e96aeece8346c27caa95724a.png

With A27.1, you can stress out 1 virtual core to 100% and reach smooth performance in game. However, the engine is not parallel-processed yet; the jobs are still all piled up on 1 CPU core instead of distributed out to all. 

Your 40% utilisation could be true for overall if you are dual-core, but if you are capped at 40% on each core then it's probably caused by the performance issue with Spidermonkey. 

Link to comment
Share on other sites

1 hour ago, Seleucids said:

However, the engine is not parallel-processed yet; the jobs are still all piled up on 1 CPU core instead of distributed out to all. 

Js isn't threaded but the pathfinders and other systems are you can see what the threads are doing using the web page profiler 2

 

Link to comment
Share on other sites

4 minutes ago, Stan` said:

Js isn't threaded but the pathfinders and other systems are you can see what the threads are doing using the web page profiler

Yes. But threads are not processes and ideally we can multi process all those pathfinders instead of threading them. Thread still leaves them ok the same core

Also could the simulation updates on each entity be done in parallel? That would also mean a mega performance boost

Link to comment
Share on other sites

15 minutes ago, Seleucids said:

Thread still leaves them ok the same core

No threads are dispatched on other cores by your os. That's the point :)

15 minutes ago, Seleucids said:

Also could the simulation updates on each entity be done in parallel? That would also mean a mega performance boost

Maybe but that's a very hard thing to split since there are a lot of relations to take into account and the thing you want is interaction. You need to find a way to isolate systems like the pathfinding calculations which are gathered then dispatched on multiple threads.

  • Thanks 1
Link to comment
Share on other sites

1 hour ago, Seleucids said:

But threads are not processes and ideally we can multi process all those pathfinders instead of threading them. Thread still leaves them ok the same core

That's wrong. You might have been thinking about interpreted languages which use a Global Interpreter Lock (GIL), like CPython, which results in them not being able to utilize multiple CPU cores when using threads, but that's a limitation of such languages and doesn't apply to C++.

And as a side note: Even in languages which use a GIL, multiple threads can be faster than multiple processes, depending on the kind of work to be parallelized. Check out for example the commit linked below, where I speed up validation of entities. I compared using multiple threads vs. multiple processes, but as more time is spent loading data from disk than doing actual CPU heavy computation, using multiple threads instead of using multiple processes was significantly faster, thanks to threads having a much lower overhead than processes.

https://gitea.wildfiregames.com/0ad/0ad/commit/e755ef715565409b93cecdb2d84b5098a518fef6

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

21 hours ago, blazen1te said:

I rarely hit 40% utilization on my pc even during very intensive matches with lots of ai's.

The AI logic was historically and it still is one of the bigger performance bottlenecks. This is related, in part, to the fact that most of the game's logic is still single-threaded. Pathfinder got its own thread in alpha 25.

Sadly, this means that your "6 hyper-threaded cores" won't help you much. They might even be worse than a standard 2-core PCs of the past. This is because modern hardware design is focused on having many slower CPU cores, while older design retained fewer, but faster CPUs.

So, your CPU clock speed is what matters the most, followed by the GPU memory (if you want high details on everything). 

Edited by Deicide4u
Autocomplete is funny
Link to comment
Share on other sites

it clocks decently high, and if two cores are all that matters I'm thinking of overclocking, because i have plenty of thermal headroom currently. my gpu is also underclocked currently, but I'll overclock the vram and see how that goes.  Do you think this will change in the future, or will it always be dependent on two cores?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...