slow /delay process worker and thread

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

devgamezz
Posts: 1
Joined: 23 Dec 2022, 09:27

slow /delay process worker and thread

Postby devgamezz » 23 Dec 2022, 09:46

Hi sir,

i want to ask about the process in my production sfs, so 2 days ago i have slow process from 1 logic to another logic, it's only simple logic, but it take 10ms, this only happend some times, on normally the logic take 0ms. is there any debug tools or any help, thanks
i am using license for 2000, and max can 800 user.

exampe sfs worker 436, from 011 ms, finis 017ms, normally it take 0-1ms.
and the order sort the time is not sorting also, is there problem with the cpu or thread?



Code: Select all

21 Dec 2022 | 20:46:52,011 | INFO  | SFSWorker:Ext:234 | Extensions |   
21 Dec 2022 | 20:46:52,011 | INFO  | SFSWorker:Ext:436 | Extensions |   
21 Dec 2022 | 20:46:52,011 | INFO  | SFSWorker:Ext:38 | Extensions |     
21 Dec 2022 | 20:46:52,017 | INFO  | SFSWorker:Ext:219 | Extensions |   
21 Dec 2022 | 20:46:52,017 | INFO  | SFSWorker:Ext:436 | Extensions |   
21 Dec 2022 | 20:46:52,017 | INFO  | SFSWorker:Ext:234 | Extensions |   
21 Dec 2022 | 20:46:52,017 | INFO  | SFSWorker:Ext:208 | Extensions | 
21 Dec 2022 | 20:46:52,017 | INFO  | SFSWorker:Ext:135 | Extensions |   
21 Dec 2022 | 20:46:52,016 | INFO  | SFSWorker:Ext:269 | Extensions |   
21 Dec 2022 | 20:46:52,016 | INFO  | SFSWorker:Ext:218 | Extensions | 
21 Dec 2022 | 20:46:52,016 | INFO  | pool-1-thread-405 | Extensions | 
21 Dec 2022 | 20:46:52,015 | INFO  | SFSWorker:Ext:75 | Extensions |   
21 Dec 2022 | 20:46:52,019 | INFO  | SFSWorker:Ext:218 | Extensions |     
21 Dec 2022 | 20:46:52,019 | INFO  | SFSWorker:Ext:269 | Extensions |   
21 Dec 2022 | 20:46:52,019 | INFO  | SFSWorker:Ext:135 | Extensions |     
21 Dec 2022 | 20:46:52,018 | INFO  | SFSWorker:Ext:234 | Extensions |   
21 Dec 2022 | 20:46:52,018 | INFO  | SFSWorker:Ext:436 | Extensions |   
21 Dec 2022 | 20:46:52,018 | INFO  | SFSWorker:Ext:172 | Extensions |   
21 Dec 2022 | 20:46:52,018 | INFO  | pool-1-thread-18 | Extensions |     
21 Dec 2022 | 20:46:52,017 | INFO  | SFSWorker:Ext:38 | Extensions |   
21 Dec 2022 | 20:46:52,021 | INFO  | pool-1-thread-405 | Extensions |   
21 Dec 2022 | 20:46:52,021 | INFO  | pool-1-thread-405 | Extensions |     
21 Dec 2022 | 20:46:52,021 | INFO  | pool-1-thread-405 | Extensions |   
21 Dec 2022 | 20:46:52,020 | INFO  | SFSWorker:Ext:208 | Extensions |   
21 Dec 2022 | 20:46:52,020 | INFO  | SFSWorker:Ext:436 | Extensions |   
21 Dec 2022 | 20:46:52,020 | INFO  | SFSWorker:Ext:234 | Extensions |   
21 Dec 2022 | 20:46:52,020 | INFO  | SFSWorker:Ext:135 | Extensions |     
21 Dec 2022 | 20:46:52,020 | INFO  | SFSWorker:Ext:269 | Extensions |   
21 Dec 2022 | 20:46:52,020 | INFO  | SFSWorker:Ext:218 | Extensions |   



this is normal order

Code: Select all

