CPU Usage when acceptNewConnections

Post here your questions about Actionscript and Java server side extensions development.

Moderators: Lapo, Bax

Post Reply
Fun Bobby
Posts: 48
Joined: 26 Sep 2008, 11:23

CPU Usage when acceptNewConnections

Post 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,
BigFIsh
Posts: 1698
Joined: 25 Feb 2008, 19:26
Location: New Zealand

Post 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
Smartfox's forum is my daily newspaper.
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post 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.
Lapo
--
gotoAndPlay()
...addicted to flash games
Fun Bobby
Posts: 48
Joined: 26 Sep 2008, 11:23

Post 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.
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post 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... )
Lapo
--
gotoAndPlay()
...addicted to flash games
Fun Bobby
Posts: 48
Joined: 26 Sep 2008, 11:23

Post 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



Image
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post 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?
Lapo
--
gotoAndPlay()
...addicted to flash games
Fun Bobby
Posts: 48
Joined: 26 Sep 2008, 11:23

Post by Fun Bobby »

yes i mean 80%-120% from the theoretical 1200% of the 12 cpus
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post 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
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply