Performance / Scalability F.A.Q.

Revision 1.3, last update: February 2009


This is a collection of frequently asked question regarding performance and scalability of the server.

 

How many concurrent clients can SmartFoxServer handle?

This is a very difficult question to answer. There are many factors that will affect the final result; the most important are:

1. The hardware and operating system
2. What the multiplayer application does
3. The complexity of the server side extension (your custom server logic)

We'll briefly examine these 3 aspects:

1 -> Hardware and OS
SmartFoxServer scales very well on multi-core / multi-cpu machines.
If you plan to build a high traffic (10-20k+ concurrent players) multiplayer application/game we would recommend to buy a dedicated server machine with a recent dual-quad processor (i.e. 2 dual core Xeon(s)) and at least 1 Gb of RAM.
Under all our tests we have found Linux to be the best performing and most stable operating system, especially under heavy loads.

You can check detailed performance number in this white paper.

2 -> What your multiplayer application does
There's a huge difference between a chat application or simple turn-based game and an advanced real-time game with complex server side logic. While the former consumes very little server resources the latter can add significant load on the server process. Also the amount of data being transferred by the server has in important impact on the overall performance.

3 -> The complexity of your server side extension
SmartFoxServer offers a powerful framework for developing multiplayer games, just like PHP or JSP do for dynamic web pages.
Because of this it's pretty difficult to predict how an application will behave without knowing the datails of the server side part.
Complex simulations and calculations on the server side can overload the server process.
We strongly recommend to profile your application in the early development stages, to avoid performance problems when going live.

Just to give you an idea, a dedicated dual-cpu server (2.5ghz or higher) with 1Gb of RAM, will probably be able to handle between 10k and 20k concurrent users chatting and playing turn based games.

Moreover, there are optimization tips that you should use in order to squeeze the best performance out of your hardware setup and SmartFoxServer:

^top

We expect hundreds of thousands or millions of concurrent clients. Will SmartFoxServer handle such traffic?

We are often asked how the server will behave under almost unreal loads.
It would be really great if a web-based multiplayer game could reach those level of popularity, however it is very important to make realistic estimates.
As of today (February 2009) even the most trafficked gaming portals very rarely peak at 20 thousand simultaneous players. Very large web-based MMO communities claim to have millions of active users but those numbers refers to the registered members returning to the website withing a certian period of time. The amount of users all connected at once (concurrent users) rarely tops 100K even for the most popular games and virtual worlds out there.

To give you an idea Second Life reached 75K+ simultaneous at peak times during 2008 with an average of 55K users between 2007 and 2008 (all the details here) Another very popular MMORPG, Eve Online, has recently broken a new user record at around 45K concurrent players.

In our load tests we have been able to run 20K concurrent clients on a single server instance running on a dual Xeon machine without any stability problems and consuming less than 25% of the CPU resources. We were expecting to saturate all the server resources and instead we realized that we could have reached 60K+ simultaneous users, if only we had enough test machines to create such a huge load (all the details here).

^top

Our website has millions of registered users, how will the server scale?

Again, it's important not to confuse your website statistics with the number of real concurrent users
at any one time. They are very different numbers.
A very rough calculations of possible concurrent users would be: website_unique_visits_per_day / 100 (or 200)
So if you approximately receive 1.000.000 visits a day you could probably have a peak traffic of 5000 to 10.000 concurrent players.

^top

Is it possible to split the load on multiple server instances?

Yes it is. If you plan to publish a very high traffic application we would recommend to split your "virtual world" into different regions or zones, and use multiple servers in parallel to avoid a single point of failure.
The world could be divided into various regions (Europe, America, Canada....) and Zones, each one handled by a different server instance. Also you could share the world data in a central (and why not, clustered) database server.

The load balancing can be delegated to the users themselves, who can choose the region and the zone based on how busy they are.
Alternatively, this can be done in a transparent way for the client, by automatically choosing the less loaded zone inside the current region.

^top

Is SmartFoxServer cluster-able?

Yes, we offer different options for running your applications on multiple servers:

^top