21 Dec 2022 | 20:50:27,941 | INFO  | pool-1-thread-378 | Extensions |     |
21 Dec 2022 | 20:50:27,942 | INFO  | pool-1-thread-378 | Extensions |     |
21 Dec 2022 | 20:50:27,942 | INFO  | pool-1-thread-378 | Extensions |     |
21 Dec 2022 | 20:50:27,942 | INFO  | pool-1-thread-378 | Extensions |     |
21 Dec 2022 | 20:50:27,942 | INFO  | pool-1-thread-378 | Extensions |     |
21 Dec 2022 | 20:50:27,942 | INFO  | pool-1-thread-378 | Extensions |     |
21 Dec 2022 | 20:50:27,943 | INFO  | SFSWorker:Ext:318 | Extensions |     |
21 Dec 2022 | 20:50:27,944 | INFO  | pool-1-thread-378 | Extensions |     |
21 Dec 2022 | 20:50:27,943 | INFO  | SFSWorker:Ext:316 | Extensions |     |
21 Dec 2022 | 20:50:27,944 | INFO  | pool-1-thread-378 | Extensions |     |
21 Dec 2022 | 20:50:27,944 | INFO  | pool-1-thread-378 | Extensions |     |
21 Dec 2022 | 20:50:27,944 | INFO  | pool-1-thread-378 | Extensions |     |
21 Dec 2022 | 20:50:27,945 | INFO  | pool-1-thread-378 | Extensions |     |
21 Dec 2022 | 20:50:27,945 | INFO  | pool-1-thread-378 | Extensions |     |
21 Dec 2022 | 20:50:27,945 | INFO  | pool-1-thread-378 | Extensions |     |
21 Dec 2022 | 20:50:27,945 | INFO  | SFSWorker:Ext:318 | Extensions |     |
21 Dec 2022 | 20:50:27,946 | INFO  | SFSWorker:Ext:318 | Extensions |     |
21 Dec 2022 | 20:50:27,946 | INFO  | SFSWorker:Ext:318 | Extensions |     |
21 Dec 2022 | 20:50:27,946 | INFO  | SFSWorker:Ext:318 | Extensions |     |
21 Dec 2022 | 20:50:27,948 | INFO  | pool-1-thread-378 | Extensions |     |
21 Dec 2022 | 20:50:27,948 | INFO  | pool-1-thread-378 | Extensions |     |
21 Dec 2022 | 20:50:27,949 | INFO  | pool-1-thread-378 | Extensions |     |
21 Dec 2022 | 20:50:27,949 | INFO  | SFSWorker:Ext:318 | Extensions |     |
21 Dec 2022 | 20:50:27,949 | INFO  | SFSWorker:Ext:318 | Extensions |     |
21 Dec 2022 | 20:50:27,949 | INFO  | pool-1-thread-378 | Extensions |     |
21 Dec 2022 | 20:50:27,951 | INFO  | SFSWorker:Ext:318 | Extensions |     |
21 Dec 2022 | 20:50:27,951 | INFO  | SFSWorker:Ext:318 | Extensions |     |
21 Dec 2022 | 20:50:27,951 | INFO  | SFSWorker:Ext:493 | Extensions |     |
21 Dec 2022 | 20:50:27,952 | INFO  | pool-1-thread-378 | Extensions |     |
21 Dec 2022 | 20:50:27,953 | INFO  | SFSWorker:Ext:318 | Extensions |     |
21 Dec 2022 | 20:50:27,954 | INFO  | SFSWorker:Ext:318 | Extensions |     |
21 Dec 2022 | 20:50:27,954 | INFO  | pool-1-thread-378 | Extensions |     |
21 Dec 2022 | 20:50:27,954 | INFO  | SFSWorker:Ext:318 | Extensions |     |
21 Dec 2022 | 20:50:27,954 | INFO  | SFSWorker:Ext:318 | Extensions |     |
21 Dec 2022 | 20:50:27,954 | INFO  | SFSWorker:Ext:318 | Extensions |     |
21 Dec 2022 | 20:50:27,955 | INFO  | SFSWorker:Ext:318 | Extensions |     |
21 Dec 2022 | 20:50:27,955 | INFO  | SFSWorker:Ext:318 | Extensions |     |
21 Dec 2022 | 20:50:27,956 | INFO  | SFSWorker:Ext:18 | Extensions |     |
21 Dec 2022 | 20:50:27,956 | INFO  | pool-1-thread-378 | Extensions |     |
21 Dec 2022 | 20:50:27,956 | INFO  | SFSWorker:Ext:318 | Extensions |     |
21 Dec 2022 | 20:50:27,956 | INFO  | SFSWorker:Ext:18 | Extensions |     |
21 Dec 2022 | 20:50:27,956 | INFO  | pool-1-thread-378 | Extensions |     |
21 Dec 2022 | 20:50:27,957 | INFO  | pool-1-thread-378 | Extensions |     |
21 Dec 2022 | 20:50:27,956 | INFO  | SFSWorker:Ext:18 | Extensions |     |
21 Dec 2022 | 20:50:27,957 | INFO  | SFSWorker:Ext:18 | Extensions |     |
21 Dec 2022 | 20:50:27,957 | INFO  | SFSWorker:Ext:18 | Extensions |     |
21 Dec 2022 | 20:50:27,957 | INFO  | SFSWorker:Ext:18 | Extensions |     |
21 Dec 2022 | 20:50:27,957 | INFO  | SFSWorker:Ext:18 | Extensions |     |
21 Dec 2022 | 20:50:27,957 | INFO  | pool-1-thread-104 | Extensions |     |
21 Dec 2022 | 20:50:27,957 | INFO  | SFSWorker:Ext:18 | Extensions |     |
21 Dec 2022 | 20:50:27,957 | INFO  | pool-1-thread-225 | Extensions |     |
21 Dec 2022 | 20:50:27,958 | INFO  | pool-1-thread-378 | Extensions |     |
21 Dec 2022 | 20:50:27,958 | INFO  | SFSWorker:Ext:18 | Extensions |     |


