Freebsd vs linux gaming

FreeBSD versus Linux: game server performance diffs

Me and a friend are planning to develop a multiplayer game based on Unreal Engine 4. The game engine supports Linux natively, so we tough compile it and use it under a Linux distribution.

We came across with a great question mark: choosing between Linux and FreeBSD for best performance.

I am a Linux user for 3 years and I know how well Linux works. I’m focused onto Linux system administration. My friend is focused on FreeBSD system administration for 3 years.

We don’t care if we’ll use Linux or FreeBSD. We only want best performance. We want to know if FreeBSD can handle better the game and give more performance.

The game will be a multiplayer first-person shooter game. We’ll have both open world and indoor maps. The game will be a futuristic play set, so it will contain futuristic-looking weapons with some nice looking effects at shooting and sound. I think a minimum of 4GB RAM will be enough for beginning, approximate up to 20 players supported.

I want to know your opinion. We want best performance possible, so we’ll hack our game for this. But it’ll depend on the OS. What do you recommend for such a game?

drhowarddrfine

For many decades it’s been stated or known that FreeBSD can out perform Linux, even on Linux built games, though I’ve never found any link to the original article for that. Phoronix, a couple of years ago, did show their own tests of FreeBSD outperforming Linux in game development.

But you have to perform your own test for what you are doing. Going just by some wide ranging question or statement doesn’t prove anything. Suffice to say, anything Linux can do, FreeBSD can do.

Thanks

Reactions: hacktor_

Источник

FreeBSD: A Faster Platform For Linux Gaming Than Linux?

FreeBSD provides a Linux binary compatibility layer that allows 32-bit Linux binaries to be natively executed on this BSD operating system. Linux binary compatibility on FreeBSD allows Linux-only applications to be executed in a near seamless manner on this alternative platform, even for games. New tests have revealed that the modern FreeBSD operating system (via PC-BSD 8.2) can actually outperform Linux when it comes to running OpenGL Linux game binaries.

This Linux binary compatibility support for FreeBSD is commonly referred to as «Linux emulation», but it is not emulating Linux in a traditional sense nor is it acting like Wine in user-space. This is a Linux ABI implementation for the FreeBSD kernel.

Читайте также:  Linux for domain controller

The FreeBSD Handbook covers Linux binary compatibility with how to enable the support under FreeBSD. Enabling the support requires loading a Linux KDO (kernel module) and altering the /etc/rc.conf. Linux run-time libraries also need to be installed, which can easily be done by using FreeBSD ports.

For this Phoronix benchmarking, PC-BSD 8.2 was used since its focus is on providing a pleasant FreeBSD desktop experience, complete with the KDE4 desktop environment by default. PC-BSD ships with Linux binary compatibility support enabled by default and a number of the Linux run-time libraries. During this testing only a few extra Linux run-time libraries had to be installed from FreeBSD ports like libvorbis, libasound, and SDL.

This support is available to users of FreeBSD on i386 and AMD64, but currently in mainline FreeBSD, it is limited to only supporting 32-bit Linux binaries. There has been experimental work on Linux x86_64 binary support, but nothing has yet been merged in stable form. Right now in FreeBSD 8.2 ports is an implementation based on the Linux 2.6 kernel and the user-space libraries are from Fedora 10.

There is this advanced page of the FreeBSD handbook covering the Linux emulation at a more in-depth level. The key section:

«When a system call is called by the Linux binary, the trap code dereferences the system call function pointer off the proc structure, and gets the Linux, not the FreeBSD, system call entry points.

In addition, the Linux mode dynamically reroots lookups; this is, in effect, what the union option to file system mounts (not the unionfs file system type!) does. First, an attempt is made to lookup the file in the /compat/linux/original-path directory, then only if that fails, the lookup is done in the /original-path directory. This makes sure that binaries that require other binaries can run (e.g., the Linux toolchain can all run under Linux ABI support). It also means that the Linux binaries can load and execute FreeBSD binaries, if there are no corresponding Linux binaries present, and that you could place a uname(1) command in the /compat/linux directory tree to ensure that the Linux binaries could not tell they were not running on Linux.

In effect, there is a Linux kernel in the FreeBSD kernel; the various underlying functions that implement all of the services provided by the kernel are identical to both the FreeBSD system call table entries, and the Linux system call table entries: file system operations, virtual memory operations, signal delivery, System V IPC, etc. The only difference is that FreeBSD binaries get the FreeBSD glue functions, and Linux binaries get the Linux glue functions (most older OS’s only had their own glue functions: addresses of functions in a static global sysent[] structure array, instead of addresses of functions dereferenced off a dynamically initialized pointer in the proc structure of the process making the call).»

