Hi,
I have been developing a tower defense type game where server is sending updates about game state every 1 second as of now to the clients.
There are only two clients as of now.
What's happening is when I am testing it on my pc running SFS on localhost, after some time the CPU usage suddenly jumps from 1.5% to 25% and it basically stops sending updates.
The main process shown in sfs admin panel is pool-1-thread-4 or pool-1-thread-3 which I guess is the main scheduler thread?
I wonder if this is something wrong in my server code or just that my PC trying to kill sfs ?
Attaching image of admin panel . Hope this helps to identify the issue .
CPU Usage jumps and Game Update stops pool-1-thread-4
Re: CPU Usage jumps and Game Update stops pool-1-thread-4
Hi,
it looks weird indeed. There's also a lot of system activity from other processes (the cyan graph in the CPU monitor), maybe you're running the clients on the same PC?
In any case it sounds like an issue with your server side code. Can you describe what your server code does in broad terms?
You mentioned using the Scheduler(s). Can you tell me more about your use case?
I would recommend to try and reproduce the problem again and when the server becomes unresponsive again take also a screenshot of the "Message queues status" tab in the AdminTool.
If that's not enough we can grab a thread dump from the server too, to see the state of all threads:
viewtopic.php?f=18&t=14458
Let us know
it looks weird indeed. There's also a lot of system activity from other processes (the cyan graph in the CPU monitor), maybe you're running the clients on the same PC?
In any case it sounds like an issue with your server side code. Can you describe what your server code does in broad terms?
You mentioned using the Scheduler(s). Can you tell me more about your use case?
I would recommend to try and reproduce the problem again and when the server becomes unresponsive again take also a screenshot of the "Message queues status" tab in the AdminTool.
If that's not enough we can grab a thread dump from the server too, to see the state of all threads:
viewtopic.php?f=18&t=14458
Let us know
Re: CPU Usage jumps and Game Update stops pool-1-thread-4
Lapo wrote:Hi,
it looks weird indeed. There's also a lot of system activity from other processes (the cyan graph in the CPU monitor), maybe you're running the clients on the same PC?
In any case it sounds like an issue with your server side code. Can you describe what your server code does in broad terms?
You mentioned using the Scheduler(s). Can you tell me more about your use case?
I would recommend to try and reproduce the problem again and when the server becomes unresponsive again take also a screenshot of the "Message queues status" tab in the AdminTool.
If that's not enough we can grab a thread dump from the server too, to see the state of all threads:
viewtopic.php?f=18&t=14458
Let us know
Yes I am running the client on same PC to test out .
My Serverside code:
The client sends request to create a unit at some location. Then server does astar pathfinding for the newly created client to make it move towards nearest enemy unit.
This proceeds as client keeps requesting for more units. So it goes down at around 30 units.
The scheduler is running every 50 seconds to get path for all units and then send it to the client. Currently the scheduler process is completing within like 100 ms. But in that last time it gets stuck and never completes. I wonder if it can be somehow the pathfinding is getting stuck?
Update: Okay I did extensive debugging and got to know the error, My pathfinding code was giving error when unit was blocked from all sides. It is working fine now.
Thanks! Can I know how any executor threads should i keep in zoneserver settings to keep up with game.
What are the cases when I should or should not increase executor threads.
Re: CPU Usage jumps and Game Update stops pool-1-thread-4
The Extension threads rarely need to be tweaked because they use auto-load balancing, so they are added and removed when necessary.
In some cases you may simply need to allow for more threads to be auto-created, but this is usually only needed when you have 100s of slow operations running at the same time (such as slow I/O)
Cheers
In some cases you may simply need to allow for more threads to be auto-created, but this is usually only needed when you have 100s of slow operations running at the same time (such as slow I/O)
Cheers
Who is online
Users browsing this forum: No registered users and 132 guests