thanks sir for the help,
merry christmas.. cheers
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: slow /delay process worker and thread

Postby Lapo » 23 Dec 2022, 15:30

Hi,
changes in execution times may depend on the state of the server, how many threads are working concurrently and especially how much CPU is being used at one specific moment.
If there are hundreds of active threads (as it seems from your description) it may also cause some small delays due to context switching. Finally you also need to take into account garbage collection pauses.

As regards the max 800 Users that you have mentioned it's not clear what you mean, exactly.
Are you aware of more Users trying to connect and not being able to do so? If so what kind of errors do you see. We need more details to understand.

Hapy holydays to you too :)
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: slow /delay process worker and thread

Postby Lapo » 23 Dec 2022, 15:33

One more thing.
The list of messages you have posted are not very clear as well as there is no log message, so it's not possibile to understand what they refer to. In any case many of these messages are generated in the same millisecond which suggests you are logging too much data.

I would not recommend generating multiple log messages per millisecond as this becomes taxing in terms of performance and will also grow the log files to massive size.

Cheers
Lapo

--

gotoAndPlay()

...addicted to flash games
kapiljain042
Posts: 1
Joined: 08 Jan 2021, 11:28

Re: slow /delay process worker and thread

Postby kapiljain042 » 25 Aug 2023, 09:40

Hello
I have turn based multiplayer game developed using SFS
Game is working fine upto 200CCU
But when goes to 500CCU thread becomes slow and user misses turn
Please help us this is very urgent
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: slow /delay process worker and thread

Postby Lapo » 25 Aug 2023, 14:45

kapiljain042 wrote:Hello
I have turn based multiplayer game developed using SFS
Game is working fine upto 200CCU
But when goes to 500CCU thread becomes slow and user misses turn
Please help us this is very urgent

Hi,
if you're using a commercial license get in touch with us using our support@ email box with more details about the problem and we'll help you out.

See here for the info we need: viewtopic.php?f=18&t=16497

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 46 guests