3,032
edits
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
{{Stub}} | |||
How to use [[FlightGear Multiplayer Server]] | |||
= 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 multiplexor 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) | ||
* 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!) | ||
* 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 14: | Line 16: | ||
= 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 | 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. | ||
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 21: | Line 23: | ||
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 | 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. | ||
== 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]. | ||
== Reducing bandwidth requirements == | == Reducing bandwidth requirements == | ||
| Line 35: | Line 32: | ||
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 no provided with updates | ||
* 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 | ||
= Getting fgms = | = Getting fgms = | ||
| Line 55: | Line 49: | ||
= Compiling FGMS = | = Compiling FGMS = | ||
('''Note:''' if you want to build/install fgms using customized paths or settings (i.e. as non-root user | ('''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) | ||
#. 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 69: | Line 63: | ||
= 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 | 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. | ||
= Installation = | = Installation = | ||
| Line 77: | Line 71: | ||
$ 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 !" | ||
= Running FGMS for the first time = | = Running FGMS for the first time = | ||
| Line 104: | Line 96: | ||
commandline parameters always override config file options | commandline parameters always override config file options | ||
</pre> | </pre> | ||
edits