Workstation, yes; Server, no.

The G5 is a gigantic improvement over the previous CPU in the PowerMac, the G4e. The G5 is one of the most superscalar CPUs ever, and has all the characteristics that could give Apple the edge, especially now that the clock speed race between AMD and Intel is over. However, there is still a lot of work to be done.

First of all, the G5 needs a lower latency access to the memory because right now, the integer performance of the G5 leaves a lot to be desired. The Opteron and Xeon have a better integer engine, and especially the Pentium 4/Xeon has a better Branch predictor too. The Opteron's memory subsystem runs circles around the G5's.

Secondly, it is clear that the G5 FP performance, despite its access to 32 architectural registers, needs good optimisation. Only one of our flops tests was " Altivectorized", which means that the GCC compiler needs to improve quite a bit before it can turn those many open source programs into super fast applications on the Mac. In contrast, the Intel compiler can vectorize all 8 tests.

Altivec or the velocity engine can make the G5 shine in workstation applications. A good example is Lightwave where the G5 takes on the best x86 competition in some situations, and remains behind in others.

The future looks promising in the workstation market for Apple, as the G5 has a lot of unused potential and the increasing market share of the Power Mac should tempt developers to put a little more effort in Mac optimisation.

The server performance of the Apple platform is, however, catastrophic. When we asked Apple for a reaction, they told us that some database vendors, Sybase and Oracle, have found a way around the threading problems. We'll try Sybase later, but frankly, we are very sceptical. The whole "multi-threaded Mach microkernel trapped inside a monolithic FreeBSD cocoon with several threading wrappers and coarse-grained threading access to the kernel", with a "backwards compatibility" millstone around its neck sounds like a bad fusion recipe for performance.

Workstation apps will hardly mind, but the performance of server applications depends greatly on the threading, signalling and locking engine. I am no operating system expert, but with the data that we have today, I think that a PowerPC optimised Linux such as Yellow Dog is a better idea for the Xserve than Mac OS X server.

References

Threading on OS X
http://developer.apple.com/technotes/tn/tn2028.html

Basics OS X
http://developer.apple.com/documentation/macosx/index.html


Mac OS X versus Linux
Comments Locked

116 Comments

View All Comments

  • exdeath - Friday, June 3, 2005 - link

    Wow look at a 2.4 GHz Opteron clean house.

    I'd like to see what a 2.6 GHz FX-55 with unregistered memory would do ;) I'll be fair and say keep it at 2.6 GHz stock ;)
  • bersl2 - Friday, June 3, 2005 - link

    Right. GCC 4.0 has an all new optimization framework, including autovectorization:

    http://gcc.gnu.org/projects/tree-ssa/vectorization...
  • Pannenkoek - Friday, June 3, 2005 - link

    It is well known that GCC 3.3 can't vectorize code. However, GCC 4 should be able to, eventually if not already.

    The small cache of the G5 would hamper its server performance I'd reckon, regardless of other factors.
  • jimbailey - Friday, June 3, 2005 - link

    I'm curious if you rebuilt Apache and MySQL from source. Apple has added significant amount of optimization to gcc and I would love to know if it has been included in this test. I don't doubt the results though. The trade off for using the Mach micro-kernel is well known.
  • rubikcube - Friday, June 3, 2005 - link

    Johan, I agree that all the facts point to your conclusions being accurate. I would bet all the money in the world that you are correct. However, this hypothesis is easily confirmed by running mysql on a G5 running linux.
  • Olaf van der Spek - Friday, June 3, 2005 - link

    > In Unix, this is done with a Syscall, and it results in two context switches (the CPU has to swap out one process for another)

    Does it?
    As far as I know it doesn't. The page tables don't need to be swapped and neither does the CPU state. The CPU gets access to the kernel-data because it goes to kernel-mode, but that doesn't require a full context switch I think.
  • WileCoyote - Friday, June 3, 2005 - link

    Tough crowd...
  • Eug - Friday, June 3, 2005 - link

    Of the stuff I understand, I agree with your conclusions, but I think it's reasonable to state that running Linux on the G5 yourself would have been the most definitive test.

    Anyways, I like fusion food. :)
  • cHodAXUK - Friday, June 3, 2005 - link

    Great article, very educational read and it was very interesting to see what is holding the G5 back. IBM/Apple really need to address these issues, people are paying alot of money for G5's that are dilvering nowhere near the level of performance that they *theoretically* should be.
  • Netopia - Friday, June 3, 2005 - link

    WOW... great article.

    I too would like to see Yellow Dog (Or FC4) loaded on the G5 for a true head-to-head. I hope you have the time with the box to get 'er done!

    Joe

Log in

Don't have an account? Sign up now