Linux 3D Games Run Faster On PC-BSD
koinu writes "Phoronix has published benchmarks comparing 3D game performance on Ubuntu Linux 11.04 with the FreeBSD Linux ABI emulation on the 8.2 release of PC-BSD, which is a desktop variant of FreeBSD. Most results show that the emulated Linux layer on FreeBSD performs better than Linux natively. It's pretty interesting, because most people would expect that an additional abstraction layer would generally slow down the execution of binaries."
Linux has lost its way.
It was once lean and fast but now is an industrialized bloated mess. It will take a lot more to get me to stop using Linux but that doesn't mean I can't see when something is wrong.
Lately, we have been seeing a lot of Linux's advantages fade away. Among these are its smallness and compatibility with older hardware.
I think it's just about time to revisit what made Linux great and see if there is a way to get that back while still doing great new things.
It's just a bunch of benchmarks with commentary and no conclusion.
Could we possibly get ANY information on WHY?
"You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
I don't see why anyone would treat these guys seriously.
He just produces any content he can think of that's controversial and will get him page hits.
Is Ubuntu the fastest of Linuxes for this to have been done using them as a comparison? Also, were the PC-BSD and Ubuntu using the same DEs? What were the other variables?
So it's a benchmark on different hardware that happen to use the same nvidia card (but different motherboard and CPU), and different versions of the compiler, which are known to have performance differences. Way to go.
This is likely caused by Compiz interacting with the game engine on Ubuntu. Turn Compiz off and re-run the benchmarks.
I find Ubuntu weighed down compared to others. Obviously purely anecdotal, but Debian seems much quicker and Gentoo (what I use) feels quicker even more so. BSD vs Gentoo would be a fairer fight.
Yes yes, I know after youve been compiling Gentoo for days it would be slower, but you cant argue against a cut to the bone system that Gentoo can provide. (which Ubuntu is anything but)
There are so many things wrong with this as an experiment. There could be any number of factors which are producing these results, but running the experiment on more than a single, fairly heavyweight, distro would be a start.
Didn't this happen when Linux started emulating Windows?
"Games run faster in Linux/Wine(Cedega) than in Windows"
http://www.phoronix.com/scan.php?page=article&item=681&num=2
Why is everyone so shocked that an emulation layer can be faster now, when before it was "look at us, we're great?"
Doesn't OpenBSD/NetBSD have the portability mechanism whereby it supports all Linux drivers under an abstraction layer? Or is that only in theory, but doesn't actually work?
I have a different question - slightly off-topic: is the TCP/IP stack on BSD faster than Linux? If so, what makes it faster?
How is this surprising at all? BSD has always run Linux programs faster than Linux.
How about running this test on a distro that does both Linux and BSD, and then compare? Take Debian, take their latest releases of Linux and kFreeBSD, use the same DE from Debian's sources and the same software for both. Then run the whole thing - either on the same machine, or on 2 identical machines.
Then tell us about it
Unless PC BSD was there on the system w/ less RAM, less HDD, slower file system, and despite that, beat the more richly favored Linux box. I'd excuse not having a dual boot, but how difficult was it to obtain 2 identically configured systems, running one w/ BSD and the other w/ Linux.
But as I note in another sub-thread below, it could have been an absolutely even playing field w/ Debian Linux vs kFreeBSD.
Nvidia's linux driver does wbinvd far too frequently, in nv-vm.c it's not needed at all, if you follow the calls to set_pages_uc/wb, you'll see it flushes the affected pages (but nvidia calls it with the wrong number of pages), and if you do that, you can change nv_flush_caches to a nop. Furthermore it seems MSI is explicitly disabled unless you explicitly enable it (or patch it). Don't ask what os_raise_smp_barrier is for, but it seems to disable all cpu's on a multicore system..
The test was insufficient to actually conclude anything of value. They used two *different* systems instead of reinstalling (specs looked *close*, but they weren't the same). They used KDE vs. Unity (this by itself explains the discrepancy, it's widely been shown unity degrades full screen 3d performance). It compared only one version of one distribution to one version of one variant of BSD. It only compared the nVidia driver, though there is no choice on that front.
"Unity slower than KDE" is a more likely conclusion, but again, you'd need a more controlled test to say anything. Phoronix should be ashamed...
XML is like violence. If it doesn't solve the problem, use more.
There has been a lot of complaining that should have used distro x or y but the fact is he used two popular distro's in their out of the box settings, makeing this a more real world test. if you think you can do a better test the by all means build out your own versions and perform you own test I'm sure everyone here would love to see your findings.
32bit kernel + PAE, says it all. Phail.
Since when is Wine doing any emulation? Since when is linux emulating? Did you forget what Wine stands for? "Wine is not an emulator.
It is simply implementing the Window Api calls.
The guys at Phoronix appear to be the only group of people that really care about benchmarking desktop/game performance of alternate operating systems. The problem is their benchmarks always feel so half done. Why not create a more concrete experiment. Strip Linux and FreeBSD down to just a window manager, compare the versions of Xorg, do alternate native 3D benchmarks. Give us something to take seriously. Telling me some games run faster on PC-BSD than they do on Ubuntu isn't giving me a lot to work with.
Phenomena like this isn't new. Many Linux games will whole heartedly admit that they can get Windows games to run better via WINE than on native PC, on the same system. I've also seen reports of people running full disk encryption showing higher read/write speeds in certain cases. It all really comes down to the task at hand and its implementation. And probably some flawed metrics, too.
FreeBSD had always ran Linux binaries faster than Linux. Interesting that this may still be the case.
Point, though, that the 'Linux Emulator' in FreeBSD isn't really an Emulator. FreeBSD runs Linux binaries natively. The so called 'Linux Emulator' just provides Linux syscall capabilities to the FreeBSD kernel.
And of course, Linux libc and other libraries need to be provided (which the linux binary was linked against), and probably linux's /proc is also needed to satisfy various linux binaries. But its by no means an 'emulator', is just provides the services a Linux executable expects.
You can tell how powerful someone is by the magnitude of the crime they can commit and be able to get away with.
Since when was wine used to run linux binaries on BSD?
Still, your point stands. Linux binary compatibility is no more emulation than wine is.
Prediction for end of Universe #42: Fencepost error in Quantum_bogosort.cpp
And 2012 will be the year that the Hurd will reach the Desktop!
I wonder what the results would have been on something like debian or arch or fedora? It is well known that Canonical's implementation of linux in Ubuntu is one of the slowest commercial distributions out there. They trade speed for features (or bloat depending on your perspective).
While Ubuntu is probably the most popular distro, which would make it valid to test, that doesn't mean it is representative of linux in general and therefore, the article should be about how 3D gaming is faster on BSD than on Ubuntu, not on Linux -- at least not until there is actual data to support that conclusion.
There's a point here: at the kernel level FreeBSD outperforms Linux.
At least with Linux kernel 2.6.38 (Ubuntu 11.04) and FreeBSD's.
During gaming there's little in use from the distributions themselves. I'd say it's 99.999% kernel stuff (with drivers).
Sent as ripples into the electromagnetic field. No single photon has been harmed in the process.
It should be "Linux 3D Games Run Faster On PC-BSD with KDE than on Ubuntu Linux with Unity, on NVidia hardware". It's worth to note that KDE outperforms every gtk based desktop environment (gnome, unity, lxde...) when running on NVidia hardware.
Those tests was made using default kernel specs. It would be nice, for comparison, to customize the kernel , and using the awesomeness of CGROUPS: 1 - allocate process into groups with specific memory usage, I/O usage, swapness levels; 2 - exclusive cores for the 3D processes. 3 - higher cpu shares for the 3D processes. All the nice stuff you can do with CGROUPS. One thing is testing the default spec of ubuntu, other is tuning and testing again. Tuning both of the systems to make another benchmark. Not a single mention to cgroups in that benchmark article.
some 10 years ago, when even the slightest hiccup could make a game running in linux slow to a crawl (not linux's fault. more like greedy games on average hardware), i ran several tests to find the best settings for performance. here's what i found:
- even a lightwheight window manager like windowmaker, fluxbox or xfce impacts negatively (specially if you're short on RAM) .Xsession file with nothing more than "xterm" on it. as soon as X starts with a windowless xterm, run the game from the CLI.
- any cute widget, dockapp or systray app can take a hit. a simple opengl cpu meter, displaynig a spinning cube, running inside a 64x64 dockapp had a 10% hit on glxgears' frame rate
- daemons started from init.d scripts steal memory, and if they trigger a backgroud process, bye-bye performance. so make sure anything than trigger lots of disk I/O operations are off. specially if they run from cron
- get used to the command line. shut down GDM/KDM/XDM or any other graphical login. log on the console, quickly create an
now, optimize BOTh PC-BSD and linux this way, THEN run a benchmark. otherwise, is the same as trying to compare a default ubuntu with openBSD on which one is more secure. or the other way on which is more usefull as a desktop. it's not right to ebnchmark different OSes by leaving the defaults just like that.
What ? Me, worry ?
"It's pretty interesting, because most people would expect that an additional abstraction layer would generally slow down the execution of binaries."
Since most OSes (especially Unix-like) are going to be doing similar things beneath the system call interface seen by applications this doesn't have to be the case - no reason you can't just implement another "personality" which operates as a first class citizen. I.e. rather than making a shim which adds extra overhead by translating, have the Linux compatibility layer directly call the same internal functions as the FreeBSD syscalls do, giving equivalent performance.
I'd have assumed this is what FreeBSD's Linux compatibility layer does but I don't know for sure.
FreeBSD is cool though, I'd like to have a system running it again, many of the things they do are really nice.
Interesting. Do you have a patch-set with all of these improvements handy or something? I'd be interested to see if they make any difference on my quad-core box...
... nice FPS !
What's needed is more games on linux, not faster ones.
Join the Slashcott! Feb 10 thru Feb 17!
I just wanted better interactivity on a -rt kernel so for all I know this will not work,
furthermore I can't say I know how the nvidia driver works and I prefer not to know
either, this was just observing their glue code.
http://pastebin.com/trj5tzH6
I can't even say for sure if/where os smp barriers are used, so that might be a
noop, or the reason why suspend fails for me. Some ideas were used from this
old thread, but linux issues clflush by default now:
http://www.nvnews.net/vbulletin/showthread.php?t=67430
All this article proves is that KDE is better at turning its OpenGL compositing off before entering a 3D app. This seems like a fairly inflammatory conclusion, based on comparing apples and oranges. Set Linux and BSD up with a lightweight openbox setup, and then benchmark it.... At least have them both using the same DE...
I'd like to know which games were in the experiment. Did they use both of them?
Confucius say, "Find worm in apple - bad. Find half a worm - worse."
The big question would be, "Does FreeBSD's environment have Compiz or similar running?"
If you've got that running there's performance concerns, etc. that you have to deal with that make overall performance slower. My guess would be that it's not there- which means you're not making apples to apples comparisons between the OSes. If so, it's not that it's faster...it's that Phoronix didn't do the testing right.
I am not merely a "consumer" or a "taxpayer". I am a Citizen of the State of Texas
He tested this with Ubuntu 11.04 under Unity and FreeBSD with KDE. It's a known that the configuration in Ubuntu there is a fairly massive performance sink on top of the already bad one Compiz can introduce with OpenGL stuff. As some pointed out in Phoronix' forums...all they did was benchmark Compiz/Unity versus KDE for all intents and purposes.
All things being equal, the results should be very similar if you're doing apples-to-apples comparisons since the OSes in question are similar in nature in this specific regard.
I am not merely a "consumer" or a "taxpayer". I am a Citizen of the State of Texas
don't waste your time reading that pathetic article. the "benchmarks" were conducted on completely different systems, with different hardware, running different desktop environments, etc., etc. and then the clowns go ahead and graph the framerates and so on as though it actually meant something in those circumstances. when someone benchmarks linux and the freebsd linux emulation on identical hardware, with the software configured as similarly as possible, then it might be interesting. until then, all this shows is that the linux emulation is good. they could have told us that in a few sentences and dispensed with the ridiculous invalid benchmarks
Time to start playing Quake again, Teh Fossies found a way to make it fastar!
What's funny is that people are finding any reason they can to dismiss the benchmarks (my favorite is claiming the hardware is different, when it's not).
Meanwhile, nobody seemed to have a problem with Phoronix's previous benchmark showing Wine/Cedega games running faster on Linux than on Windows. The difference now is that Linux is on the losing end of the benchmark, so it simply must be incorrect in some way.
OS bias is a funny and bizarre thing.
This claim keeps getting repeated, over and over by people who didn't RTFA. IT IS THE SAME HARDWARE. The operating systems report it differently.
As for Phoronix, nobody here seemed to have a problem with their previous benchmark showing Windows games running better on Linux Cedega. Now that Linux is shown to be losing in a benchmark, suddenly there are all these "problems" with the benchmark. This community is so biased.
I apologize in advance if this is a dumb question...
Is it possible that the 3D acceleration is running slower because more protections are in place to prevent the system from going kablooey in the event of a driver failure?
I ask (and worry that this is a dumb question) because I've noticed Windows 7 doesn't seem to be as fast with 3D as XP was, but it has proven to be a lot more fault-tolerant. Was just wondering of the discrepancy exists because something similar is going on.
"I like to lick butts!" by MobileTatsu-NJG (#32700246) (Score:5, Informative)
Once upon a time, long long ago, it was perhaps possible to satisfice on the simplifying notion that for the tiny, compact Linux kernel, in vitro benchmarks were an excellent proxy for in vivo performance.
Phoronix did a little bit of work to conduct an in vivo benchmark comparison (as opposed to benchmark analysis, which for in vivo benchmarks is a mountain of work for not necessarily much return).
The sad fact is that for the vast majority of Linux users these days, the crappy in vivo benchmark protocol comes closer to the reality that people experience.
You can almost say that the gold-standard in vitro benchmarks are a better guideline to tweakability than anything else.
The only known cure to what ails any system catering to the multitudes is to ditch the multitudes. That said, not every case of catering to the multitudes is equally bad, witness Windows Ebola with the daily retrovirus cocktail and plenty of bed rest (er, system reboots).
A small group of people banded together thinking we were immune. Sad, really, but entirely viable if you hold every Linux benchmark effort to higher standards than the Surgeon General.
that might be a noop, or the reason why suspend fails for me.
Ah, Linux.
You're special forces then? That's great! I just love your olympics!
"most people would expect that an additional abstraction layer would generally slow down the execution of binaries"
Learn how to code better than everyone else and this is a typical result.
Fact: Most Linux programmers are shitty programmers. This is why an abstraction layer ends up running better than native.
Still waiting on Serviscope_minor to wake up to fucking reality and realize that Jessica Price isn't going to fuck him.
If one installs just Debian Linux, w/ little or no GNU utilities - no GTK+, noGCC, no GIMP, no Gnome, no Emacs, and instead installs KDE and all its packages, and uses those apps, would you still insist on calling it GNU/Linux?
I really wish the Linux guys get a non GNU version of Wayland on them, and then put KDE4.8 on it. Just run w/ it. I do wish the GNU people a complete system as well, and to that end, I hope they can get HURD running (use Minix 3 instead of GNU Mach for your kernel) and on top of it, whatever they want - GNUSTEP, GTK+, GIMP, and anything else that suits them.
So how is WINE different from WABI (Windows Application Binary Interface)? In the latter, Windows systems calls would be interrupted, and substituted w/ Unix system calls
Linux 3d stack is a mess at the moment, its in between efforts to modernise it but the modular nature of the process have left us with a mess. Freebsd, doesnâ(TM)t change much as the stack is a more traditional one, but most of these games were designed for this style of stack. Linux would have performed better if it was the classic stack that these games were developed against
This isn't a competition or guide on how to get the most frames per second out of an OS. This is to find out about the performance on a default install, the way THE MAJORITY of people use their machines. If a particular OS already works great out of the box, no sane person is going to waste time messing with another broken OS just to get it to work how you want it to. Besides what you describe sounds like a failure of Linux. I don't have to do anything on my Windows PC to get good gaming performance. Sure if I shut down all services etc I'd get a very minor boost in performance, but I don't bother because my brain cant perceive +5 FPS more in a game.
Hahahah, you have no clue what you're doing, and you think you're making it faster ...
Thats priceless, theres a meme in there somewhere I'm missing.
Don't ask what os_raise_smp_barrier
My guess would be that its an op designed to ensure the CPU cache is flushed to RAM and that all out of order instructions are completed and flushed before continuing so that the contents of RAM actually match up with what they are supposed to be rather than being slightly off due to the processor making on the fly optimizations and reordering memory writes.
And this is why you don't listen to same random fuck on slashdot telling you why nVidia's drivers suck. He's clearly never worked in kernel code, yet is telling us how to get massive speedups!
I presume you have a bunch of nuts and bolts left over after you work on your car too.
Persistent Volume manager for Kubernetes - https://github.com/dwimsey/openshift-pvmanager
There are several factors that make pruning the bloat difficult for the average user:
1. Spurious dependencies.
I have on occasion installed a command line utility that called in the entire KDE source tree and did a build world.
2. Lack of documentation. Much of the time there is no good documentation outside of the program in terms of how to use it. You have to install it to test it, then uninstalling reveals that 9 billion things will break
3. Proliferation of libraries. I tell you Linux is getting as bad as windows with it's DLLs.
4. Incompatibility across upgrades. This is the flip side. Do an upgrade, and foo-3.2.11.lib changes the syntax for the bar call compared to foo-3.2.10.lib (of which both on install were symlinked to foo.lib...) Come on guys. Minor revisions should not change syntax.
5. Spurious change at the OS level. My computer is a tool. I use it to get work done. Changes for the sake of eye-candy is anathema. The visible part of a distribution should go unchanged for many years at a time.
6. Security fixes and bug fixes should be segregated from feature changes.
Steve Jobs, when running NeXT commented that people won't change for a 10% improvement. Or even 30%. People *will* change for a 500% improvement.
If you want to sell Linux to the masses:
1. It has to stop interfering with how things work.
2. It has to have good, clean, fast applications that are easy to learn to use, and incredibly stable.
Third Career: Tree Farmer Second Career: Computer Geek First Career: Teacher, Outdoor Instructor, Photographer.
Ubuntu is the problem here. We have known for a long time that it's performance is really really bad. It also uses lots and lots of RAM. Ubuntu didn't even run on a laptop normal Debian run properly. What's wrong with the Ubuntu? I don't know but it is a fact that when doing benchmarks you shouldn't use Ubuntu in the first place!
The benchmark shows the difference between Unity and KDE not Linux and PC-BSD.