• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

Shu-chan

Recruit
75 Badges
Dec 7, 2015
3
0
  • Crusader Kings II: Charlemagne
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Third Rome
  • Crusader Kings II: Jade Dragon
  • Semper Fi
  • Europa Universalis IV: Res Publica
  • Crusader Kings II
  • King Arthur II
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • For the Motherland
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Art of War
  • Europa Universalis IV
  • Darkest Hour
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris: Humanoids Species Pack
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Cradle of Civilization
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV Sign-up
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Stellaris: Apocalypse
  • Hearts of Iron IV: No Step Back
  • Victoria 2
  • Europa Universalis IV: Rule Britannia
I noticed that all the games on the clausewitz engine only uses a single core, and it doesn't really support multi-core processing.

So I wanna ask if (and if yes, when) would the engine support multi-core processing?
 
  • 6
  • 3
Reactions:
This is simply untrue.

I don't have concrete data yet on EU4, VHII, Stelarris and Sengoku, but this are screenshots of my normal cpu usage for HOI4 and CKII.

example1.png example2.png

The left hand side cpu logical processors is my first core, and their usage is considerably higher than my second core.
 
The games uses several cores
Try running any of the games with -threads=1 in commandline when you launch the game and enjoy
 
  • 8
Reactions:
EU4 is currently using ~50% of my CPU. With four cores, that's, by definition, at least two.

Screenshot attached; my CPU usage before running EU4 was ~1-3%
 

Attachments

  • eu4.png
    eu4.png
    1,6 MB · Views: 562
The games uses several cores
Try running any of the games with -threads=1 in commandline when you launch the game and enjoy

commandline? ingame console command? or is this something different?

also, with this can you basically force the PC to more heavily utilize the 3rd and 4th cores?
 
The game doesn't utilize every single core 100% all the time, it only does it during it processing a daily tick(where all the update to the actual game is happening). And there's an "infinity" of time between each daily tick in the game from the computers perspective. I mean we could just occupy the cores and spin the threads so they look like they are being used 100% constantly if you feel that makes it better?


Command lines are something different, right click on the game in steam, go to properties and then press the button called 'set launch options' and write in the command there. Remember to remove it again when you are done testing or else you're gonna be stuck in super-slow hell.
 
  • 11
  • 2
  • 1Haha
Reactions:
Basically the games use the CPUs as much as they need to. This perception that because all 4 or 8 cores are not maxed out, there's some performance issue, is misplaced. If it was possible to make the games to use more CPU than they do for some benefit, that would be done already in the game - you wouldn't have to force anything. Having CPU cycles unused is not an indication of poor optimisation, the games simply do not need all the performance that modern multi-core CPUs offer al the time.
 
  • 6
  • 3
Reactions:
Sorry forgot to answer
I got 48 threads for eu4 however only one of my 8 cpus (hyperthreading) was used 100% all the time the others had 25% max...
I dont complain about speed though.. i usually play on speed 2 or 3 anyway and fir that its fine enough ;-)
 
  • 1
  • 1
Reactions:
Well, my supposition was that my both HoI4 and CKII autocloses themselves (without even an indication of a crash) when I notice that the "tick" on one of my cores reaches the ceiling (in HoI4 mostly around 1943 and in CKII around 900s if I started on the 769 bookmark)

I thought the reason behind these was that the engine itself was only single-threading. Oh well. Time to go to tech supp I guess.
 
Sorry forgot to answer
I got 48 threads for eu4 however only one of my 8 cpus (hyperthreading) was used 100% all the time the others had 25% max...
I dont complain about speed though.. i usually play on speed 2 or 3 anyway and fir that its fine enough ;-)

Yes they need to fix it so it spawns spinning threads till 100% usage on all cores is achieved. Then we can be sure it's running efficiently.
 
  • 1
Reactions:
If you want some fun and have an i7 launch 2 Pds games at the same time and run them.
Sorry forgot to answer
I got 48 threads for eu4 however only one of my 8 cpus (hyperthreading) was used 100% all the time the others had 25% max...
I dont complain about speed though.. i usually play on speed 2 or 3 anyway and fir that its fine enough ;-)
what kind of processor are you using? I cannot find any that support 6 threads per core...

Not sure what you were doing but even with 2 Pds games going I never had a virt core maxed out.
 
Yes they need to fix it so it spawns spinning threads till 100% usage on all cores is achieved. Then we can be sure it's running efficiently.
False. In the current Windows/Linux architecture, having your CPU always running at 100℅ means you are overcommitting your proceesors. Moreover 100℅ CPU is by no way an indication of "good performance/efficiency" from a user point of view.
Basically the games use the CPUs as much as they need to.
this!
 
Yes they need to fix it so it spawns spinning threads till 100% usage on all cores is achieved. Then we can be sure it's running efficiently.
That's a lot of effort for a redundant feature. ;)

Windows already does this for you, free of charge. Since a core cannot be stopped, Windows assigns it the Idle thread if no other application has a thread ready for processing. The Idle thread, as the name suggests, does nothing but endlessly spinning around in a loop. The windows Task Manager, however, deducts the time spend in the Idle thread from the total CPU time used. If it did not, all cores would display 100% usage all of the time.

One of the last CPU's that could actually be halted was the Z80. It would then be completely idle until an external interrupt (from a keyboard or other external device) woke it up again.

As far as most threads ending up on one core instead of being evenly spread. That, too, is due to the Windows thread scheduler. It prefers threads belonging to the same process to be run on the same core, as that places a lesser burden on the cache controllers inside the CPU. Each core has a private level 1 cache, and all cores share the level 2/3 caches. Windows (rightly) assumes that threads of the same process use the same memory pool. When these run on multiple cores, the CPU needs to put in extra time to maintain the integrity of these level 1 caches, slowing the cores down.

Edit : I don't know if the Windows Scheduler actively supports it, but keeping most threads on one core when possible utilises Intel's Turbo Boost feature to the max. With this feature, cores that aren't doing very much get their clock speed reduced (thus drawing less power and emmenating less heat) so that the thus freed room in power draw and heat generation can be put on the one core that's busy, by cranking the clock speed of that core over the maximum. In short, workload that put's two cores at 50% runs actually slower than putting all that workload on one single core.
 
Last edited:
It clearly isn't exclusively single-core, but that doesn't mean that performance isn't limited by putting too much on a single core. In this case, I just ran CK2 for a minute or two before grabbing this screenshot. When 87.5% of my processor is only at ~30% use and one core is at 100%, it shows that the load could be distributed better.
I'm not really complaining, just making an observation.
Capture.PNG
 
The logic of "if it runs fast on one core, it should be able to run twice as fast on two cores!" reminds me of the joke, "if one woman can have a baby in nine months, then nine women should be able to have a baby in one month!" ;)