Server Help

General Questions - CPU Usage 100

Cancer+ - Wed Mar 28, 2007 2:22 am
Post subject: CPU Usage 100
So I am hosting three zones on my computer. One of them is taking 60% of the cpu usage. I take it offline, everything is fine and the other two aren't taking any cpu usage.

Why is it taking so much cpu?
Cancer+ - Wed Mar 28, 2007 2:41 am
Post subject:
Ok so I figured out the problem. It was the server.ini.

I'm assuming it was this section...



Old server.ini 100%
Code: Show/Hide
LoopDelay=0
ProcessMaxTime=4
SleepPerIteration=0
SlowIterationWarningLevel=100
SleepTime=0


New server.ini 4%
Code: Show/Hide
LoopDelay=0
ProcessMaxTime=16
SleepPerIteration=1
SlowIterationWarningLevel=100
SleepTime=15


Now can someone explain to me why it was at 100%?
Cheese - Wed Mar 28, 2007 3:53 am
Post subject:
before:

ProcessMaxTime=4
SleepPerIteration=0
SleepTime=0

set these to:
ProcessMaxTime=4 <---- how long in cpu
SleepPerIteration=1 <----- turns sleep on
SleepTime=10 <----- how long til next in cpu

simply put xD
Cancer+ - Wed Mar 28, 2007 3:59 am
Post subject:
Thanks Cheese.

I also had help by Solo. Thanks again, everything is good.
Maverick - Wed Mar 28, 2007 5:13 am
Post subject:
Maybe someone who can give enough explanation about these parameters can update the wiki page about this: http://wiki.minegoboom.com/index.php/Server.ini#CPU
L.C. - Wed Mar 28, 2007 7:42 am
Post subject:
What are the recommended values then?

EDIT :: Nevermind.
Cancer+ - Wed Mar 28, 2007 11:42 am
Post subject:
Well, Shanky's FAQ's tell you how to do it, but doesn't say why?
Cheese - Wed Mar 28, 2007 5:20 pm
Post subject:
omg mav.
ROFLROFLROFLROFL


i suppose i might update that.
are there others, like one for subbill.ini?
Maverick - Thu Mar 29, 2007 3:29 am
Post subject:
Cheese wrote:
are there others, like one for subbill.ini?

You know, the wiki has a nifty feature called "search". OMGOSH you can find out for yourself!
If it doesn't exist you can create the page about it also yourself.
The power of wiki icon_surprised.gif
Cheese - Thu Mar 29, 2007 7:12 pm
Post subject:
Maverick wrote:
[..]


You know, the wiki has a nifty feature called "search". OMGOSH you can find out for yourself!
If it doesn't exist you can create the page about it also yourself.
The power of wiki icon_surprised.gif


of course, to use that, you would need to know it existed... xD
fatrolls - Sat Jan 25, 2014 1:29 pm
Post subject:
All the suggestions to fix the 30-100% CPU of subgame2 which involve editing the

CPU:SleepTime

are plain wrong.. you shouldn't touch that setting, it will make your zone have constant lag for no reason..

The real cause of subgame2 CPU Usage spikes come from actually when anybody connects to your zone which includes the Billing server.

What happens is it uses the select() function to switch from socket to socket in non-blocking mode with no timeout delay, this is the true cause of the CPU Spikes.

The proper way to reduce the 30-100% CPU of subgame2 all the way down 0% CPU and keep away from adding useless thread sleep to main server loop.

Here is server.ini for that fix
Code: Show/Hide

[Comms]
MaxQueueToLogin=16
PacketHistoryMax=2000
IncomingBufferSize=131072
OutgoingBufferSize=131072
EncryptMode=1
UnreliableBufferSize=128
TransportBufferSize=160
SelectTime=10

[CPU]
LoopDelay=0
ProcessMaxTime=4
SleepPerIteration=0
SlowIterationWarningLevel=100
SleepTime=0


As you can see all I did was add SelectTime=10 into Comms section.
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group