Snow Leopard will be a Performance Monster

In case you missed it, alongside all the hoo-ha surrounding the new iPhone 3G last week, there was a little information posted by Apple about the next release of Mac OS X: Snow Leopard. What is most surprising about this is that Snow Leopard will have very little new functionality … at least, functionality visible to the user. No Time Machine or Spotlight, just under-the-cover improvements in performance and stability. Doesn’t sound very interesting, right? Wrong.

Snow Leopard may well end up being more important to scientific developers than major releases like Tiger and Leopard. Of the 5 features listed on Apple’s Snow Leopard page, 3 are directly relevant to performance. (It’s also interesting to note that 1 feature — MS Exchange Support — is an enterprise feature, perhaps indicating that Apple is finally ready to make a push there.)

The first performance feature is 64-bit, which we have seen before, but appears to be improved in Snow Leopard, allowing enormous amounts of RAM to be addressed. This should be beneficial to certain scientific applications.

The second is Multicore, and a new technology called Grand Central. Apple’s site describes it thusly

“Grand Central,” a new set of technologies built into Snow Leopard, brings unrivaled support for multicore systems to Mac OS X. More cores, not faster clock speeds, drive performance increases in today’s processors. Grand Central takes full advantage by making all of Mac OS X multicore aware and optimizing it for allocating tasks across multiple cores and processors. Grand Central also makes it much easier for developers to create programs that squeeze every last drop of power from multicore systems.

This is a reasonably vague PR description, so having not actually attended WWDC this year, it leaves me with a lot of questions. It seems Apple is hard at work on a whole new model for threading, one that will be much simpler to use than pthreads. What this will look like is not clear from the publicly available information. Probably some sort of language support in C, or system level changes to the APIs, and a different approach to scheduling in the kernel.

Grand Central may be partially inspired by the iPhone, where ‘multi-threading’ is a dirty word. It could be that Apple wants a threading model that is more flexible, running in parallel on multicore, interleaved on a single core Mac, and completely serially on iPhone. With such a model built into the kernel, Apple could choose when to allow parallel operations, and how many. In the current system, any app can spawn threads when it chooses, and potentially bring your operating system to a grinding standstill (or run down the battery).

The last new performance feature in Snow Leopard is OpenCL. From Apple’s web site:

Another powerful Snow Leopard technology, OpenCL (Open Computing Language), makes it possible for developers to efficiently tap the vast gigaflops of computing power currently locked up in the graphics processing unit (GPU). With GPUs approaching processing speeds of a trillion operations per second, they’re capable of considerably more than just drawing pictures. OpenCL takes that power and redirects it for general-purpose computing.

This must be related to the discussion of CUDA that took place last week, but it goes further than anticipated. It is now common knowledge that graphics cards have vast amounts of untapped computing resources; the problem is, every manufacturer has devised its own means of accessing those resources. As things stand today, you need a different version of your software for each variety of GPU.

This is not the first time a situation like this has arisen. In the early days of 3D graphics, it was also a problem. At that time, SGI took the initiative, introducing OpenGL, an open language for programming 3D graphics. The rest is history.

Apple is clearly trying to do the same thing for executing code on the GPU. OpenCL is intended to be an open language; any code written with OpenCL should work on any graphics card, and will presumably fall back to executing on the CPU if no OpenCL-aware GPU is available. If the graphics card manufacturers adopt the new standard, it should make developing high-performance scientific apps that utilize the GPU much simpler.

So, if you thought Snow Leopard was more purr than pounce, think again: under the hood, Apple are introducing some very interesting technologies, and scientific developers are amongst the big winners.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

This kind of Leopard is ok with me

Functionality can be obtained from third parties. IMO what really matter are to improve stability, performance and to reduce the memory fingerprint.

P.D: It is quite difficult to guess that Captcha

Third parties

I'm not sure the functionality can be obtained from third parties. It seems to me that Grand Central requires low level kernel functionality, and can probably not be reproduced outside of Apple. OpenCL could be, but I am not aware of an open standard for programming GPUs. If you know of one, please post a link.

Drew

---------------------------
Drew McCormack
http://www.maccoremac.com
http://www.macanics.net
http://www.macresearch.org

LLVM

I was not at WWDC. So I can make some wild guesses... I would suspect that Grand Central and OpenCL may have some in common with Apple's continued support for LLVM, a low-level optimization framework. In Leopard, it helps provide good performance for the OpenGL stack. I'll note that LLVM is an open source project, but many of the key developers work at Apple now.

Server Info

There's also a page on Snow Leopard Server, which has some interesting announcements, such as ZFS and support for more memory. Both were requests from MacResearch members last year.

that's nice but . . .

OS X has become a performance hog and it's high time that it was made speedier. Honestly, who cares what else happens!

Performance Hog

I think that is the whole point: Snow Leopard will presumably introduce some features that dramatically improve performance for all software.

Drew

---------------------------
Drew McCormack
http://www.maccoremac.com
http://www.macanics.net
http://www.macresearch.org