Why does spring 103 dedicated use so much cpu?
Moderator: Moderators
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Why does spring 103 dedicated use so much cpu?
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?
- Silentwings
- Posts: 3720
- Joined: 25 Oct 2008, 00:23
Re: Why does spring 103 dedicated use so much cpu?
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.
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.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Why does spring 103 dedicated use so much cpu?
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.
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.
-
- Posts: 823
- Joined: 21 Oct 2008, 02:54
Re: Why does spring 103 dedicated use so much cpu?
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.
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?
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.
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.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Why does spring 103 dedicated use so much cpu?
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?
ZK uses dedicated for Windows and it doesn't seem to suck ass. Perhaps ask someone with ZK server access to compare the setup.
-
- Posts: 823
- Joined: 21 Oct 2008, 02:54
Re: Why does spring 103 dedicated use so much cpu?
*Ahem*
You can't fix something if you don't know what exactly the problem is.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?
He doesn't need to fix it - just find out the routine that is consuming most of the CPU time.Super Mario wrote:*Ahem*You can't fix something if you don't know what exactly the problem is.You need to profile it, to see where the cpu is spending the most time on.
With that a decent mantis entry can be made.
Re: Why does spring 103 dedicated use so much cpu?
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.
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.
-
- Posts: 823
- Joined: 21 Oct 2008, 02:54
Re: Why does spring 103 dedicated use so much cpu?
https://en.wikipedia.org/wiki/Generic_youdansan wrote:He doesn't need to fix it - just find out the routine that is consuming most of the CPU time.Super Mario wrote:*Ahem*You can't fix something if you don't know what exactly the problem is.You need to profile it, to see where the cpu is spending the most time on.
With that a decent mantis entry can be made.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Why does spring 103 dedicated use so much cpu?
ThanksKloot 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.

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.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Why does spring 103 dedicated use so much cpu?
Using a newer dev build failed miserably.
What should I do?
What should I do?
Re: Why does spring 103 dedicated use so much cpu?
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....
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?
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Why does spring 103 dedicated use so much cpu?
Does Spads even have the capability to utilize the commandline params?