Running on real Server Hardware

posted in trill41 for project ABx
Published June 18, 2019
Advertisement

Some days ago I got old server hardware. It's a Xeon with 4 cores @ 2.40GHz with 8GB RAM an SSD and 2 HDDs in RAID1.

I installed Debian 10 Buster with Xen to run it as a Bare Metal Hypervisor, just like a real server. To install and deal with Xen - I never used it before, and I'm developer not administrator -, I found this article very helpful.

Creating a new VM

Once Debian and the Xen System is installed and you have booted Xen and logged into the Control Domain (Domain-0), using it is a "nobrainer", but first of all you may want switch to the root user (su - root). Creating a new VM is just one command line, like:


xen-create-image --hostname=buildserver --lvm=vg0 --dist=buster --size=8G --memory=2048M --maxmem=2048M --swap=2048M --pygrub --dhcp

So you just call xen-create-image with a hostname, storage size, how much memory it should get and what distribution (it doesn't have to be Debian, Xen supports many different distributions out of the box). This will create the volumes (disk and swap), download and install the distribution, and it will create the configuration file. Bellow you can see the volumes for my VMs:

volumes.png.19a1ac42d7628dfa0be1fb211b6cc2be.png

To start the VM it is enough to call xl create <config-file>, to stop it xl destroy <name>.

Building for Debian

The servers build on Manjaro with Clang since some time now, but since the VMs are all Debian they must also build on/for Debian. For this I created a Debian VM with all required development tools and libraries, just to compile the servers for Debian.

The differences is, that with Manjaro you get bleeding edge software, while software on Debian often lag behind a bit.

I'm still not smart enough for CMake, so I created makefiles for GNU make which should be quite generic so they don't need much attention, e.g. there is no need to manually add or remove files. The goal is to just do a git pull && cd debian && make and it should compile the latest version.

There were some minor issues I had to fix, but now the servers build with Clang 8.0.0, Clang 7.0.1 and GCC 8.3.0 fine on Manjaro and Debian.

Running the new VMs

Running stuff for the first time is always exciting, but everything went fine, I just had to install some Libraries (DB client libraries on the data server etc.). Bellow you can see the running VMs:

xl-top.jpg.87ee24271b8762336b47bea52f8b5d67.jpg

The Data server inside it's own VM:

dataserver.png.7e0d9529add479a730ba155c0cf427ab.png

All other servers inside the abgame VM:

abgame.png.6f5ff39efee291bef758076a7d66a779.png

Connecting to the new Server

The first observation was that I got back my nice 50ms Ping (round trip time) ?.

client.thumb.jpg.f8a383ff00da9fc48f58b7b69fe0d56b.jpg

You may wonder why the round trip time is always at least 50ms. Earlier I mentioned the server runs 20 updates per seconds, this means it runs one update every 50ms. That's why the round trip time is at least 50ms.

Next Entry Projectiles
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement

Latest Entries

Advertisement