network for massive multiplayer online games
A common trouble from massive multiplayer online role playing game (MMORPG) is the “lag” that seems to always happen whenever there is a large concentration of player in the same area. Users complain endlessly about this issues, citing “there’s no reason the service could be this bad, ” or ranting that their game provider, who is “racking in several tens of millions of dollars per month, yet could not improve their service even after 2 years.”
The most common rant is probably “upgrade the server!!” But in many cases the server (cluster) is not the issue, it is the network that is being exhausted. Let’s examine the case a bit closely.
Consider an MMORPG environment where there is only 1 “zone” and all the players are always in the same area and requires attention from the server and network resources. In a real MMORPG this is not likely the case but the scope of this writing is focused in situations where large amount of users present in the same area. We will see how the resource have to scale to accommodate larger number of players than normal.
We’re discounting the overhead of data processing to look at the network performance and scaling issues only.
Suppose each player needs to update 1KB (one kilo byte) of information with the server every 2s. This is only about 512 bytes / second for each user, a very conservative assumption. With home residential cable connection at 3.2MBit, you are downloading at 400KB/s or about 400,000 bytes a second, for comparison.
Consider an area where there are 100 players all with the need to update his status with the server and require the server to update him with the status of the 99 other players around him.
Each player are sending in 0.5 KB/s to the server. In total there are 50KB/s input to server.
For each of these 2KB data packages (not packet) received the server has to process and update the other 99 player with what it receives. This implies the server is sending out almost 100*99*0.5 = 4,950KB/s or 39.6MBit . This is very manageable for even an OC-3 line.
Now look at 500 players. This number is easily achieve when there is an in-game “event” of some sort. With just 5 times the users than the previous case we’re looking at the server serving 500*499*0.5 = 124,750 KB per second (998Mbit/s). Compare to the case of 100 users this 5 times increase in users has resulted in a 25 times increase in bandwidth required. Thus the amount of bandwidth required scales with the square of number of users.
As you can see with 500 players, who only need to update around 500 bytes of data to the server every second, the server already exceed the capability of an OC-12 line. This is also for just ONE realm with the spike concentration of users. I highly doubt any game company reserves a full duplex OC-12 line for each of its realm server (or server cluster for one realm).
So make sure they can always handle 500 users in one place at a time they’d need a faster connection! But upgrading an OC-12 line to OC-24 or OC-48 is really nothing like upgrading your home cable service from bare minimum to a Deluxe fully loaded package. It is really huge money we’re talking here.
Say they’re upgrading the connection to supports 500 player at a time. And what good will this do? Due to the increased connectivity of the server the number of players on the realm is also increased (to bear the cost of the new connection). This has resulted in another “big event” with 1000 users! which means it’d need almost 4Gbit of bandwidth… and so on.
The game company has to balance the expenses and maximize profit. They sample the data in their virtual world to see normally how many players would be in the same area at the same time and try to accommodate that. They are usually “nice” and anticipate some overhead. But it would not make good business sense to have a network ready to serve 500 player at tremendous cost while “on average” there are rarely more than 100 concentrated at any location in the “world.”
So next time you’re going to complain “server sucks” trust me it’s not going to change, not for your 15US a month.