Configure FreeBSD compatibility mode with Linux

Linux
1

FreeBSD is known for many server configurations. With Linux compatibility mode, FreeBSD is a good platform for hosting dedicated game servers. In this section, we’ll discuss two main steps that you must follow before running a dedicated Linux game server under FreeBSD. The first is to ensure that the correct Linux compatibility libraries are installed. The second is to ensure that the FreeBSD kernel “knocks” quickly enough.
Install the correct Linux compatibility libraries
FreeBSD’s binary compatibility with Linux is described in Chapter 10 of the FreeBSD Online [FBLINUX] documentation and will not be repeated here. FreeBSD It is currently at the time of writing, and there are a number of Linux compatibility options.
Binary compatibility for Linux means that a Linux application (a “binary” executable “pre-assembled in a Linux system) is natively running on a FreeBSD host. Processor simulation does not occur – the compatibility is implemented within the functionality of the FreeBSD kernel loader. When running the Linux application, FreeBSD will return the kernel Writing sections of the internal executable code before starting the program (Linux app calls to the Linux kernel for things like disk access, network access, and memory management are replaced by equivalent calls in
FreeBSD kernel.) After the rewrites are complete, the application starts executing as if nothing had happened. Several standard Linux libraries are installed under “/ auth / linux” on the FreeBSD host, allowing dynamically linked applications to run properly.
The main point to recognize is that Linux compatibility can be easily configured by installing a “port” or “package” on your FreeBSD system. A number of different compatibility environments are available, reflecting some of the different Linux distributions.
If you want to run a dedicated Half-Life 2 server, you will need the libraries based on Red Hat Linux 8.0, instead of the default (starting with FreeBSD based on Red Hat Linux 7.x.
If you are already connected and signed in with the root account, then you just need to do the following:
% Pkg_add -r linux_base-8
All necessary files will be recovered automatically online to install Red Hat Linux 8.0 based compatibility environment. This package will also support the WET server for Linux.
So, if you have FreeBSD server available, it’s perfectly reasonable to host dedicated Linux based game servers on this machine.
Ensure sufficient kernel speed
Most operating systems have some form of internal “program clock” that runs at a steady rate, and programs that you want to “wake up and do something” use regularly. This is true for Windows, Linux, and FreeBSD. (This hash rate should not be confused with the game
Server internal hash rate, discussed earlier in the book. Hash rates can be very different.)
At least until FreeBSD 5.4, the kernel pointing timer was lagging at 100 clicks per second. Due to the way dedicated game servers are written, this hash rate is very low.
Fortunately, the FreeBSD marker rate can be modified without kernel recomposition.
Simply add the following line to the /boot/loader.conf file and restart the device.
kern.hz = “1000”
Once restarted, the kernel will knock 1000 times per second, which is a much better rate when hosting game servers. (You can set it faster – The limit really depends on the amount of CPU load your device can handle. There is a small, steady amount of processing.
The overhead is incurred per click in the kernel clock, regardless of what all the apps do.)
You can check or confirm the current hash rate of the kernel with the following command:
sysctl kern.clockrate
Increasing kernel fragmentation is important for any system that hosts a dedicated online game server, be it Linux, FreeBSD, or Windows. The simple fact is that game server activities are generally restricted by the special kernel registry timer.
For example, a dedicated HL2MP server on the standard FreeBSD 5.4 host is limited to sending maximum snapshots (kern.clockrate / 2) per second per client, regardless of the game’s hash rate (which is 66). Due to the default kernel mark rate of 100, the HL2MP server cannot transmit more than 50 frames per second per client. Game server default sv maxupdaterate setting which is 60, default hash rate 66 is shown, bullshit.
Running a FreeBSD server host, for example, 150 dpi will limit the HL2MP server to 75 frames per second per client. Setting the kernel hash rate to 1000 ensures that sv maxupdaterate, cl updater and tickrate of the HL2MP game server are the appropriate settings.
In short: the maximum fps per client is smaller than sv maxupdaterate, the hash rate of the game server, and half the hash rate of the base OS software. It is necessary to reconfigure the default 100 points per second FreeBSD to something closer to 1000 points per second …

2
33

Related Post