Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
CPU Usage 100

 
Post new topic   Reply to topic Printable version
 View previous topic  .scr files Post :: Post Catid's Biller - Rejecting Apple MAC d...  View next topic  
Author Message
Cancer+
Server Help Squatter


Age:36
Gender:Gender:Male
Joined: Aug 19 2005
Posts: 271
Offline

PostPosted: Wed Mar 28, 2007 2:22 am    Post subject: CPU Usage 100 Reply to topic Reply with quote

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?
Back to top
View users profile Send private message Add User to Ignore List Visit posters website AIM Address
Cancer+
Server Help Squatter


Age:36
Gender:Gender:Male
Joined: Aug 19 2005
Posts: 271
Offline

PostPosted: Wed Mar 28, 2007 2:41 am    Post subject: Reply to topic Reply with quote

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%?
Back to top
View users profile Send private message Add User to Ignore List Visit posters website AIM Address
Cheese
Wow Cheese is so helpful!


Joined: Mar 18 2007
Posts: 1017
Offline

PostPosted: Wed Mar 28, 2007 3:53 am    Post subject: Reply to topic Reply with quote

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
_________________
SSC Distension Owner
SSCU Trench Wars Developer
Back to top
View users profile Send private message Add User to Ignore List Visit posters website AIM Address
Cancer+
Server Help Squatter


Age:36
Gender:Gender:Male
Joined: Aug 19 2005
Posts: 271
Offline

PostPosted: Wed Mar 28, 2007 3:59 am    Post subject: Reply to topic Reply with quote

Thanks Cheese.

I also had help by Solo. Thanks again, everything is good.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website AIM Address
Maverick
broken record


Age:39
Gender:Gender:Male
Joined: Feb 26 2005
Posts: 1521
Location: The Netherlands
Offline

PostPosted: Wed Mar 28, 2007 5:13 am    Post subject: Reply to topic Reply with quote

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
_________________
Nickname: Maverick (I changed my name!)
TWCore developer | Subspace statistics
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
L.C.
Server Help Squatter


Age:33
Gender:Gender:Male
Joined: Jan 03 2003
Posts: 574
Location: Missouri, US
Offline

PostPosted: Wed Mar 28, 2007 7:42 am    Post subject: Reply to topic Reply with quote

What are the recommended values then?

EDIT :: Nevermind.
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
Cancer+
Server Help Squatter


Age:36
Gender:Gender:Male
Joined: Aug 19 2005
Posts: 271
Offline

PostPosted: Wed Mar 28, 2007 11:42 am    Post subject: Reply to topic Reply with quote

Well, Shanky's FAQ's tell you how to do it, but doesn't say why?
Back to top
View users profile Send private message Add User to Ignore List Visit posters website AIM Address
Cheese
Wow Cheese is so helpful!


Joined: Mar 18 2007
Posts: 1017
Offline

PostPosted: Wed Mar 28, 2007 5:20 pm    Post subject: Reply to topic Reply with quote

omg mav.
ROFLROFLROFLROFL


i suppose i might update that.
are there others, like one for subbill.ini?
Back to top
View users profile Send private message Add User to Ignore List Visit posters website AIM Address
Maverick
broken record


Age:39
Gender:Gender:Male
Joined: Feb 26 2005
Posts: 1521
Location: The Netherlands
Offline

PostPosted: Thu Mar 29, 2007 3:29 am    Post subject: Reply to topic Reply with quote

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
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Cheese
Wow Cheese is so helpful!


Joined: Mar 18 2007
Posts: 1017
Offline

PostPosted: Thu Mar 29, 2007 7:12 pm    Post subject: Reply to topic Reply with quote

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
Back to top
View users profile Send private message Add User to Ignore List Visit posters website AIM Address
fatrolls
Novice


Age:36
Gender:Gender:Male
Joined: Jul 25 2013
Posts: 35
Offline

PostPosted: Sat Jan 25, 2014 1:29 pm    Post subject: Reply to topic Reply with quote

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.
Back to top
View users profile Send private message Add User to Ignore List
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> General Questions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 660 page(s) served in previous 5 minutes.

phpBB Created this page in 0.509780 seconds : 37 queries executed (80.6%): GZIP compression disabled