cpu usage increased

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

Moderators: Lapo, Bax

snehil89
Posts: 21
Joined: 25 Sep 2014, 08:52

cpu usage increased

Postby snehil89 » 03 Apr 2019, 09:40

Hi,

We have recently upgraded our smartfox server version from 2.9.2 to 2.13.4. When compared to previous versison, a constant increase in cpu usage can be seen, even at the time of low traffic. Can this be due to any update in core engine libraries ? Is this normal ? PFA screenshot for your reference.

cpu_usage_by_month.png
(58.94 KiB) Not downloaded yet



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

Re: cpu usage increased

Postby Lapo » 03 Apr 2019, 09:44

Hi,
it's difficult to say. Are you using websockets maybe?

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
snehil89
Posts: 21
Joined: 25 Sep 2014, 08:52

Re: cpu usage increased

Postby snehil89 » 03 Apr 2019, 13:07

Lapo wrote:Hi,
it's difficult to say. Are you using websockets maybe?

Thanks


Yes , we are using websockets !
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: cpu usage increased

Postby Lapo » 03 Apr 2019, 13:58

Ok, that's likely the cause.
Back in SFS2X 2.9 we were still using Netty as the engine for websockets and Jetty for the other HTTP-based services.

We've dropped it a few versions later as we needed to consolidate all HTTP-based services under one engine, so that they are easier to configure and manage. Now websockets is also powered by Jetty.

Jetty however is more resource intensive than Netty 3.x, though the latter wasn't entirely compatible with the websocket standards, another reason why we had to upgrade.

The extra CPU usage is definitely coming from Jetty, but you can improve it by a good margin by downloading and installing the latest patch 2.13.5, which addresses the CPU usage, with a good 40-50% improvement in most cases.
https://www.smartfoxserver.com/download/#p=updates

Hope it helps
Lapo

--

gotoAndPlay()

...addicted to flash games
ArthurGen
Posts: 1
Joined: 08 Apr 2019, 08:56

Re: cpu usage increased

Postby ArthurGen » 09 Apr 2019, 11:42

This was driving me crazy. Glad there's a solution though. My CPU is struggling big time. Cheers, Lapo!
People who snore a lot should consider these anti snoring devices if they want to stop.
snehil89
Posts: 21
Joined: 25 Sep 2014, 08:52

Re: cpu usage increased

Postby snehil89 » 02 May 2019, 08:54

Hi Lapo,

Just for knowlwdge, can this be because of native memory leakage happening due to the following exception

"I/O Exception writing byte[] to websocket: org.eclipse.jetty.websocket.api.WebSocketException: RemoteEndpoint unavailable, current state [CLOSED], expecting [OPEN or CONNECTED]"

Regards

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 73 guests