Hi, i have problem when ccu in my game ~1000 then outgoing message queue is very high => my game is lag
I tried set socketWriterThreadPoolSize = 8 in core.xml but it not effective
Help me please
Thanks!
[UGRENT] - Outgoing message queue size is very hight
Re: [UGRENT] - Outgoing message queue size is very hight
Hi,
you seem to be running an old SFS2X version, what version is it exactly?
As regards the issue you have described adding more threads it's unlikely to resolve the problem. The issue could be caused by two factors:
1- lack of bandwidth on the server side
2- too much data being sent to the clients
or a mix of the two.
The very big spikes in the graph of the outgoing data suggest that you're sending too much data at certain times, causing massive load on the network. In fact some of those spikes reach 60-70Mb/s while the base traffic is much lower.
If I had to guess why this is happening I would think that it's due to massive broadcasts, like sending messages in Rooms with hundreds or thousands of clients.
If you have created Rooms that hold hundreds of people you will need to be very careful with broadcast messages because that's what they do, they cause massive traffic.
Example -> Room for 500 people: if every one sends a public message at the same time you will have 500x500 message = 250.000 messages at once!
Hope it helps
you seem to be running an old SFS2X version, what version is it exactly?
As regards the issue you have described adding more threads it's unlikely to resolve the problem. The issue could be caused by two factors:
1- lack of bandwidth on the server side
2- too much data being sent to the clients
or a mix of the two.
The very big spikes in the graph of the outgoing data suggest that you're sending too much data at certain times, causing massive load on the network. In fact some of those spikes reach 60-70Mb/s while the base traffic is much lower.
If I had to guess why this is happening I would think that it's due to massive broadcasts, like sending messages in Rooms with hundreds or thousands of clients.
If you have created Rooms that hold hundreds of people you will need to be very careful with broadcast messages because that's what they do, they cause massive traffic.
Example -> Room for 500 people: if every one sends a public message at the same time you will have 500x500 message = 250.000 messages at once!
Hope it helps
Re: [UGRENT] - Outgoing message queue size is very hight
I'm using SFS version 2.13.0
As you say, my game has jackpot and we must broadcasts for all user on the interval period time (current it = 3 seconds).
Can you suggest for me handler it?
Thanks you!
As you say, my game has jackpot and we must broadcasts for all user on the interval period time (current it = 3 seconds).
Can you suggest for me handler it?
Thanks you!
Re: [UGRENT] - Outgoing message queue size is very hight
Can you clarify how this broadcast works?
Re: [UGRENT] - Outgoing message queue size is very hight
I created Runnable instance when server already, on the "run" method i send message to all user.
This is my code
This is my code
Code: Select all
SmartFoxServer.getInstance().getTaskScheduler().scheduleAtFixedRate(new UpdateJackPotAllGameServices(), 5, 3, TimeUnit.SECONDS);
Code: Select all
@Override
public void run() {
SendNotifyUpdateJackPotAllGame msg = new SendNotifyUpdateJackPotAllGame();
msg.data = this.data;
zoneServer.send(msg, new ArrayList<>(zoneServer.getExt().getParentZone().getUserList()));
}
Re: [UGRENT] - Outgoing message queue size is very hight
I've given a second look at the pictures you have posted and I don't think there's anything wrong with your server setup.
The "Outgoing queue" graph has small spikes up to 800-900 messages that correlate with the code you have posted, meaning that all of a sudden your code will generate a spike of outgoing traffic, which is rapidly dealt with. In fact the spikes are very thin, meaning that the queue is filled and emptied very fast.
You could worry about those spikes if they covered very large areas of the graph, but this is not the case. Also I don't recommend adding more threads because it won't make any difference. The speed at which data is sent out depends only on 2 factors: your server side bandwidth and the client's ability to receive data.
Hope it helps
The "Outgoing queue" graph has small spikes up to 800-900 messages that correlate with the code you have posted, meaning that all of a sudden your code will generate a spike of outgoing traffic, which is rapidly dealt with. In fact the spikes are very thin, meaning that the queue is filled and emptied very fast.
You could worry about those spikes if they covered very large areas of the graph, but this is not the case. Also I don't recommend adding more threads because it won't make any difference. The speed at which data is sent out depends only on 2 factors: your server side bandwidth and the client's ability to receive data.
Hope it helps
Who is online
Users browsing this forum: No registered users and 106 guests