How many connections can Openfire handle?

Hi Alex,

Regarding your “Correct Answer”.

What do you mean all users are cached. I need a seamless experience for my end-user. I mean even if Openfire crashes, Clustering or some other fault-tolerant technology, should help me achieve a seamless experience for the end-user.

i.e He shoudls still be able to do IM without realizing that a crash or something wrong has happened.

Is this possible with 200,000 users.

Your answer says 200,000 users but i would be happy with atleast 20,000-50,000 users as long as Openfire is stable. Then its just a question of deploying more servers for more users.

Thanks

Vinu

I mean, to get good performance I had to do a first pass and log in each and every user in order for them to get cached. If Openfire has to read users from DB, the performance drops sharply. I tested this with a single server using PostgreSQL, ymmv.

Clustering will help by caching sessions and such, but there are clients (like Apple’s iMessage - or whatever it’s called) that just won’t do SRV lookups. These will have no option, but to log in again. Unless you’re prepared to work some low-level networking magic.

I hope this clears things up a bit for you,

Alex

1 Like

I am still very new to XMPP and OpenFire and even moderately familiar with Java. So I dont understand all the terminologies. Hope to get there in the next few weeks.

Can you explain what you mean by low-level netowrking magic. Are you talking about BSD socket programming at a TCP/IP level. What kind of networking magic are you talking about?

I heard that a company called Nimbuzz uses OpenFire and they claim to have 150 million users. So I dont know how they are handling such a large user base with OpenFire.

I mean, if the client desn’t do DNS SRV lookups, it will use an IP to connect. If you want the server to change, but at the same time the client to continue using the same IP, you’ll need a solution that’s lower level than IP. I have no idea what that solution would look like.

At last we get more than 300k user per server.

the server is Xeon E5-2620 X2 ,32GB RAM。

Just tweek ofcaches and the server limits.

Thank you for sharing this especially the openfire screenshot

Hi Zeus,

Thanks for the screenshot, we are running similar tests but couldn’t achieve more than 5k users.

It would help us if you could share the OS tuning parameters and cache sizes in Openfire. Though we’ve gone through this forum to get this info, somehow we are unable to shoot up above 5k.

This could help us verify our settings once again. Below are the existing configurations in our system.

OS Params:

cat /proc/sys/fs/file-max

fs.file-max =102642

open files (-n)65536

ulimit -Hn

65536

ulimit -Sn

65536

Cache Size:

cache.group.size → -1

cache.userCache.size → -1

cache.username2roster.size → -1

cache.vcardCache.size → -1

we tuning the limits.comf as this

  • - nofile   819200
    
    • nproc 409600

65535 is too less, it only can support 20k user.

change the openfire.sh as this

openfire_exec_command=“exec $JAVACMD -server $OPENFIRE_OPTS -Xmx30000M -Djava.nio.channels.spi.SelectorProvider=sun.nio.ch.EPollSelectorProvider -classpath “$LOCALCLASSPATH” -jar “$OPENFIRE_LIB/startup.jar””

Xmx as your memory, and use sun nio selector.

Most important the tsung client must be tunning.

change the sysctl.conf

net.ipv4.ip_local_port_range = 1024 65535

close the selinux and iptables

setenforce 0

service iptables stop

change the /etc/security/limits.conf

  • -           nofile          409600
    
    •        nproc          102400
      

Also the network is important.If you use the Internet, you can consider the route and firewall problem.The homeuse route can only support 5000 user max.

We test the result from LAN.

1 Like

Hi Zeus2,

Thanks for your prompt response and time. Please confirm if Roster Creation was ALSO involved in your usecase.

We’ve made the tuning as mentioned above but still face the same issues.

We’ve used JMeter Bean Sampler which calls a method and does the following.

  1. Open a WS(websocket) connection to OpenFire

  2. Pass an IQ stanza for UserCreation

  3. Close the WS connection.

We’ve written custom plugins in OpenFire to intercept the packet and create the User synchronously and create the Roster for the User asynchronously. We see there is a considerable delay in creating the Roster, which is too slow in Openfire. We’ve configured 25 DB Connections.

Let us know if we are missing anything

Regards

-Srini

We haven’t test that case.

But we found that the **Hazelcast **cluster plugin casue a bad performance when the message transfer from one server to another in the same cluster.

I did some recent load tests that were quite impressive.

OpenFire Single Server Load Testing 120,000 Concurrent Connections

2 Likes