Источник

Читайте также:  Процессы и демоны линукс

Linux 3D-игры бегут под FreeBSD быстрее, чем под Ubuntu

Удивительный результат показали сравнительные тесты производительности Ubuntu Linux 11.04 и «эмулятора» FreeBSD Linux ABI на PC-BSD 8.2 (это версия FreeBSD для настольных компьютеров). Оказалось, что OpenGL-игры показывают лучшую производительность под FreeBSD, чем в родном Linux-окружении.

На первый взгляд, это противоречит здравому смыслу, ведь дополнительный уровень абстракции вроде бы должен понижать скорость исполнения кода. Но дело в том, что FreeBSD Linux ABI — это не виртуальная машина и не эмулятор в традиционном смысле, а среда для нативного исполнения Linux-библиотек.

В тестах использовались системы с процессором AMD Phenom II X3 710, видеокарты NVIDIA GeForce, см. полную конфигурацию, сравнение производительности осуществлялось с помощью ПО для автоматизированного тестирования производительности систем Phoronix Test Suite и OpenGL-бенчмарка Unigine Heaven.

Система PC-BSD/FreeBSD с исполнением Linux-библиотек показала примерно на 8% лучшую производительность, чем Ubuntu Linux 11.04 в тестах с разрешением 1024 х 768, а в тестах с бóльшим разрешением разница выросла до 60%.

На более старых бенчмарках у PC-BSD/FreeBSD тоже есть преимущество.

Более высокая производительность FreeBSD подтвердила себя и в реальных играх, особенно при активации более высокого разрешения экрана. Например, вот результаты с известной игрой Nexuiz.

Аналогичный тест для OpenArena.

Источник

FreeBSD: A Faster Platform For Linux Gaming Than Linux?

In a similar manner to FreeBSD, the NetBSD operating system also provides means of binary emulation for Linux x86 and other operating systems like Solaris.

With the Linux support enabled, x86 Linux binaries can be easily executed on FreeBSD just as you would under any Linux distribution.

As an example of how well this Linux binary compatibility in FreeBSD really is, even the Unigine Heaven technology demo works! This is the most demanding OpenGL 3/4 Linux benchmark based on the Unigine Heaven and it ran seamlessly under FreeBSD/PC-BSD 8.2.

Читайте также:  Linux how to grep in files

This FreeBSD vs. Linux benchmarking of Linux game binaries began as a simple comparison using the 64-bit builds of each operating system and Ubuntu 11.04 as the Linux distribution. However, after realizing the competitiveness of each operating system, the comparison was expanded to include the 32-bit operating systems and then tossing Fedora into the mix as well.

The test system was bearing NVIDIA GeForce graphics, which is important under FreeBSD. The proprietary NVIDIA graphics driver is the only viable graphics driver for BSD. As talked about on occasions in the past, the state of graphics drivers for *BSD is sad. Even the open-source graphics drivers used by Linux aren’t all supported under FreeBSD due to the complexity with many of these open-source drivers migrating to living within the kernel and relying upon new interfaces for memory management and mode-setting. AMD provides no proprietary (Catalyst) driver support to FreeBSD, not even for their workstation graphics cards. As a result, that leaves NVIDIA and their BSD graphics driver as the only real solution for those needing accelerating graphics support.

Like the NVIDIA Linux driver, the NVIDIA BSD driver is still built from a largely shared code-base with their Windows driver and only having a small amount of «glue» code that’s BSD-specific. As a result, it is quite a high quality graphics driver and one that boasts roughly the same performance and feature-set as what is available from the Linux binary blob. PC-BSD also makes the installation of NVIDIA’s driver quite easy and is additionally available from the FreeBSD ports collection.

The test system used was based on an AMD Phenom II X3 710 triple-core processor at 2.60GHz with NVIDIA GeForce 9800GT 512MB graphics and an MSI 89GXM-G65 motherboard with 4GB of RAM. Full system details are in the table below.

Ubuntu 11.04 and PC-BSD 8.2 were both tested with their stock packages and with both the 32-bit and 64-bit builds. Both operating systems were running the same NVIDIA 270.41.06 driver to rule out any graphics driver differences between operating systems. PC-BSD 8.2 provides the FreeBSD 8.2 packages and its kernel whole Ubuntu 11.04 has the Linux 2.6.38 kernel.

Benchmarking was done under both operating systems using Phoronix Test Suite 3.4-Lillesand, which installs and executes the same exact binaries in the same manner under both operating systems in a fully automated manner.

Источник

Оцените статью
Adblock
detector