Page 1 of 1
CPU Usage when acceptNewConnections
Posted: 08 Sep 2010, 13:52
by Fun Bobby
Hi there,
visual vm shows me that most cpu usage (>50%) happens in it.gotoandplay.smartfoxserver.SmartFoxServer.acceptNewConnections().
Can you tell me what happens here behind the scenes? Or does it enclude further methods calls.
Best regards,
Posted: 08 Sep 2010, 19:24
by BigFIsh
You could try increasing your SysHandlerThreads by 1 as I think the 'connection' stuff is handled by the System Handler. More info via
http://www.smartfoxserver.com/docs/docP ... Safety.htm
Posted: 09 Sep 2010, 21:33
by Lapo
Visual VM sorts all methods by their resource usage. The fact that one particular method is taking 50% does not present any particular problem, unless you are investigating a performance issue.
Also these values vary a lot depending on what the server is doing at the moment of the measurement.
It's like saying that, under your OS (maybe Win or MacOS), Skype is taking 2% of the CPU on a total of 4% of busy CPU. That's 50% of the CPU, but it's not a problem.
Posted: 12 Sep 2010, 16:36
by Fun Bobby
@lapo: yes that´s clear. but we have some load on the servers and i´m trying to reduce it. So i am just want to now what is going on there in detail on what can be done to optimize this.
Posted: 14 Sep 2010, 09:30
by Lapo
That's the process that "welcomes" the users that are connecting. There's not much to be optimized there.
Are you sure that's the process that takes more CPU than anything else? I find this very weird. How long did you monitor the JVM? What's the load on the server?
Is this a dedicated machine or does it run more services?( Http, DBase etc... )
Posted: 23 Sep 2010, 15:08
by Fun Bobby
it is a dedicated maschine running only the sfs server with 12 cpu´s.
the load on the server is about 0.8-1.2
here is a snapshot of the vm after about 20min sampling

Posted: 24 Sep 2010, 13:43
by Lapo
the load on the server is about 0.8-1.2
What do you mean by load? Do you refer to CPU usage or what else?
Posted: 24 Sep 2010, 18:45
by Fun Bobby
yes i mean 80%-120% from the theoretical 1200% of the 12 cpus
Posted: 25 Sep 2010, 06:28
by Lapo
It would help a lot if instead of providing small bits of information you could explain clearly what the problem is. At this point I am a little lost at understanding what we are looking for.
If your CPU uses less than 10% of it's overall capacity it is clear that it's not not running out of resources.
Please take a look at our posting rules for reporting issues:
http://forums.smartfoxserver.com/viewtopic.php?t=3307