SmartFoxServer server xml

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

Moderators: Lapo, Bax

moonlife
Posts: 45
Joined: 26 Sep 2016, 08:22

SmartFoxServer server xml

Postby moonlife » 31 Mar 2021, 09:40

Hello,

I wonder what our server configurator's settings should be?

Our server information is 256gb ram & 2 x Intel Xeon Gold 6226R
2.9GHz/3.9GHz 32 Core CPU (64 Core HT)

Our current Smartfox server configs as follows

System thread pool

Core threads : 4
Backup threads: 16
Maximum backups: 64
Queue size triggering a backup: 100
Backup triggering time: 50
Backup threads expiration: 3600
Queue size preventing backup expiration: 60

Extension thread pool

Core threads: 4
Backup threads: 16
Maximum backups: 64
Queue size triggering a backup: 100
Backup triggering time: 50
Backup threads expiration: 3600
Queue size preventing backup expiration: 60


I wonder if settings look fine? Or Should we change it?

Besides, is there other settings we need to change for better performance?

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

Re: SmartFoxServer server xml

Postby Lapo » 31 Mar 2021, 10:09

Hi,
changing the settings for performance boost depends on the context, i.e. the specific use case.

Keep in mind that SFS2X is already able to adapt to many different types of load thanks to its auto-load-balancing thread pools, so normally you don't need to intervene manually.

There can be situations in which tweaks might be needed for special use cases, for example is your server side code invokes remote HTTP services and therefore wastes lots of time waiting for external I/O.

Hope it helps.
Lapo
--
gotoAndPlay()
...addicted to flash games
moonlife
Posts: 45
Joined: 26 Sep 2016, 08:22

Re: SmartFoxServer server xml

Postby moonlife » 31 Mar 2021, 11:12

Hi Lapo,

Thanks for your response,

I asked this question because of below.

Especially in our game, players can use plenty of extension requests,

In Java extension we are using java mysql connector and several room variable updates.

Generally our CCU is between 500 - 1000. But in an hour or two hours later our server can't response immediately.

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

Re: SmartFoxServer server xml

Postby Lapo » 31 Mar 2021, 14:32

You should investigate the issue more. It could be that when there's a lot of traffic towards the database and your server becomes heavily I/O bound, maybe because the DB can't keep up? Difficult to say without the details.

I would recommend a couple of things:
1) monitor the database during peak traffic and see if it's running fine or it is struggling
2) monitor the average time of a DB request (you can do it in your Extension and print it to the logs for later inspection)
3) monitor SFS2X during peak traffic via the AdminTool > Dashboard and check the main "vital signs" such as CPU usage, memory usage and also the state of the queues which can tell a lot.

Also, quick questions:
- does the DB run on the same machine?
- or does it run in the same local network?

Let us know
Lapo

--

gotoAndPlay()

...addicted to flash games
moonlife
Posts: 45
Joined: 26 Sep 2016, 08:22

Re: SmartFoxServer server xml

Postby moonlife » 31 Mar 2021, 14:45

DB runs same machine.

Thanks for the details.
moonlife
Posts: 45
Joined: 26 Sep 2016, 08:22

Re: SmartFoxServer server xml

Postby moonlife » 01 Apr 2021, 07:55

Hi again Lapo,

We have tested our server with several players. During the test, the IT specialist investigated our server log.

In this test we are experienced, SmartFoxServer uses too many CPU. Details and screenshot are as follow.

What should we do to prevent high CPU usage?

smartfox_log.png
(22.69 KiB) Not downloaded yet


home/testdomain/SmartFoxServer_2X/jre/bin/java -server -Dfile.encoding=UTF-8 -Dfile.encoding=UTF-8 -classpath ./:lib/*:lib/apache-tomcat/bin/*:extensions/__lib__/*:/home/testdomain/SmartFoxServer_2X/.install4j/i4jru
ntime.jar:/home/testdomain/SmartFoxServer_2X/.install4j/launcherb85e9ba4.jar:/home/testdomain/SmartFoxServer_2X/SFS2X:/home2/velopoker/SmartFoxServer_2X/SFS2X/lib/*:/home/testdomain/SmartFoxServer_2X/SFS2X/extensions/__lib__/*:/home/testdomain/SmartFoxServer_2X/SFS2X/lib/apache-tomcat/bin/* install4j.com.smartfoxserver.v2.Main start
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: SmartFoxServer server xml

Postby Lapo » 01 Apr 2021, 09:14

Hi,
for starters you could tell us what this test is doing? :)
What requests are sent to the server? How many concurrent clients etc...?

Also does the server run custom Extension code?
If so, I would highly recommend to run your test in a local environment alongside a java profile to find what is actually causing the high CPU usage.

Here's a complete guide to get pinpoint performance issues:
http://docs2x.smartfoxserver.com/Advanc ... ive-server

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 66 guests