3,032
edits
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
How to use [[FlightGear Multiplayer Server]] | |||
= Intro = | |||
This page is dedicated to providing a short overview about installing the [[FlightGear Multiplayer Server]] ('fgms'). | |||
= Pre-Requisites = | = Pre-Requisites = | ||
* A computer running a variant of *nix to compile and host the server. Speed of the machine isn't of great consequence as the protocol is a | * A computer running a variant of *nix to compile and host the server. Speed of the machine isn't of great consequence as the protocol is a multiplexer which doesn't require much processing grunt (having sufficient free RAM is however a good idea, as the server code doesn't yet make use of threads but may fork itself extensively, so that for each active client one process may be forked) | ||
* direct/physical or remote access to the server (i.e. SSH/telnet, a conventional web hosting package will usually '''not''' be sufficient!) | * direct/physical or remote access to the server (i.e. SSH/telnet, a conventional web hosting package will usually '''not''' be sufficient!)-suitable hosting packages are: dedicated root servers, virtual private servers, shell servers | ||
* if the server is meant to be a public internet server: an internet connection, featuring sufficient upstream/downstream capabilities (see below for details concerning bandwidth requirements). | * if the server is meant to be a public internet server: an internet connection, featuring sufficient upstream/downstream capabilities (see below for details concerning bandwidth requirements). | ||
* firewall policies will need to be set up to allow for incoming and outgoing UDP traffic for the corresponding ports | * firewall policies will need to be set up to allow for incoming and outgoing UDP traffic for the corresponding ports | ||
| Line 16: | Line 17: | ||
= Traffic & Bandwidth Considerations = | = Traffic & Bandwidth Considerations = | ||
Note: Currently (May 2008), the server code basically boils down to a packet multiplexer (i.e. most data is -unconditionally- transmitted to all 'active' clients), which may thus create considerable amounts of traffic; this ought to be taken into consideration due to bandwidth limitations in most hosting packages. For basic calculations: inbound traffic is 25 Kilobit per second while outbound is 25 Kbits per second for each plane that can see another. | Note: Currently (May 2008), the server code basically boils down to a packet multiplexer (i.e. most data is -unconditionally- transmitted to all 'active' clients), which may thus create considerable amounts of traffic; this ought to be taken into consideration due to bandwidth limitations in most hosting packages (i.e. '''fgms may create considerable amounts of traffic!'''). For basic calculations: inbound traffic is 25 Kilobit per second while outbound is 25 Kbits per second for each plane/client that can 'see' another. | ||
By default, assuming a 10hz update interval, each active fgfs client will currently cause I/O traffic of approximately 5 kbytes/sec (one update consuming ~500 bytes) [http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg16016.html]. | By default, assuming a 10hz update interval, each active fgfs client will currently cause I/O traffic of approximately 5 kbytes/sec (one update consuming ~500 bytes) [http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg16016.html]. | ||
| Line 23: | Line 24: | ||
In addition, the fgms system allows for traffic updates to be sort of 'mirrored' on (relayed to) other configurable multiplayer/relay servers. | In addition, the fgms system allows for traffic updates to be sort of 'mirrored' on (relayed to) other configurable multiplayer/relay servers. | ||
This feature makes it possible for users/clients to use an arbitrary server, but still see vehicles connected to different servers. Thus, such relay servers may additionally increase inbound/outbound traffic considerably. | This feature makes it possible for users/clients to use an arbitrary server (with acceptable latency), but still see clients/vehicles connected to different servers. Thus, such relay servers may additionally increase inbound/outbound traffic considerably as all traffic is mirrored/propagated to such relays. | ||
Having more servers should actually decrease the load on each server in high load situations, i.e. when most of the clients are within range of each other. See this | |||
[http://www.gidenstam.org/FlightGear/fgms/fgms_bandwidth_estimates.txt brief note on the theoretical bandwidth behaviour of fgms.] | |||
== Facts == | == Facts == | ||
In March 2008, the main fgms multiplayer server (pigeond.net) was reported to consume approximately 15 gb of bandwidth per '''day''', with an average throughput of 200 kB/sec and peak loads of up to ~ 650 kB/sec [http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg16016.html]. | In March 2008, the main fgms multiplayer server (pigeond.net) was reported to consume approximately 15 gb of bandwidth per '''day''', with an average throughput of 200 kB/sec and peak loads of up to ~ 650 kB/sec [http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg16016.html]. | ||
During the same month (the much less used but interconnected) mpserver06.flightgear.org had on average 742 MB incoming and 688 MB outgoing traffic per day (i.e. 72 kbit/sec respective 66 kbit/sec on average). | |||
== Reducing bandwidth requirements == | == Reducing bandwidth requirements == | ||
| Line 32: | Line 38: | ||
If traffic considerations are relevant, the following options exist to reduce overall server/network load: | If traffic considerations are relevant, the following options exist to reduce overall server/network load: | ||
* configure a relatively low "server.out_of_reach" value, so that clients outside a certain range are | * configure a relatively low "server.out_of_reach" value, so that clients outside a certain range are not provided with updates (usually about 100 nm on the main server network) | ||
* for virtual gatherings (i.e. fly-ins), have clients use airports and places that do not have lots of other traffic (i.e. in other words, avoid places like standard airports such as KSFO) | * for virtual gatherings (i.e. fly-ins), have clients use airports and places that do not have lots of other traffic (i.e. in other words, avoid places like standard airports such as KSFO) | ||
* avoid the use of unnecessary relay servers | * avoid the use of unnecessary relay servers | ||
* if you are not interested in your server being publicly available, only share its address with your friends privately | * if you are not interested in your server being publicly available, only share its address with your friends privately | ||
* for local testing/development purposes, you may want to run only a private fgms session, that may be specific to your LAN or even computer | * for local testing/development purposes, you may want to run only a private fgms session, that may be specific to your LAN or even computer. | ||
== Hosting Packages known to be suitable for fgms hosting == | |||
(yet to be filled in) | |||
= Getting fgms = | = Getting fgms = | ||
| Line 49: | Line 58: | ||
= Compiling FGMS = | = Compiling FGMS = | ||
('''Note:''' if you want to build/install fgms using customized paths or settings (i.e. as non-root user), you may want to consult the INSTALL file located in the source directory for additional help) | ('''Note:''' if you want to build/install fgms using customized paths or settings (i.e. as non-root user, installing into your $HOME), you may want to consult the INSTALL file located in the source directory for additional help) | ||
#. Extract the file to a temporary directory (i.e. using tar xzf filename.tgz) and cd into it | #. Extract the file to a temporary directory (i.e. using tar xzf filename.tgz) and cd into it | ||
| Line 63: | Line 72: | ||
= Setting up the config file = | = Setting up the config file = | ||
At this point you have a running fgms binary in the directory ''src/server'', so copy fgms_example.conf to fgms.conf and edit it to suit your situation. If the server will be offline or for private use, please comment out the relay servers section. This will save bandwidth from the server being consumed. | At this point you have a running fgms binary in the directory ''src/server'', so copy fgms_example.conf to fgms.conf and edit it to suit your situation. If the server will be offline or for private use (i.e. LAN-only, please comment out the relay servers section. This will save bandwidth from the server being consumed. | ||
= Installation = | = Installation = | ||
| Line 71: | Line 80: | ||
$ PREFIX=~/bin ./configure --prefix=$PREFIX && make install || echo "Oops, there was a problem !" | $ PREFIX=~/bin ./configure --prefix=$PREFIX && make install || echo "Oops, there was a problem !" | ||
Depending on whether ~/bin exists already and is already specified in your $PATH environment variable, you may also want to add this folder to $PATH. | |||
= Running FGMS for the first time = | = Running FGMS for the first time = | ||
| Line 96: | Line 107: | ||
commandline parameters always override config file options | commandline parameters always override config file options | ||
</pre> | </pre> | ||
[[Category:Howto|Set up a multiplayer server]] | |||
edits