Server Size vs. Players Handled
  • Draco6slayerDraco6slayer October 2011
    The game Valhira is looking into moving into WorldForge. We are trying to figure out the optimal server size for our game. How many players can be handled at once by one server? The server we've found has the following specs:
    512MB RAM, 20GB Hard Drive, 100Mbps of internet speed, 1000GB data transfer pm, and 5 dedicated IPs. How many players could be online in a server of that scope at once? Which features would need to be improved to increase that number the most?
  • dean_bouvierdean_bouvier October 2011
    Hi,

    I'll provide you with what data I can from the Sandbox.

    Cyphesis.bin Memory Requirements running (roughly)
    - Bare no World (9 megs)
    - Default World 963 objects in Database (38 megs)
    - Sandbox world 48,000 objects in Database (506 megs)

    Disk requirements are very light, (Including Ember/Client is around 900 megs) I'm guessing once you remove the Libraries for Ember/Client from there your less then 200 megs easily compiled. So 20 gigs is lots.

    Networking
    That is a bit more tricky I think...

    I've monitored the sandbox in an attempt to gauge usage. But its very difficult, Data is only transferred for events, and some events can often times require less then 1kb/s, a login event will spike to 100kb range for approximately 10 secs, then back down into bytes again, if the player moves to the village you get bytes or low 1-2 kybtes sporadically for events, mostly bytes, they reach the village you get 50-70 kb/s for a about 5 secs. Then back down to sub kb to 2 kb/s fluctuation. A requiest for Information by an admin about the world or object will result in a 2 sec burst of 15-17 kb/s.

    So really its a matter of environment and what is happening. But if you wanted to ball park it I guess I would say, Worst case scenario from what I see on my Sandbox is a user can use up just under 100 kb/s with a number of large sight events going on around on average, logging in etc, generally they use significantly less. But for worst case scenario lets say... roughly 1 mb/s for each 10 users, puts you around 1000 users for 100 mbps connection. Now it is generaly unlikely a user will be receiving and sending a constant high amount of data, but the server will have to send packets to all clients in an given area, so if a player enters an area with 20 people there it has got to send that event to all 20 others, but that event is a small "sight" event, compared to the larger sight event to the single player of 20 people, plus objects etc... I still think I'm siding heavily on the high side I think, but its always better to factor for the worst imo.

    I did this all a while ago for myself when I was curious about what it might take to run a server on a paid service, I don't think the protocol has changed enough to modify my numbers much since then. But its really world dependent to a large degree and even the sandbox is still small in comparison to the newer test world I'm working on recently to try new things with.

    Of course there is more to scale-ability to the world and the server then purely network and bandwidth.

    Overall the increasing size and complexity of a world with demand more of the server in the way of processes. I think at some point once you start getting into the magnitude of several 100's or 1000's of players the big problem will be load shedding for the server, and ultimately what would be best is multi-server architecture so that tasks can be offloaded to servers that have free cycles.

    There are a number of factors I can think of that I've no real idea how they scale up, but I'm sure would play a significant part in the equation. It would be great to get a sense of how things do perform in this manner though.

    For instance... How much the AI uses the CPU, how the server will handle alot of operations and tasks processing with alot of players logged in at once or not at all, how a very large world with alot of AI in it will increase the load on CPU, but I've not been able to simulate that yet... that being said I think it would be possible to write some test clients using the sample python clients provided and try to load up a server to see how it bares the weight.

    As for what features would need to be improved to increase it the most... as I said before I would think that making the code more modular and able to separate them into their own processes, or better yet on another server would help a lot on the back end of things, have the AI performed by a separate Server/Client which logged to handle only that aspect. Setting up a seperate server to handle only the Database would also help and is possible currently, both of those though in a way invalidate the initial question as its no longer a 1 server scenario. But personally I always preferred the idea of multiple servers on the back end rather then "Sharding" a world as a whole. But that is always an option, break your continents or world into servers once you hit the wall.

    The one real unknown that I've not be able to measure or get a sense of how well it scales up would be the AI routines which are bootstrapped into the world, but its something I have been aiming towards, getting a very significant amount of AI and scripting processing in the background so that all in game entity are tasking the processor more, and generating more events as this is really the other big factor of how big a world/server can be for players to interact with.

    I would think that the following Blueprints would be in some part helpful in increasing how well the Server handles scaling up in the future.

    https://blueprints.launchpad.net/cyphesis/+spec/cyphesis-event-broadcasting

    https://blueprints.launchpad.net/cyphesis/+spec/cyphesis-variable-tick-simulation

    I think Alistair might have some better input to provide on this matter as he knows the internal workings better then anyone, but I thought I could atleast provide a sense of things for you, and some numbers from my own experiences running several servers myself for testing.

    Hope that helps somewhat.
    Demarii
  • Draco6slayerDraco6slayer October 2011
    Thanks, that was great. I actually gave the estimate of about 1000 myself, but that was mostly a guess. The numbers do work well though, as the server looks to only cost roughly $50 a month, 1000 players could easily support it at a very low price to each player. Plus, the information that the bigger the game gets, the faster it can run (due to the need for additional servers) is very good news.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with OpenID Sign In with Google

Sign In Apply for Membership

Categories