I do not run a server myself, so I cannot make a detailed observation, but I have given a wildly speculative cause in your last thread in response to endar who ran into the exact same thing: <!--QuoteBegin-'an intelligent chap'+--><div class='quotetop'>QUOTE ('an intelligent chap')</div><div class='quotemain'><!--QuoteEBegin-->Another interesting fact is that the server tick-rate apparently goes to 1 when there are no more players. I'm not sure whether this is new since the latest build, or has been around for longer, but it's the first time I've actually noticed this (thanks to Plasma's dev-tracker). If this is indeed a new feature, then a problem in it's implementation might explain endar's observations.<!--QuoteEnd--></div><!--QuoteEEnd--> What you could try is open up the task-manager, and have a look at the resource-monitor, see what the Server.exe-process is up to exactly.
The server will use a lot of CPU resources regardless of how much work it's doing, because the main loop is a busy loop. This loop which consumes CPU cycles until it's ready to do some actual work (which it does 30 times per second based on the tick rate). This will be addressed in the future.
endarJoin Date: 2010-07-27Member: 73256Members, Squad Five Blue
<!--quoteo(post=1839475:date=Apr 1 2011, 11:19 AM:name=devicenull)--><div class='quotetop'>QUOTE (devicenull @ Apr 1 2011, 11:19 AM) <a href="index.php?act=findpost&pid=1839475"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Why does the server use around 80% of a CPU core when it's idle? Is anyone else seeing this? I've never seen a server use so much CPU when idle.
<img src="http://dl.dropbox.com/u/2078961/ns2_idle.png" border="0" class="linked-image" /><!--QuoteEnd--></div><!--QuoteEEnd--> I noticed it first in build 168, heres a <a href="http://unknownworlds.com/ns2/forums/index.php?s=&showtopic=112988&view=findpost&p=1837528" target="_blank">link</a> (to your thread which I attempted to hijack).
<!--quoteo(post=1839497:date=Apr 1 2011, 02:16 PM:name=Max)--><div class='quotetop'>QUOTE (Max @ Apr 1 2011, 02:16 PM) <a href="index.php?act=findpost&pid=1839497"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->The server will use a lot of CPU resources regardless of how much work it's doing, because the main loop is a busy loop. This loop which consumes CPU cycles until it's ready to do some actual work (which it does 30 times per second based on the tick rate). This will be addressed in the future.<!--QuoteEnd--></div><!--QuoteEEnd-->
What we are describing is slightly different, or is new behavior from 168 onwards. Was there a busy loop in 167? If so, it wasn't working. In 167 and before, the server would sit at about 1-5% (single core) while empty, and uniformly ramp up to 100% when it hit it's "limit". What it does now, is starts at 100%, and as soon as a player joins, it will drop back to the 1-5%, and then continue to ramp up. I'm not going to repost it, just read what I posted before: <a href="http://unknownworlds.com/ns2/forums/index.php?s=&showtopic=112988&view=findpost&p=1837528" target="_blank">link</a>
Just to elaborate what I ment by an improper implementation, perhaps a player-checker is constantly cycling through a while-loop, this would cause a maximum single threaded CPU-load. It's a bit daft to think Max would do something that silly, but it is a possible explanation. It would also explain why CPU-usage goes down the moment a player enters (as it leaves the while-loop and enters a loop that is maxed by 30FPS, possibly via a Sleep which will not incur any CPU-cycles).
devicenullJoin Date: 2003-04-30Member: 15967Members, NS2 Playtester, Squad Five Blue
<!--quoteo(post=1839523:date=Apr 1 2011, 08:16 AM:name=endar)--><div class='quotetop'>QUOTE (endar @ Apr 1 2011, 08:16 AM) <a href="index.php?act=findpost&pid=1839523"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I noticed it first in build 168, heres a <a href="http://unknownworlds.com/ns2/forums/index.php?s=&showtopic=112988&view=findpost&p=1837528" target="_blank">link</a> (to your thread which I attempted to hijack).
What we are describing is slightly different, or is new behavior from 168 onwards. Was there a busy loop in 167? If so, it wasn't working. In 167 and before, the server would sit at about 1-5% (single core) while empty, and uniformly ramp up to 100% when it hit it's "limit". What it does now, is starts at 100%, and as soon as a player joins, it will drop back to the 1-5%, and then continue to ramp up. I'm not going to repost it, just read what I posted before: <a href="http://unknownworlds.com/ns2/forums/index.php?s=&showtopic=112988&view=findpost&p=1837528" target="_blank">link</a><!--QuoteEnd--></div><!--QuoteEEnd-->
Indeed, the idle CPU usage has gone up significantly since older releases.. For example let's take build 162: <img src="http://dl.dropbox.com/u/2078961/ns2.png" border="0" class="linked-image" /> As long as this is something that's a known issue, that's fine with me. I just wanted to make sure someone was aware of it.
Just a note to say that I also experiance this - Occured since 168. At first I thought this was a major issue, but it doesn't seem to have had a major affect on performance.
ScardyBobScardyBobJoin Date: 2009-11-25Member: 69528Forum Admins, Forum Moderators, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, WC 2013 - Shadow
<!--quoteo(post=1839521:date=Apr 1 2011, 05:04 AM:name=mobetta)--><div class='quotetop'>QUOTE (mobetta @ Apr 1 2011, 05:04 AM) <a href="index.php?act=findpost&pid=1839521"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Thats going to be a big deal when thos gsp start vming the poop out of there boxes.<!--QuoteEnd--></div><!--QuoteEEnd-->
Well, if it stays like this no one will be able to run any VM's on a box running NS2. It will all have to be dedicated if an idle server consumes 80% of CPU resources.
ScardyBobScardyBobJoin Date: 2009-11-25Member: 69528Forum Admins, Forum Moderators, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, WC 2013 - Shadow
<!--quoteo(post=1839798:date=Apr 4 2011, 11:22 AM:name=NurEinMensch)--><div class='quotetop'>QUOTE (NurEinMensch @ Apr 4 2011, 11:22 AM) <a href="index.php?act=findpost&pid=1839798"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Uhm... it's pretty obvious that the servers won't idle at ~80% CPU usage when the game is released, so what's the point of that comment?<!--QuoteEnd--></div><!--QuoteEEnd-->
Fair enough, but even an idle of say 10% wouldn't be very good. I think my biggest concern is that idle CPU usage seems to be increasing with each patch rather than decreasing. This is also one of those issues that has little impact on the game itself (i.e. I could see UWE releasing NS2 v1.0 with some decent idle CPU usage so that they could get the game out sooner rather than later), but a much larger impact on server owners, namely it drives up the cost of hosting NS2 because you'd need to run a dedicated box rather than VM.
devicenullJoin Date: 2003-04-30Member: 15967Members, NS2 Playtester, Squad Five Blue
<!--quoteo(post=1839834:date=Apr 4 2011, 04:49 PM:name=ScardyBob)--><div class='quotetop'>QUOTE (ScardyBob @ Apr 4 2011, 04:49 PM) <a href="index.php?act=findpost&pid=1839834"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Fair enough, but even an idle of say 10% wouldn't be very good. I think my biggest concern is that idle CPU usage seems to be increasing with each patch rather than decreasing. This is also one of those issues that has little impact on the game itself (i.e. I could see UWE releasing NS2 v1.0 with some decent idle CPU usage so that they could get the game out sooner rather than later), but a much larger impact on server owners, namely it drives up the cost of hosting NS2 because you'd need to run a dedicated box rather than VM.<!--QuoteEnd--></div><!--QuoteEEnd-->
Indeed, don't expect cheap servers for NS2 if the idle CPU usage remains at this level. An idle NS2 server now uses about as much CPU as a 24 slot TF2 server that's full.
Comments
If he wanted that answer, he wouldn't be running a server.
<!--QuoteBegin-'an intelligent chap'+--><div class='quotetop'>QUOTE ('an intelligent chap')</div><div class='quotemain'><!--QuoteEBegin-->Another interesting fact is that the server tick-rate apparently goes to 1 when there are no more players. I'm not sure whether this is new since the latest build, or has been around for longer, but it's the first time I've actually noticed this (thanks to Plasma's dev-tracker). If this is indeed a new feature, then a problem in it's implementation might explain endar's observations.<!--QuoteEnd--></div><!--QuoteEEnd-->
What you could try is open up the task-manager, and have a look at the resource-monitor, see what the Server.exe-process is up to exactly.
<img src="http://dl.dropbox.com/u/2078961/ns2_idle.png" border="0" class="linked-image" /><!--QuoteEnd--></div><!--QuoteEEnd-->
I noticed it first in build 168, heres a <a href="http://unknownworlds.com/ns2/forums/index.php?s=&showtopic=112988&view=findpost&p=1837528" target="_blank">link</a> (to your thread which I attempted to hijack).
<!--quoteo(post=1839497:date=Apr 1 2011, 02:16 PM:name=Max)--><div class='quotetop'>QUOTE (Max @ Apr 1 2011, 02:16 PM) <a href="index.php?act=findpost&pid=1839497"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->The server will use a lot of CPU resources regardless of how much work it's doing, because the main loop is a busy loop. This loop which consumes CPU cycles until it's ready to do some actual work (which it does 30 times per second based on the tick rate). This will be addressed in the future.<!--QuoteEnd--></div><!--QuoteEEnd-->
What we are describing is slightly different, or is new behavior from 168 onwards. Was there a busy loop in 167? If so, it wasn't working. In 167 and before, the server would sit at about 1-5% (single core) while empty, and uniformly ramp up to 100% when it hit it's "limit". What it does now, is starts at 100%, and as soon as a player joins, it will drop back to the 1-5%, and then continue to ramp up. I'm not going to repost it, just read what I posted before: <a href="http://unknownworlds.com/ns2/forums/index.php?s=&showtopic=112988&view=findpost&p=1837528" target="_blank">link</a>
What we are describing is slightly different, or is new behavior from 168 onwards. Was there a busy loop in 167? If so, it wasn't working. In 167 and before, the server would sit at about 1-5% (single core) while empty, and uniformly ramp up to 100% when it hit it's "limit". What it does now, is starts at 100%, and as soon as a player joins, it will drop back to the 1-5%, and then continue to ramp up. I'm not going to repost it, just read what I posted before: <a href="http://unknownworlds.com/ns2/forums/index.php?s=&showtopic=112988&view=findpost&p=1837528" target="_blank">link</a><!--QuoteEnd--></div><!--QuoteEEnd-->
Indeed, the idle CPU usage has gone up significantly since older releases.. For example let's take build 162: <img src="http://dl.dropbox.com/u/2078961/ns2.png" border="0" class="linked-image" />
As long as this is something that's a known issue, that's fine with me. I just wanted to make sure someone was aware of it.
Well, if it stays like this no one will be able to run any VM's on a box running NS2. It will all have to be dedicated if an idle server consumes 80% of CPU resources.
Fair enough, but even an idle of say 10% wouldn't be very good. I think my biggest concern is that idle CPU usage seems to be increasing with each patch rather than decreasing. This is also one of those issues that has little impact on the game itself (i.e. I could see UWE releasing NS2 v1.0 with some decent idle CPU usage so that they could get the game out sooner rather than later), but a much larger impact on server owners, namely it drives up the cost of hosting NS2 because you'd need to run a dedicated box rather than VM.
Indeed, don't expect cheap servers for NS2 if the idle CPU usage remains at this level. An idle NS2 server now uses about as much CPU as a 24 slot TF2 server that's full.