News:

Want to praise Simutrans?
Your feedback is important for us ;D.

Rough idea of requirements for running a simutrans game server

Started by Ashley, December 30, 2010, 05:09:31 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ashley

What kind of bandwidth is typically demanded? What're the CPU/memory requirements? I am considering setting a server up to host a game and was wondering if my VPS can handle it.

Presumably one instance of the game can run one map? If I wanted to run a game for pak64 and pak128 I could just run two instances on different ports?

Is there any information on administrative tools for the game server, e.g. for starting a new game etc.? Or must this all be done manually by restarting the game server?

Thanks :)
Use Firefox? Interested in IPv6? Try SixOrNot the IPv6 status indicator for Firefox.
Why not try playing Simutrans online? See the Game Servers board for details.

prissi

A VPS was tried and could handle maps up to 512x512 before, if you use the version without display (posix backend with 0 bit graphics). Most CPU is only needed to save and load and shortly after. Usually Simutrans has 2-4% load on a pentium 400 MHz Pro, but nearly 80% when saving/loading upon joining. This is also most critical, since it result in a long lag for everybody. More problematic might be the memory, since a typical game without much trees (like the gift pak64) requires about 120MB on the server (add another 50MB for pak128). Since some VPS only allow 128MB this might ultimatively limit map size and similar things.

The bandwidth is not too critical, but it depends strongly on how often people join. 300kB per joining. The amount used ingame is not too critical, and can be reduce if the sync check message are sent sparingly (every 250 steps or so).

One port per instance, running on multiple ports should not work yet, because the server game is always saved inter an identical name.

Some administration can be done as public players, but stopping game or loading other map needs manual intervention. Some german guy has even built a script so everybody can do this. (Restarting a server one an open port will just terminate the restarted one, since bind fails. To restart a crashed game, on just types "simutrans -server 13353 (... and other options)" without specifying a savegame. This loads the game from last joining.

German thread: http://www.simutrans-forum.de/forum/thread.php?threadid=5815
Server script example: http://simutrans.uruk-online.net/server/

Ashley

Use Firefox? Interested in IPv6? Try SixOrNot the IPv6 status indicator for Firefox.
Why not try playing Simutrans online? See the Game Servers board for details.

Maragil

If you do a pak128 server Timothy, I'd be very happy to go on it. I've been waiting for one, and the pak128 server currently is a Japan one with some odd addons that I can't find.


H./

H./

Ashley

Yes I'd noticed the lack of a pak128 server, it'd be good to have one set up. I'll play around with it and see what I can do...

Edit:

As a followup to this, I have three instances of Simutrans currently running on my VPS, one running pak64 (uses about 20MB memory) one running pak128 (68MB) and one running pak.britain (77MB). The 64/128 ones are running 320x320ish maps, pak.britain is a 512x512 map.

CPU usage isn't high most of the time, looks like memory is the limiting factor. I'll try increasing the map sizes on the other two in time. 512x512 isn't a bad size for a map in any pak.

One problem I had to get around was logging/log rotation. I found redirecting Simutrans's stdout/stderr to syslog works well. I've written a set of control scripts to start/restart/stop etc. the servers.

Next thing to do is set up a monitor to check if/when the servers crash, restart them, and email me an excerpt of the log from the crash to post here.
Use Firefox? Interested in IPv6? Try SixOrNot the IPv6 status indicator for Firefox.
Why not try playing Simutrans online? See the Game Servers board for details.