BGForums

BattleGoat Studios | Supreme Wiki | Facebook | Twitter | YouTube
It is currently May 21 2013

All times are UTC - 5 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Speed... again
PostPosted: Jun 09 2011 
Offline
Corporal

Joined: Jun 09 2011
Posts: 2
Hi,

I know there are many threads about this issue, but all i have found date back to 2009.

First of all, i really like this game (Supreme Ruler 2020 Gold).
Second of all, i know quite much about programming in general, and also a thing or two about ressource usage, as i am currently studying my master in computer engineering.

But i have a great problem with the gamespeed.
I tried running this game on a AMD Athlon II X4 640 3.01 ghz and 2 Gigabyte of ram.
I also tried running it on a Intel Core2Quad Q9600 with 4GB ram.
It took approx 17 seconds for a day at the START! of a shattered world scenario with no starting units!
I also tried to put the Priority of the game at High, but the game never even uses one core nearly fully! The highest i've seen is 60% on one core, and 2-5% on the others. (And this includes background tasks etc).

i am not running anything cpu consuming prallel (no antivirus etc).
So the game does not use all the cpu ressources even on "High" and "Realtime" priority.
So either CPU time is not the limiting factor in my case, or the programming is really really bad.

Second: what is the limiting factor ingame: military, production or diplomacy?
from prevoius threads i've read thet the limiting factor is the complex interaction between countrys?
in this case the game would have to speed-up later in the game when there are less and less countrys as you conquer them?
in case it is the military (units etc): this can't really be the case since it is also relatively slow when starting a scenario with no units at the start.
which leaves production. but if that eats up all the time a modern CPU can give then there must be a grave problem somewhere.

So there seems to be a bottleneck somewhere, and that problem seems to get more grave as the gameyears go by.
And it can't be the problem that the game doesn't get the processing time from windws that it would need, as http://msdn.microsoft.com/en-us/library/ms685100(v=vs.85).aspx indicates that with "realtime" priority the process does get a higher priority than most system-processes like caching or input.

So what is that bottleneck, and can the end-user do something against it?

best regards
Daniel


Top
 Profile  
 
 Post subject: Re: Speed... again
PostPosted: Jun 11 2011 
Offline
General

Joined: Jun 23 2009
Posts: 2491
Location: x:355 y:216
To put this as simple as possible(for the remainder of this post I will refer to multi threading, although multi threading for parallel execution is specifically what i'm referring to). Windows attempts to split the process between cores so you never see one fully capped out. But since its a single threaded(technically its probably multi threaded but not with parallel execution in mind) process it can only use 100% of one processor (you should see it cap at 25% of your total processing power on quad core.. of 50% on dual core). Even when windows attempts to split the load. IF you want to see what it looks like without windows bugging it up.. set your affinity to only 1 processor and watch it max out that core.(btw you might see a extremely small performance gain this way since it takes a small amount of time for windows to transfer tasks onto another core then sync it back with its original process, some older games etc actually crash if not set on a single core affinity because of this tendency of windows to try to split the load, even on a single process).

Point is.. it is CPU limited.. and since the main calculations are not multi threaded (there may be minor tasks on a separate thread idk you'd have to ask george about that) no amount of multiple cores will increase performance. Its limited by the speed of a single core. To be able to max out more than one core the main calculations would have to be split between 2 or more threads. Which simply isn't the case.

Also if your going for pure speed turn off the fog of war. Sight calculations account for about 3 seconds of per day time on my machine.(not that i play that way but i've tested the difference just to see)

and finally a parting shot. Get out of the classroom and into the lab and you would understand the practical applications of your chosen field (the concept of multi threading is becoming extremely important on the software side) :wink:

_________________
Si vis pacem, para bellum
my Supreme Ruler Cold war mods Site
Redistribution of my mods is prohibited. By downloading them you agree to not redistribute the file(s) without expressed permission.


Top
 Profile  
 
 Post subject: Re: Speed... again
PostPosted: Jun 11 2011 
Offline
Corporal

Joined: Jun 09 2011
Posts: 2
Fistalis wrote:
To put this as simple as possible(for the remainder of this post I will refer to multi threading, although multi threading for parallel execution is specifically what i'm referring to). Windows attempts to split the process between cores so you never see one fully capped out. But since its a single threaded(technically its probably multi threaded but not with parallel execution in mind) process it can only use 100% of one processor (you should see it cap at 25% of your total processing power on quad core.. of 50% on dual core). Even when windows attempts to split the load. IF you want to see what it looks like without windows bugging it up.. set your affinity to only 1 processor and watch it max out that core.(btw you might see a extremely small performance gain this way since it takes a small amount of time for windows to transfer tasks onto another core then sync it back with its original process, some older games etc actually crash if not set on a single core affinity because of this tendency of windows to try to split the load, even on a single process).

Point is.. it is CPU limited.. and since the main calculations are not multi threaded (there may be minor tasks on a separate thread idk you'd have to ask george about that) no amount of multiple cores will increase performance. Its limited by the speed of a single core. To be able to max out more than one core the main calculations would have to be split between 2 or more threads. Which simply isn't the case.


i already figured that SR isn't made for parallel execution, but if you read my first post i mentioned that SR doesn't even max out a single core (it uses up about 60% of one core)

Quote:
Also if your going for pure speed turn off the fog of war. Sight calculations account for about 3 seconds of per day time on my machine.(not that i play that way but i've tested the difference just to see)

i already read that in another post, but i haven't tried it so far, because i like the fow.

Quote:
and finally a parting shot. Get out of the classroom and into the lab and you would understand the practical applications of your chosen field (the concept of multi threading is becoming extremely important on the software side) :wink:


As far as that is concerned i spent much more time in a lab than in a classroom, but i must admit that most of my experience in parallel-execution is on microcontroller level. But as mentioned above, it does not even use up all the cpu time of one processor, so the multi-treading/parallel execution is besides the point.

best regards
Daniel


Top
 Profile  
 
 Post subject: Re: Speed... again
PostPosted: Jun 11 2011 
Offline
Supreme Ruler

Joined: Jun 04 2002
Posts: 16495
Location: BattleGoat Studios
DeepB wrote:
...i mentioned that SR doesn't even max out a single core...

Because the first core is waiting on results of calculations from other cores. Everything is intertwined in the system.

_________________
Chris Latour
BattleGoat Studios
chris@battlegoat.com


Top
 Profile  
 
 Post subject: Re: Speed... again
PostPosted: Jun 11 2011 
Offline
General

Joined: Jun 23 2009
Posts: 2491
Location: x:355 y:216
DeepB wrote:
But as mentioned above, it does not even use up all the cpu time of one processor, so the multi-treading/parallel execution is besides the point.


Well apparently you didn't read or comprehend my post. Windows attempts to split the load between cores which is why you won't cap out a core. If you were to set the affinity for SR2020s process to a single core (in your task manager)you would see it cap out.. as i already stated. Your issue is with windows proccessor management not Sr2020.

Simply start up Sr2020.. set it to single core and watch it cap, then perhaps you will understand that the reason your not capping out a single core is the way windows manages processes on a multi core system. By setting your affinity to 1 core for sr2020s process your removing windows processor management from the equation. (don't they teach you guys how windows functions?)

This by the way isn't specific to Sr2020.. but is common with many games and applications. How windows manages it may differ depending on thread use but you will rarely see any single program use more than 25% of your total processing power on a quad core unless that program is specifically designed for parallel processing. For example I can start up DDO and it will be using 5-10% of each of my 4 cores but will not exceed a total of 25% of my total processing power. More threads lets windows share more between processors in a more balanced way with DDO.. but even so it will not exceed the max of 1 core.

_________________
Si vis pacem, para bellum
my Supreme Ruler Cold war mods Site
Redistribution of my mods is prohibited. By downloading them you agree to not redistribute the file(s) without expressed permission.


Top
 Profile  
 
 Post subject: Re: Speed... again
PostPosted: Jun 26 2011 
Offline
Colonel

Joined: Oct 12 2008
Posts: 280
For what it's worth, the right CPU makes a big difference. I switched from a late-model Athlon quad-core to a core i7... night and day.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group