Multicore CPU utilization

Distant Worlds is a vast, pausable real-time, 4X space strategy game which models a "living galaxy" with incredible options for replayability and customizability. Experience the full depth and detail of large turn-based strategy games, but with the simplicity and ease of real-time, and on the scale of a massively-multiplayer online game. Now greatly enhanced with the new Universe release, which includes all four previous releases as well as the new Universe expansion!

Moderators: elliotg, Icemania

Post Reply
YourConscience
Posts: 57
Joined: Mon Apr 05, 2010 6:59 am

Multicore CPU utilization

Post by YourConscience »

In the current patch 1.7.0.2 things have gotten a bit slower again. This prompted me to have a look at the CPU utilization of the game and this was in for a surprise. Out of my 4 real cores, all were busy - but each for only about 14%. The other 4 hyperthreading cores weren't doing anything whatsoever.

Could anyone form Codeforce or Matrix comment on that? From a programmer's perspective this looks like something in the game is constantly waiting for something to finish before continuing to compute. I'd even go a claim that this is a bug, but it could be by design. On my Core i7 on a 15x15 sector with 700 stars the game is really really choppy now with like two or three computation cycles (or frames) per second.
Fideach
Posts: 175
Joined: Tue Mar 30, 2010 9:14 am

RE: Multicore CPU utilization

Post by Fideach »

Since the patch I've been seeing what looks like a memory leak at times
User avatar
tjhkkr
Posts: 2431
Joined: Wed Jun 02, 2010 11:15 pm
Contact:

RE: Multicore CPU utilization

Post by tjhkkr »

That is interesting. I never gave any thought to cheking my CPU/memory stats...
And I used to stress test online applications in the old days.
Looks like load balance is pretty good though from what you have said!
Remember that the evil which is now in the world will become yet more powerful, and that it is not evil which conquers evil, but only love -- Olga Romanov.
Raap
Posts: 404
Joined: Wed Jan 12, 2011 1:46 pm

RE: Multicore CPU utilization

Post by Raap »

All the CPU cores are 'always' busy, even with single-threaded applications. Windows will automatically switch the thread from one core to the other so as to spread the heat and work load. Helps ensure longer CPU lifetime, since otherwise the first core would do like 90+% of all the work and fail much sooner. Task Manager isn't quick enough with updating to show this, however. A better way to measure how much the game is using is looking at the Processes page. Over here my DistantWorlds.exe is using 25%( sometimes going up to 30-35% depending on what I'm doing in the game), which means it's effectively using 1 out of my 4 cores and sometimes parts of a second core. If you've 8 cores, that means it should be somewhere around ~13% most of the time, with some higher usage every now and then.

So from what I can see, the game's still largely single-threaded but with a few functions using a second thread.
Post Reply

Return to “Distant Worlds 1 Series”