Quantcast
Channel: Ignite Realtime : Unanswered Discussions - Support
Viewing all articles
Browse latest Browse all 4979

Maximum concurrent users possible with Smack?

$
0
0

Hello,

 

I'm trying to stress test a XMPP server using smack. Two questions:

 

I need to have more than 20k concurrent users on the server but my testing infra-structure only goes up to 4k before it stops logging in the users. I was monitoring memory usage and noticed that in this case the memory usage was a little over 80% so I'm guessing smack might be using too much memory.

 

Every time I need to login with a new user what I do is:

 

ConnectionConfiguration config = new ConnectionConfiguration(SERVER);

this.connection = new XMPPTCPConnection(config);

this.connection.login(this.number, this.password);

Presence presence = new Presence(Presence.Type.available);

this.connection.sendPacket(presence);

this.chatManager = ChatManager.getInstanceFor(connection);

this.chatManager.addChatListener(//Do nothing...);

 

All of these 'users' are stored in a Java Map. I can't discard them because I need these users to be concurrent users so if I delete them the connection will be closed and the user disconnected. My worry is that this might be using too much memory (not sure yet but I decided to tackle this first). My questions are, is there any way to keep a user logged-in using smack without having to use all this overhead? Has anyone been able to get concurrent users to a really high number (e.g. 20k+)? Is it possible to optimize the memory usage in any way here?

 

 

 

 

One more unrelated question, has anyone gotten this error:

 

org.jivesoftware.smack.XMPPConnection callConnectionClosedOnErrorListener

WARNING: Connection closed with error

stream:error (conflict) text: Replaced by new connection

at org.jivesoftware.smack.tcp.PacketReader.parsePackets(PacketReader.java:226)

at org.jivesoftware.smack.tcp.PacketReader.access$000(PacketReader.java:47)

at org.jivesoftware.smack.tcp.PacketReader$1.run(PacketReader.java:81)

 

I realize this happens because I want to re-login with a subscriber without making him log-out (i.e. I don't .disconnect() before calling .login() again on the same subscriber - this is to simulate a network outage). The problem is that this exception is cluttering my output so I have to redirect stderr. I haven't been able to override the exception as well. Anyone have any ideas on how to stop this exception?


Viewing all articles
Browse latest Browse all 4979

Trending Articles