Thursday, October 05, 2006

A Tale of Three Operating Systems

In a vain and foolish attempt to prove that I am the uber-nerd, I have configured my MacBook Pro to boot Mac OS X 10.4, Windows XP Home SP2, and Ubuntu Linux 6.06. It took a while to get everything set up, but all three now run X-Plane with hardware acceleration.

This provides a unique chance to compare the performance of the sim varying old operating-system factors (the OS, the drivers, and the compiler). The machine is a 2.16 ghz DuCore MacBook Pro with 2 GB of RAM and a 256 MB ATI X1600 card.

So without further delay, here are the numbers. Speed is in fps for frame-rate tests 1-3 (1 is lowest settings, 3 is very very aggressive). Each set of fps is for panel view, forward-no-HUD view, and the same view paused. Load times are in seconds for the KSBD demo DSF. The second load time is to reload the same scenery - the times are much faster on all 3 OSes because of the disk cache.

Drivers are not tweaked; this is simply the ATI binary drivers for Linux, whatever Apple ships in BootCamp (some 2.0 series ATI drivers) for Windows, and the 10.4.8 drivers for Mac, none tweaked in any way at the OS/control panel level. For Linux I disabled VBOs because they cause graphic corruption in some cases and slow frame-rate. This is probably a Linux/ATI driver bug.
PLATFORM      Mac         WIN        LINUX
Load/Reload 2.77/1.31 5.02/1.33 3.05/1.04
FPS Test 1 65/71/80 64/69/88 56/62/62
FPS Test 2 49/55/54 50/56/56 34/37/37
FPS Test 3 15/15/15 16/16/16 4/4/4
Analysis:
  • The Mac has the fastest disk performance; both Mac and Linux are significantly faster than Windows in raw loading. For reloading a file all operating systems are about the same, but it's the load-without-cache case that counts.
  • Windows has the highest frame-rates; slightly faster than Mac but quite a bit more than Linux. The lack of safe VBOs on Linux could account for this.
  • In the case where the fps didn't rise when the sim was paused, the limitation is with the video card - not surprising for tests 2 and 3 where there's a lot of antialiasing, anisotropic filtering, and objects.
Tomorrow I'll blog about how the fps test itself can be used.

6 comments:

Anonymous said...

The slowness of Linux in FPS is probably due to the fact that the official drivers from ATI/nVidia aren't very good, and they lag behind the Windows drivers of the same version.

Linux was the fastest at reloading files as it caches almost everything into memory. (I have 525676k used memory, where 247892k of that is cached from the hard disk).

This is with Ubuntu 6.10.

Benjamin Supnik said...

I don't think it's fair to generalize nVidia's drivers in with ATIs; all feedback we've gotten from our users is that nVidia's proprietary drivers on Linux cause less problems than ATIs, and nVidia has told us that the proprietary part of the Linux driver _is_ the Windows driver - that is they host their Windows driver inside Linux. We'd have to see a framerate comparison on the same machine, dual-boot to know the true performance gap.

Sadly caching doesn't contribute to real performance boosts in X-Plane with one possible exception - if you fly in circles around a set of DSFs and the circle is tight enough perhaps you could load the same files over and over again. But artwork is only loaded once and DSFs are not reloaded anymore during linear flight.

Anonymous said...

I did a quick check on the influence of --no_vbus on Linux, which should give some sort of impression on how much performance this option costs:

fps-test 3 with vbus: 21/21/21
fps-test 3 without vbus: 10/10/11

Benjamin Supnik said...

Yes -- I am not surprised on those numbers...what I found with VBOs was:

- In WorldMaker, there are misdrawn polygons and other weird visual artifacts with VBOs on in the terrain mesh.

- For terrrain-only rendering, VBOs slow me down...probably because the bogus vertices make huge triangles that use up pixel-fill.

- For tons of objects, the OBJs don't seem to be affected by the bug, so we benefit from having VBOs.

In particular, objects have their VBOs in VRAM when possible, so the performance difference for lots of OBJs with VBOs is quite large.

On my machine I get a segfault in Linux when using --fps_test=3 when the app exits.

Anonymous said...

yah i think linux would have looked better with a nvidia gpu and also with a different distro. In my experience deb based ones are slower than slack ones. but ubuntu is the most popular so it makes sense to use it in the benchmarks. thanks for the test.

Anonymous said...

I think it would be really interesting to see what the framerates would look like under Windows with ATItool set to the proper clock speed..
There is plenty of info on xlr8yourmac.com about how Apple underclocked the X1600 on the MacBookPro
I would be very interested to se the results, since I have the same machine.
Also, from what I understand, the fans go right to their 6000RPM limt in Windows, regardless of workload, this would provide ample cooling..