Page 2 of 2

Posted: 02 Jul 2009, 06:31
by Lapo
The problem is not a matter of latency.
It is a matter of how fast the client can deal with the mass of messages sent back by the server

20 users in the same room firing 10msg/sec produce a total of 4000 messages per second.

If the client simulator runs on a single machine (hopefully not the same that runs SFS!) you must make sure that it is capable of dealing with all those messages coming back. That's quite a bit of processing to do there.
There are 4K messages to deserialize and execute on every second.

If the client application doesn't keep up, the server messages will remain in the "network pipe". This eventually forces the server to store those messages in the client queue until it reaches full capacity. After that it is forced to drop messages.

Since your configuration only allows 1 dropped message, it is pretty evident why your clients are disconnected.

Please do take into considerations these issues when running stress tests.
You blame the server of dropping messages but the problem is that server is simply responding as fast as it can, firing all those messages back the client. If the client doesn't keep up and "remove" all that data from the network pipe, the server will not be able to write more data, it will store it in queues and then drop messages just to avoid to explode :)
If this mechanism was not in place you would eventually see the Server JVM collapse due to an OutOfMemoryError.

Posted: 03 Jul 2009, 14:08
by Praveen
What would be the impact on server if we increae Client Queue size in the Config file? Say the value is increased to 1000.

Posted: 06 Jul 2009, 05:34
by Lapo
You would delay the dropped messages.

Posted: 06 Jul 2009, 05:54
by Praveen
Other than delaying dropped messages; any memory related issues??

Posted: 06 Jul 2009, 06:03
by Lapo
The larger the queues the more memory is requested. But there're other variables: the number of concurrent users and the size of the messages kept in the queues.

You learn more about adjust your memory settings at chapter 2.2 of the docs:
http://www.smartfoxserver.com/docs/docP ... nced.htm#6

Posted: 14 Jul 2009, 14:39
by Denis
Hi!

I have the same problem with dropped messages during load testing. Unfortunately I have no way to use local network. Is there any way to emulate at least 100 concurrent in this case (test server from internet)?
Also I don't understand how can I control the lag if 100 users should execute some actions in concurrent mode and more than one user can execute some action almost at the same time.

Please advise.
Thanks.

Same problem

Posted: 15 Jul 2009, 11:26
by snaip20
Hi,
I have the same problem, but with java client API. I connect 8 users, 6 in one room and 2 in another. In the first room, some of users are disconnected for dropped messages. Each user sends messages every second.

Posted: 15 Jul 2009, 13:00
by Lapo
Hi,
you can adjust the tolerance of the server to dropped messages as well as the queue size of the clients.

More details are found in this guide:
http://www.smartfoxserver.com/docs/docP ... ooting.htm

Check 2nd section -> "Understanding Dropped Messages"