Page 1 of 1
Bad performance on multi core cpus - Solution within
Posted: 11 Jun 2010, 11:35
by Beherith
I got an i5 750, and immediately loaded up spring to see the performance. (win7 x64 btw)
What I saw with the single threaded build apalled me (I switched back to single thread because I thought turbo boost technology would be perfect for standard spring, as it can accelerate 1 core if the others are unloaded). I set 200 aks to patrol over a larger area, just to give it a little sim load.
Without setting CPU affinity, spring was smeared over all my cores, with an fps of 20:
By setting the affinity to 1 core only via task manager, the performance almost tripled instantly:
I recall there being an external program that set the affinity of spring to 1 core only in the old days.
Could this be integrated into the installer?
Can anyone else with multi core CPUs check if they also get their spring switched between cores?
If it does, does setting CPU affinity help your performance?
The tool that can be used to consistently set spring to 1 core(task manager will only keep it for that single instance):
http://www.robpol86.com/index.php/ImageCFG
I attached the program with two .bat files. Unzip it to your spring directory and run the enable bat file.
Re: Bad performance on multi core cpus - Solution within
Posted: 11 Jun 2010, 11:46
by jK
Spring has for a very long time now a "SetCoreAffinity" configtag, possible values are 0:=off, 1:='affinity for 1 core' & 2:='limit to 1 core'.
Re: Bad performance on multi core cpus - Solution within
Posted: 11 Jun 2010, 12:00
by Beherith
Why that is great, but spring doesnt set it for itself, and I doubt more than a handful of people knew about that tag. Especially since even finding springsettings.cfg is a difficult task.
But setting it to 1 results in spring eating 1 core 100%, and smearing another cores worth of work over the other three. 45 fps.
Edit: after a while in the test spring decided to go back to smearing itself over all 4 cores, with low performance (20 fps in prev test)
Setting it to 2: this setting is ignored by my os (or spring) and it still goes on all 4 cores.
Re: Bad performance on multi core cpus - Solution within
Posted: 11 Jun 2010, 13:14
by aegis
Performance is about the same for me with affinity set or not (win7 64-bit with an i7 here)
Are you running XP? Have you applied the multicore fixes?
http://forum.notebookreview.com/sager-c ... o-you.html
I believe this particular problem has been fixed since Vista - I've never had to force a program to a single core since I switched from XP to 7.
Microsoft has two KnowledgeBase articles on the issue, one of them says "These performance issues may sometimes occur if the game was not designed for use on computers that use dual-core processors. The performance issues occur because the game cannot correctly capture timing information."
Re: Bad performance on multi core cpus - Solution within
Posted: 11 Jun 2010, 13:18
by Beherith
Beherith wrote: (win7 x64 btw)
Re: Bad performance on multi core cpus - Solution within
Posted: 11 Jun 2010, 13:22
by aegis
ah, missed it because your task manager didn't have the UAC icon on resource monitor and you're on the classic theme.
haven't ever had spring performance issues on my i7 laptop
can you run cpuz to see if your first core scales above the base clock?
Re: Bad performance on multi core cpus - Solution within
Posted: 11 Jun 2010, 20:13
by zerver
Beherith wrote:Especially since even finding springsettings.cfg is a difficult task.
No need to fiddle with it, you can start Spring and click Edit Settings.
Re: Bad performance on multi core cpus - Solution within
Posted: 11 Jun 2010, 20:56
by hoijui
.. location is also visible in infolog.txt.. but i agree that SettingsEditor should have a plain-view of all settings too.
Re: Bad performance on multi core cpus - Solution within
Posted: 11 Jun 2010, 21:02
by Machete234
Strange I have somewhere between 200fps and never less than 60 no matter what happens. (demos of huge games at 5x speed)
With my phenom 965 but I also use the MT exe file.
But i dont think it would be a lot worse without the MT.exe
also win7 and 64bit
Re: Bad performance on multi core cpus - Solution within
Posted: 12 Jun 2010, 02:36
by Argh
XP SP3+ doesn't need to install the multicore fixes, they're already installed. Performance over here with games that can use more than one processor has been excellent.
Re: Bad performance on multi core cpus - Solution within
Posted: 12 Jun 2010, 03:12
by FLOZi
Yeah, I stopped having to use imagecfg when I upgraded to XP SP3. I haven't tried it out since though, so I can't comment whether the performance is as-good or just good-enough-I-didn't-bother.
Re: Bad performance on multi core cpus - Solution within
Posted: 13 Jun 2010, 06:32
by Manoa
rename spring.exe to spring1.exe
download prioaff.exe from somewhere
create a new file: spring.cmd
add code:
Code: Select all
path\to\prioaff.exe 3 10 path\to\spring1.exe %1 %2 %3
change spring executable in springlobby to where spring.cmd is and enable use old launch method
this method requires manually configuring the core on which wished to be run, it is the binary form in the command, 10 means CPU #1, 01 = CPU#0, 11 = CPU #0, #1, binary is right to left, the number 3 represents the priority of the process, in my patched version I added belownormal and abovenormal, so you have:
0 - idle
1 - belownormal
2 - normal
3 - abovenormal
4 - high
5 - realtime
in the standard edition there is only 3, so be careful to change the priority value if not using my version. I recommend to use this on other programs and system processes, for after-launch affinity control I recommend process.exe.
Re: Bad performance on multi core cpus - Solution within
Posted: 13 Jun 2010, 10:52
by Licho
This is well known old bug i reported years ago..
Sometimes it helps to change threading support in nvidia drivers.
Also i made "springloader" years ago, which starts spring with affinity and priority set (and optionally switches to fullscreen when not speccing and windowed when speccing).
You can find it in forums i think.
Re: Bad performance on multi core cpus - Solution within
Posted: 13 Jun 2010, 13:57
by Masure
Licho wrote:This is well known old bug i reported years ago..
Sometimes it helps to change threading support in nvidia drivers.
Also i made "springloader" years ago, which starts spring with affinity and priority set (and optionally switches to fullscreen when not speccing and windowed when speccing).
You can find it in forums i think.
+1 to setting threaded optimization off in NVidia panel for spring.exe profile.