CPU Usage increased dramatically

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

User avatar
trungnt85
Posts: 16
Joined: 10 Jun 2017, 03:58

CPU Usage increased dramatically

Postby trungnt85 » 09 Jul 2017, 12:06

Hi,

I have a problem as following:
Same smartfoxserver instance running on ubuntu 16.04.1, if zone extension connect to mysql instance running on same server (mysql 5.7.18) CPU usage increased dramatically whenever new user login ( 6-7% / per user). But if I change to mysql instance running on test server which running Ubuntu 14, CPU usage is normal under 1%

Anyone dealt with same problem?
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: CPU Usage increased dramatically

Postby Lapo » 09 Jul 2017, 16:32

Hi,
you should take a look at which process is actually using up the CPU. I doubt it's SFS.
Use top/htop to keep an eye on what's going on. Maybe there's some issue with the DB?

Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
trungnt85
Posts: 16
Joined: 10 Jun 2017, 03:58

Re: CPU Usage increased dramatically

Postby trungnt85 » 10 Jul 2017, 01:42

Yes, it's issue with the database I guess. I posted here so anyone did deal with same problem might provide a solution. Kind of weird though
User avatar
trungnt85
Posts: 16
Joined: 10 Jun 2017, 03:58

Re: CPU Usage increased dramatically

Postby trungnt85 » 10 Jul 2017, 04:05

As I ran top command on server, Java took 300% CPU, each user logged in will result in 100% increase
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: CPU Usage increased dramatically

Postby Lapo » 10 Jul 2017, 07:15

Check the AdminTool's Dashboard and take a screenshot of both views (main and queue) when the problem is present.
Then post it here. It sounds like an issue with your Extension code.

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games
User avatar
trungnt85
Posts: 16
Joined: 10 Jun 2017, 03:58

Re: CPU Usage increased dramatically

Postby trungnt85 » 11 Jul 2017, 03:04

Image
Image

Please check above images, SFSWorker extension take up 95% CPU usage
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: CPU Usage increased dramatically

Postby Lapo » 11 Jul 2017, 06:15

Hi,
since SFSWorker threads handle exclusively Extension code, I would suggest to check your server side code. Evidently something is working continuously (apparently) and taking up resources.

Maybe some kind of loop or scheduled task that is working hard?
Does this happen in your development environment using the same server side code?

p.s. = the screenshots are pretty small so I can't really read any values
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: Thomasea and 60 guests