Page 1 of 1
Why does spring 103 dedicated use so much cpu?
Posted: 02 Apr 2017, 11:41
by Forboding Angel
It's sole job is to pass along network traffic. Why, during a game, does it reach 100% usage of a core? Why is it using any cpu at all. I would understand network traffic, but it supposedly isn't even running sim, so why is it using any notable amount of CPU to begin with?
Re: Why does spring 103 dedicated use so much cpu?
Posted: 02 Apr 2017, 15:48
by Silentwings
If this issue was happening for everyone in 103, I imagine autohost owners would have noticed it some time ago -> its probably just you.
If you are compiling for yourself, perhaps it is related to the boost bug mentioned in
https://springrts.com/mantis/view.php?id=5151. It it's not that -> bug report.
Re: Why does spring 103 dedicated use so much cpu?
Posted: 02 Apr 2017, 23:49
by Forboding Angel
It has been an issue on Windows ever since I can remember.
My ass servers were constantly pegged at 100%, I just didn't care because that's all they were there for. Now that it's no longer on AWS I care again because the server that hosts them does more than just that.
Again, why is it using 100%. That should NEVER happen. So, I ask again, why?
Is it Windows specific? I don't have any ability to test with a nix host, so I don't know the answer to that.
Even more irritating is people telling you it isn't an issue who don't run any servers of their own so therefore don't see the process pegging max CPU when a game gets a lot going on in it.
Re: Why does spring 103 dedicated use so much cpu?
Posted: 03 Apr 2017, 00:40
by Super Mario
The why part is simple, it's doing meaningless work. The why and how part is a whole different matter.
You need to profile it, to see where the cpu is spending the most time on.
Re: Why does spring 103 dedicated use so much cpu?
Posted: 04 Apr 2017, 11:29
by ThinkSome
I run autohosts on GNU/Linux and have not noticed them going past maybe 1-2% CPU use.
Server-side spring can run in two modes: dedicated and headless. The first is a simple relay and the second runs full sim (used for server-side bots and such). It might be that yours is compiled/runs in headless mode.
Re: Why does spring 103 dedicated use so much cpu?
Posted: 04 Apr 2017, 16:06
by Forboding Angel
No, it is very much spring-dedicated. I'm starting to think that dedicated for windows just sucks ass.
Re: Why does spring 103 dedicated use so much cpu?
Posted: 06 Apr 2017, 21:54
by sprunk
ZK uses dedicated for Windows and it doesn't seem to suck ass. Perhaps ask someone with ZK server access to compare the setup.
Re: Why does spring 103 dedicated use so much cpu?
Posted: 07 Apr 2017, 00:04
by Super Mario
*Ahem*
You need to profile it, to see where the cpu is spending the most time on.
You can't fix something if you don't know what exactly the problem is.
Re: Why does spring 103 dedicated use so much cpu?
Posted: 07 Apr 2017, 07:29
by dansan
Super Mario wrote:*Ahem*
You need to profile it, to see where the cpu is spending the most time on.
You can't fix something if you don't know what exactly the problem is.
He doesn't need to fix it - just find out the routine that is consuming most of the CPU time.
With that a decent mantis entry can be made.
Re: Why does spring 103 dedicated use so much cpu?
Posted: 07 Apr 2017, 14:20
by Kloot
That routine would be sleep().
103.0's game server can (under specific conditions, due to an oversight) execute sleep by way of a yielding loop, which is great for most engine threads but not so great for the DS. Use the spring-dedicated binary from a development build if it really matters, CPU's have cores to spare these days.
Re: Why does spring 103 dedicated use so much cpu?
Posted: 07 Apr 2017, 18:53
by Super Mario
dansan wrote:Super Mario wrote:*Ahem*
You need to profile it, to see where the cpu is spending the most time on.
You can't fix something if you don't know what exactly the problem is.
He doesn't need to fix it - just find out the routine that is consuming most of the CPU time.
With that a decent mantis entry can be made.
https://en.wikipedia.org/wiki/Generic_you
Re: Why does spring 103 dedicated use so much cpu?
Posted: 07 Apr 2017, 22:59
by Forboding Angel
Kloot wrote:That routine would be sleep().
103.0's game server can (under specific conditions, due to an oversight) execute sleep by way of a yielding loop, which is great for most engine threads but not so great for the DS. Use the spring-dedicated binary from a development build if it really matters, CPU's have cores to spare these days.
Thanks
DS from dev builds can be used with 103? 103 DS will happily chew through multiple cores at 100% usage at times, that's the biggest part of the problem. Ingame, it translates into feeling extremely laggy.
Spring Dedicated CPU usage... WTF?
Posted: 30 Apr 2017, 03:34
by Forboding Angel
Why?
Re: Why does spring 103 dedicated use so much cpu?
Posted: 01 May 2017, 08:00
by Forboding Angel
Using a newer dev build failed miserably.
What should I do?
Re: Why does spring 103 dedicated use so much cpu?
Posted: 01 May 2017, 18:55
by ThinkSome
How did it fail? Perhaps backport the fix to 103.0?
I believe those Zero-K people are also running servers on Windows, perhaps ask them?
Alternatively, there is always the option of switching to GNU+Linux, or maybe make a GNU+Linux VM....
Re: Why does spring 103 dedicated use so much cpu?
Posted: 01 May 2017, 21:27
by Kloot
these probably won't be very effective prior to e209249082 (and might not work at all if the issue here is tied to the specifics of your system), but you can try setting different values for ServerSleepTime and see how they correlate with CPU usage.
Re: Why does spring 103 dedicated use so much cpu?
Posted: 02 May 2017, 03:42
by Forboding Angel
Does Spads even have the capability to utilize the commandline params?