No More Apple Mysteries Part Two
UltimaGuy writes "Anadtech has an article up comparing the IBM G5 with Intel's CPU. This gives us insight on the strength and weakness of Mac OS X. It also has some thoughts of what they perceive to be OS X's Achilles Heel." From the article: "That is what we'll be doing in this article: we will shed more light on the whole Apple versus x86 PC, IBM G5 versus Intel CPU discussion by showing you what the G5 is capable of when running Linux. This gives us insight on the strength and weakness of Mac OS X, as we compare Linux and Mac OS X on the same machine. The article won't answer all the questions that the first one had unintentionally created. As we told you in the previous article, Apple pointed out that Oracle and Sybase should fare better than MySQL on the Xserve platform. We will postpone the more in-depth database testing (including Oracle) to a later point in time, when we can test the new Apple Intel platform." This is the sequel to another article, reported on in June.
we just received one of the intel mac workstations at my office on friday, it looks just like the g5 ones (nice metal case). non-relevant, but i can't wait to do some of my own tests.
Why, oh why, do they insist on MySQL? They state in the article that they learned of the FSync bug in MySQL (which many of us pointed to last time). Why don't they throw PostgreSQL in there and see how it performs?
Javascript + Nintendo DSi = DSiCade
Apple has always been about features at the cost of some speed.
I wouldn't be too surprised if "Leopard" could run win and linux apps each in their own window, thus the need to keep the app threads separate from the kernel threads.
By the report the G5 processors are just as fast as the fastest x86.
Comments?
The first thing jumps to mind is a typical fanboy response: "The Mac is a desktop computer. If it runs MySQL good enough for a prototyping environment, that's fine. Where else can you get a great desktop environment that just works, along with a built-in Unix-like OS?"
But I should step back from that statement. It shouldn't be that way. We should have a truly world-class server combined with our desktop experience. I should be able to go from prototyping my web apps right to production, without a bunch of migration or guesstimation.
I really like Mac OS X, but I'm not above recognizing if it's flawed in certain aspects. Any word on whether Mac OS X Server performs these types of operations better than the client? That would be interesting - somewhat troubling, but interesting (and perhaps not even that troubling.)
concrete5: a cms made for marketing, but strong enough for geeks.
I would have rpefered Apple going with AMD opteron's or contracting one of their other beefy 64 bit chips. Why intel?
;)_
I like the g5 chips, and sure the intel ones are okay. But it just seems like AMD would have been a better match for Apple.
Oh well, I'll take what I can get.
And I can't wait to move over a bunch of older intel's to mac os X.
-=fshalor
This guy said he'd run each OS through workstation-like tests, but all I see is a bunch of server tests and a lame "isolate the FPU" test.
And calling OS X's threading its "Achilles heel" is a bit short-sighted and belies an ignorance of OS design choices. Mac OS X adds an extra layer of communication for threading, so you can have user-space threads. This of course, comes with a performance penalty. In Linux, everything is a kernel thread. This gives it a big performance advantage, making it appropriate for servers operating under controlled conditions, as the tests indicate. However, OS X's design choice makes for more secure communication between user-space threads and the kernel, which gives an advantage in the workstation-space, since you can keep a user process from running amok in the kernel.
I've always said that Linux is a great server OS, and these tests certainly show that. But they're very tilted toward Linux's strengths and OS X's weaknesses, so OS X comes out looking like a ball-and-chain on Apple hardware. The author made a fundamental mistake in assuming that server stress tests were the be-all and end-all of performance computing, and that's just not true. OS X's designers made different design choices than the Linux designers did. These aren't choices that can be "fixed".
All he's shown here is that OS X is not appropriate for a high-demand, single-application server, and that's not really news to anyone. At the desktop level, no one's going to be working with thousands of simultaneous threads.
The most interesting parts for me were the fork() times and IPC benchmarks. 0SX was considerably slower in these areas. Is this an nptl issue?
I am a viral sig. Please help me spread.
I tried for three days to get bluetooth to work on my pc laptop, and never did. I did it with a powerbook in 3 minutes. That's the performance I'm concerned about, not a few seconds here or there.
Given that the Mac community are more concerned over Photoshop than databases its not really suprising that they haven't concentrated massively on transactionally written files (lots of small writes) and may have chosen to focus on optimizing the writing of big files and the maths and graphics processing that goes with graphics work.
Sure its interesting to compare the Mac OSX with Linux on the same tin and see where one is faster than the other, and sure it might mean that Mac OSX Intel is going to be poor at running MySQL too....
But in terms of a fair evaluation and "no more mysteries", what they haven't covered is why transitions in the GUI are so much smoother than those achieved by Linux or Windows...
An Eye for an Eye will make the whole world blind - Gandhi
I read this article yesterday when it was posted. For a news summary site, ./ isn't very quick.
/. articles.
Also, what's with the barrage of Apple/Intel/iPod/DRM/HDDVD/*AA/Lawsuit articles? These were interesting for the first few months. Just post a story every day that says:
"Companies sued other companies over pantents they shouldn't have, the *AA's are illegally abusing power they don't have and Apple did something so fantastic I crapped my pants."
There, I covered the last 6 months of
I think it tells you something about the mentality at AnandTech that the only criteria they have for choosing a computer are: 1) performance in a benchmark that has nothing to do with any normal user's needs and 2) the shininess of the case.
I think I speak for most Mac users when I say that I couldn't possibly care less how many MySQL transactions my computer could (but doesn't) run per second. There is undoubtedly a more cost-effective way of building a dedicated MySQL server, and they should be used -- as long as I get to keep a Mac on my desk to connect to it.
What I'm listening to now on Pandora...
The problem is that this correction is still wrong. OS X has never been based on FreeBSD's kernel. Although it has strived to ensure its BSD API matches FreeBSD, and has even ported over some custom extensions (such as kqueue), OS X's kernel has always been based on OPENSTEP's--a Mach microkernel with custom Unix services above it. OS X has had native threads since OS X 10.0 through the NSThread and Carbon Multiprocessing APIs. I don't know whether POSIX threads followed a different route, but the statement that OS X only got native threads in Tiger is simply wrong.
After reading the thing, here you go: OSX Server is significantly slower than Yellow Dog Linux (Server)running the Big Three on a G5. How many people try to run enormous traffic sites on OSX Server? Nobody?
It seemed that the authors were trying to make a point about the G5 vs. X86, and why Apple switched, but unless I missed it, there isn't any discussion of OSX Server on X86, or the opportunities that brings. It only seems to discuss OSXS vs. YDL on G5's. OK, Linux is faster. So? I don't get it.
Friends help you move. Real friends help you move bodies.
Never forget: 2 + 2 = 5 for extremely large values of 2.
...Why intel?...
One word: laptops.
C//
Of course if you actually want to see the strengths of the you need to be running code written to use altivec/ve, since that's one of the reasons you've seen xserves cropping up in the scientific community in the first place and why I think you're going in many cases to see IBM Cell workstations start to crop up in their place rather than x86 xserves. SSE is inadequate or at least incredibly messy for many things.
AMD has, and always will be, something of an ugly duckling in the industry. Intel is the giant, the name every investor recognizes. Also, I seriously doubt AMD gave Apple a better offer pricing-wise than Intel.
I agree, it's disappointing, but among other things, there's nothing to guarantee that Apple won't, at some point, switch to/also offer AMD.
Please help metamoderate.
Linux is awesome, I'm not denying that, but its OS X server that matters, even if it may be slower, It's great to use as a school website server, and as a workstation at the same time. Not to mention that Server Admin, and a couple of the other applications for OS X server management make it a breeze to keep up to date, and running properly, as well as for initial configuration. Linux just couldn't do that for us. (read, not all super technical people dealing with the server next year).
MySQL? That's pretty much all you need to see to know that these guys don't know what they're doing.
They didn't have performance results for which platform ran Solitaire better.
Moderation in All Things... Especially Moderation - gurutc
Ok, MacOS X server performance is crap, not news. G5 is an ok to good CPU, not news either.
The question is, is it possible to get a non-apple G5 system since Apple will go the (W)intel route?
I know about Genesis/Pegasos PPC systems but the current ones uses G4s and the not-in-a-distant-future will use the PPC7448(?). But what about PPC970, can we expect them from Genesis aswell or does IBM or someone else make machines with them?
No worries... Apple will come out with iSQL and things will be all better.
Sam
but unless I missed it, there isn't any discussion of OSX Server on X86
I assume this is because you cannot legally get OSX Server on X86 right now, nor is it even finished, making it simultaneously impossible and silly to include it in a series of performance testing articles?
Irritable, left-wing and possibly humorous bumper stickers and t-shirts
Apple has priorities. Just like linux sucks on desktops and rocks on servers, Mac OS X sucks on servers and rocks on desktop
If Apple were releasing a server today, it would probably make sense to have Opteron in it. We don't know what Apple's first Intel based Mac will be, and it sure as hell isn't being released today. The Pentium-M derivative that will apparently run the first Intel Macs will, by all accounts, be 64 bit. It will also be dual core. What's more, it should be entirely competitive with what AMD has out at the time, and do it at very few watts.
Apple isn't stupid. It's not like they did this as some random guesswork based plan. They carefully considered the roadmaps that they could see. They looked at Cell. They looked at a lot of things. Intel simply had the best product in the time frame they were looking at.
I'm not argiung that AMD doesn't have superior chips to Intel right now. I have an Athlon64 in my own system, and I love it. I have been eyeing a dual-core/dual proc (quad core total) Opteron workstation as my next system if I can afford it. But, this time next year, it could well be that I am looking at Intel much more closely...
Shouldn't you sig be better written as:
do() || do_not(); assert(! try());
OS X has never been based on FreeBSD's kernel. ... OS X's kernel has always been based on OPENSTEP's--a Mach microkernel with custom Unix services above it.
And where do you think those UNIX services come from?
Because the answer is, FreeBSD.
Mach isn't a kernel by itself, it provides very low level services and "hosts" the rest of the kernel (though Darwin blurs this line somewhat, such that the mach microkernel and hosted freebsd kernel are technically the same entity). FreeBSD isn't the entire kernel (and its portion of the kernel isn't the part that provides threading services, see link above) but it is still in the kernel and still provides crucial functionality, and serves as a replacement for certain things which in the pre-OS X kernel used to be provided by OpenStep code.
Irritable, left-wing and possibly humorous bumper stickers and t-shirts
Apple didn't choose AMD for a couple big reason. One of them was given by Steve Jobs when he announced the transition - Intel's roadmap offers better performance per watt of power than AMD or IBM can. Because laptops are taking a greater marketshare than desktops, it only makes sense for Apple to have a portable chip that produces the most bang for the least amount of power.
The other issue is fab capacity. AMD doesn't have the capacity that Intel does. Apple got burned more than once by a lack of chips coming from Freescale/IBMs fabs. They do not want to go through that again, and AMD has trouble delivering large volumes of their top-of-the-line processors. They've gotten better, but Apple doesn't want to be held back by a lack of fab capacity.
I use AMD for Windows and Linux, but Apple's business plan makes Intel the best fit for their future directions.
Because intel is a one stop shop for apple. Apple can get xscale, wireless, nics, etc... and cpus. I dont think they can do that with amd.
This article seems to be suggesting the potential of the architecture as much as anything else. It would appear that the IBM G5 processors pack the punch to deleiver a serious kick, but are let down by the software and memory issues. Perhaps it is time for apple to go back to its rebellious roots and do something new and radical in the software front instead of just the hardware. Why are they transfering to intel chips and making it open source when open source on the G5's could prove a strong rival? Dont bow down to the Micro$oft empire!
But there's so much more here at slashdot! Let's add "Companies are also suing other companies over patents/trademarks/copyrights they don't actually have." That covers SCO and the recent LMI stories.
We also have the occasional:
"Somone built a PC out of weird parts,"
"Big brother gained new, over-reaching powers that will bring society to its knees,"
"Some OSS figurehead (Stallman, Raymond, etc) said something idealistic/naive/irrelevant/stupid/arrogant,"
"Researchers at a small University made some irrelevant, impractical advance in so-called nanotech that will never affect anyone but makes us crap our pants,"
"Europe is far more enlightened than the US because...,"
"Some government switched from Windows to Linux,"
"Some government used Linux as a ploy to get cheaper Windows pricing,"
"Someone at Google farted,"
"Roland Piquepaille got a story on his 'blog' accepted by ripping off the AP feed,"
"Fudged TCO studies show that OS 'A' is cheaper than OS 'B,' and far cheaper than OS 'X'..."
"Microsoft is still evil,"
"An exploit is discovered in Windows that allows...,"
"Will we be able to do in 100 years some ridiculous thing that I've read about in tons of sci-fi novels but is completely pointless in real life?"
... etc. Yes, this is our slashdot.
"By the report the G5 processors are just as fast as the fastest x86."
Which is funny, because they took the fastest available G5s and pitted them against the second fastest available single-core Opterons.
I also don't buy the gcc as an equalizer assertion given in the test. They've already shown that gcc doesn't produce apples-to-apples results, and now they've shown that it doesn't produce improving (or even consistent) results in newer versions.
I'm willing to accept that they've produced some real-world tests, but the synthetic ones are a bit of a stretch. Yes, the processors have similar performance envelopes, but saying anything more than that is just creating a conclusion with too little real information.
Hmmm... this would probably be more in line with the quote:
do() || do_not(); assert(try() == null);
Any idea when the Mac Mini will hit x86? Everyone else has tried to release a Mac Mini clone at x86 and failed, I want to see if Apple can do it successfully.
Plus I wanna get one.
Mostly because of that. It's not just Anand that uses MySQL primarily. They could use Postgres, but the acronym exists for a reason.
You could have OSXAPP - OS X, Apache, Postgres, [Perl, PHP, Python, $P_Script_Language], but then you'd start wading into WebObjects waters..
Speaking of, where is WebObjects in all of this? Does it factor into the bias? Apple lists the following Database Servers:
* Microsoft SQL Server 2000 8.00.194 (?!)
* MySQL 4.1.10a
* OpenBase 8.0
* Oracle 10g Enterprise Edition
* Oracle 9i Enterprise Edition Sybase ASE 12.5
I know it will run on Windows, but still.. What does this mean?! I don't know!
The proper form is of course: (if (nondeterministically-chosen) (do) nil) ;; TRY removed from options
Blah blah blah, benchmarks are nice, but here's the real scoop:
I have a dual 2ghz PowerMac G5, a 3.4ghz Dell Opitplex and a 3.6ghz Developer Transition Kit. I use my G5 as my main computer at home and my Dell and DTK as my main machine at work.
The DTK smokes my dual 2ghz badly, and runs PPC apps in Rosetta at seemingly only slightly slower speeds than my G5. Graphics functions on the DTK smoke my dual G5 with the high-end (at the time) NVidia card it came with. Apps load much faster, Safari is much faster, everything I use is much faster.
The DTK's UI responsiveness is quicker than my Dell 3.4ghz running Win2003 with all hardware accel turned on. OS X has always been more sluggish for me than Windows, but I had to chuckle when I logged into my Dell after using the DTK for a week exclusively and noticing the Dell UI responsiveness slightly lagging.
It's also important to note that the NeXT ABI is probably much more suited to x86 than PPC.
This is a great thing for Apple, and their Intel-based machines are going to impress and wow people.
Ah, a comparison of fork performance between OS X and Linux. I've always known that fork is horrifically slow on Darwin, and this proves it. Incidentally, this is the main reason I've switched to Linux on my iBook. But there are others: dynamic library vs. framework weirdness, memory-hungry GUI, and the slow and slightly unreliable filesystem (compared to reiserfs).
Please correct me if I got my facts wrong.
I've noticed from doing a multi-threaded scalability test on single processor systems for OS X, Linux, and Solaris that you can get different scheduler artifacts affecting performance. For instance, how threads interleave using synchronization can have significant effects on performance. If a thread can repeatly reacquire a lock without sharing it with other waiting threads, it can under some conditions run significantly faster since it's not preempting as much. It all depends and is pretty twitchy. I'd be pretty careful about making any conclusions about this area without tuning the application for the platform it's running on. I can tune a multi-threaded app so it runs faster on OS X and slower on Linux, or vice versa. Running it on one setting won't necessarily prove anything.
Are you joking?
VFS, the filesystem, the whole TCP/IP layer, the POSIX API, all of that cames from FreeBSD code and that's quite a lot of code.
Yes, mac os x uses openstep's kernel. But then, openstep kernel used freebsd code aswell....
I remember a presentation from apple showing percentages of how much code comes from each variant. BSD code was most of it, with the IOKIT being second and MACH-derived code being the last - less than 10%. Shame that I didn't bookmark it...
The most interesting parts for me were the fork() times and IPC benchmarks. 0SX was considerably slower in these areas. Is this an nptl issue?
Boy, I'd give my left - ah - ear hair maybe? pinkie fingernail clippings? whatever - if Avie Tevanian and/or some of the FreeBSD committee members would get on here and talk about the Carnegie-Mellon/Utah/Whosesoever's microkernel and the FreeBSD threading layer and all the cool stuff that I've always wished I knew more about ever since I cut my teeth on a NeXTstation with Interface Builder and the ObjectiveC compiler.
Stares off into the distance, bats eyelids, and releases big, wistful, teenie-bopper groupie sigh...
you know, people uses programs in their computers.
People using servers are probably very interested in seeing how server-oriented programs perform in a given hardware
Those are called "real-life benchmarks". They're much better than lmbench and tiny C programs running whatever microbenchmark in a tight loop because they measure what you actually are going going to do with your system.
It doesn't matter if your lmbench numbers are great, if the apps you're going to run don't run well what's the point? I can't see why mysql is a bad choice for a benchmark...
Actually, it isn't slashdotters beliefs that Apple doesn't make poor marketing decisions. It is our belief that Apple doesn't make marketing decisions, period. We don't think they actually have a marketing dept. outside of the one that is used for the iPod.
Thanks.
That said, I wonder if 'isql' is any more likely to be an existing trade mark than say 'ls' or, for that matter, 'mknod.'
They also run apache and lmbench; I don't think you can say they "insist" on mysql...
how hard would it be to write an extremely simple program that calls pthread() in a loop, counts the threads, and issues a timestamp?
If you think the bottleneck is in thread creation, test thread creation, not fork(). They're not the same, and OS X does enough odd stuff with processes that I'd not be shocked in fork() had a bunch of extra process-related overhead that pthread() does not.
I'm not saying that thread creation isn't slow on OS X- it likely is... but please, if we suspect that's the problem, *that* is what we want to see tested! This article and AnandTech's testing methodology somehow explicitly misses the point of what they think the problem is... and it doesn't seem like it should be difficult *at all* to write a simple test to address *exactly* that problem.
Write a simple pthread() benchmark. The code could probably fit on one screen. Publish the code, run the test, file a bug with Apple, be done with it. A simple pthread() benchmark will tell us if the problem is in pthread() or fork() at this point, wouldn't that be nice to know *for sure*, so we don't have to speculate?
All this mucking about with MySQL doesn't tell us where the problem is, and I don't understand what's so difficult about coming up with a simple, pure pthread() benchmark... again, I *do* agree with the author and think OS X pthread() is the problem, I'd just like to see a simple, pure test that *shows* that it's *the* problem, so I can file a bug with Apple...
The whole PowerPC architecture includes memory management and such that is generally regarded as better at context switching. This is supposed to facilitate better task switching for servers that run many processes.
IBM's UNIX, AIX, is designed exclusively for PowerPC, the design of the memory managment and such reflects this, while Linux memory management is designed for portability. (There are bound to be some tests comparing Linux and AIX on IBM servers out there.) You'd think that the Apple kernel would take advantage of such things. But then, how many server farms out there run Apple-based systems?
So how many process forks did that MySql test create, and would that adequately represent a cross section of real-world environments?
{ return clarity; }
It seems to me as though the article didn't point to a single weakness, but the fact that signaling, IPC and thread creation were all slower in OSX compared to linux. While it seemed clear that the threading performance was a bigger factor for MySQL, I can't help but wonder how much better all other aspects of OSX might improve if thread creation, signaling, and IPC were all improved.
Much as I would prefer to use OSX on a daily basis to windows, and somewhat prefer it to Gnome or KDE, it seems hard to escape the impression that Apple created an OS to run iSoftware (iTunes, iLife, etc.) and photoshop.
"We are all geniuses when we dream"
- E.M. Cioran
Also, expect desktop apps to start using threads heavily (in the future) to use multi-core CPUs
Unlikely. Just because you can, doesn't mean there is any good reason to, and most desktop application developers will have absolutely no reason to bother with threads at all. The vast majority of desktop apps just sit idle most the time, and even the odd moment when they're busy it's mostly just to do basic things like redraw buttons etc. Thus threads will provide a grand total of zero benefit in almost all desktop applications --- yet they come at a cost to developers in that they increase software design complexity and make debugging harder. Most desktop application functionality is inherently synchronous too (driven by user interaction), so I think very few applications will benefit from being multi-threaded. Applications that might are e.g. word processors with background spellchecking and grammar checking, but really, these are still only going to launch a small handful of threads at most. Even CAD apps and applications like Photoshop that do occasionally require lots of CPU when activating certain functions will draw comparatively little benefit from increased design complexity in making a few processor intensive functions utilise multiple threads.
Once again, OS X x86 (unless hacked) will not run on a generic IBM PC. You're likely to run into driver issues even if it is hacked.
Also, changing the architecture isn't going to do anything for their performance problems.
DRM DRM DRM DRM ... oh you get the idea ... right?
Moshe Bar did a comparative evaluation of Mac OSX vs. Linux way back in 2002. Look up 'Comparing Apples and Penguins' (need to register w/ CMP to read it, I believe).
Anyway, in the time since then, Apple has apparently done nothing to improve the situation.
If Apple's performance problems are primarily related to their OS, then why switch architectures? I have two guesses:
(1) Apple knows something we don't know about Intel's roadmap.
(2) They know they need a better kernel, they're shopping around for one, and the kernel(s) they are interested in work best on Intel.
"Made up/misattributed quote that makes me look smart. I am on
I don't see why Apple couldn't use Intel for mobile and AMD for desktops. Plenty of PC manufacturers get by just fine making computers using both Intel and AMD processors.
You bring up a point highly abused on slashdot, that AMD has less capacity. Capacity isn't difficult to come up with, given a year's lead or two like Apple is giving Intel. But even assuming the launch was next month, what makes you believe that AMD cannot meet Apple's demands? I've seen more than one critic more qualified than 'some random guy on slashdot' describe Apple's needs being a drop in the bucket compared to AMD's existing capacity.
So it's time for Random Slashdot Guys to step it up a notch: how much does AMD produce, how much does Apple need, and how much does Intel produce?
I Browse at +4 Flamebait
Open Source Sysadmin
I would have rpefered Apple going with AMD opteron's or contracting one of their other beefy 64 bit chips. Why intel?
Currently Steve Jobs is using Intel to beat IBM over the head. Officially PowerPC is out of the picture, but it hasn't been announced just when G5 will stop - will it go dual-core? How about low-voltage?
Similarly, when Apple is largely x86 at some time in the future, Steve will have AMD to keep Intel honest.
I expect we will see regular rumors of Apple switching to AMD, followed by nice price cuts on Intel/Apple kit. Maybe even the Dell trick of "accidentally" leaking product code and spare parts pages for AMD based product. Makes the claim that AMD is being seriously considered look very credible when going to the regular meetings with Intel to negotiate extremely good volume discounts (Dell can't afford to sell AMD products, it would cause Intel to inrease its prices that it charges Dell, and at this point Dell is addicted to rock-bottom Intel prices - it's practically their entire business model).
yellowdog 3.01 ran much faster than 10.3. but, for some reason fedora 4 wouldn't run, and i need keynote for my classes. ( I teach.) so, I went back to os x exclusively. but, yeah, linux is faster, at least from my experience.
My problem? I was perfectly gruntled, until some numbnuts came by and dissed me.
And to sum up every test ever done on any platfor using any hardware....
Some things run better on some machines than others.
The End.
Seriously this article and the last and tons of other comparisons always end up with the same conclusions that we have known since the beginnning of time.
Apple's G5's with OS X run some apps really well and some apps poorly. Just like Windows XP runs some apps really well and some apps poorly. With Linux on both hardware platforms some apps run better on the Intel chips and some apps run better on the IBM chips.
Ave Molech Setting
WebObjects uses the Enterprise Objects Framework (EOF) to do object-relational mapping. The Java EOF uses a JDBC adaptor to interact with the database. Apple's supported list of databases are the ones Apple will accept complaints about, many JDBC-capable databases will work. EOF allows for custom enhancements to augment the JDBC-level support for a given DBMS, but any DB with good JDBC support should work with EOF.
As a network app, WebObjects leaves it to the customer to determine the best platform for running application components (including WebObjects), and supports the most popular/lucrative options.
Free Adam Smith! (Or best offer.)
Very likely, especially with the advent of multi-core CPUs, Hyper-Threading and languages/dev systems making it easier and more desireable to do multi-threading.
I don't know about your desktop apps, but the ones I write use numerous threads to keep things live. I am looking at my debug window right now and there are seven threads minimum running in the client app, and over 35 on the server, more when I am actually doing things (especially when talking to the server).
I know people who work at Adobe and other large desktop app development companies - they use threads heavily there too, and the trend is only going to increase as the advantages become compelling and threading is better understood.
Debugging threading issues can be frustrating and time consuming, but in my experience (20+ years worth) most bugs are not due to threading issues - and the advantages outweigh the disadvantages.
I like my Opteron machine as much as anyone but although AMD makes decent CPUs, the chipsets to use those CPUs suck. Just try to find an Opteron motherboard with the performance and stability of an Intel chipset board. They just don't exist.
I think that is another major reason why Apple went with Intel. I mean Intel's USB and disk controller chipsets are the best in the industry. Intel was also the first to provide PCI Express. Intel chipset based motherboards just whip the crap out of anything you can find for AMD CPUs. nVidia's chipsets are not that bad but still not up to the stability of Intel.
The ratio of people to cake is too big
Although it is not a perfect comparison, for server type tasks this machine will outperform any G5 Mac or Xserve.
IBM does sell a "deskside" form factored version (the 720) for about $5000. Still not twice as much as the top of the line G5 Mac.
This in fact causes a performance hit, but it actually turns out that it is not responsible for the majority of the hit. Most of the degradation in Mach was due to other overhead, such as checks for memory access rights. This costly functionality was needed in order to meet the design goal of transparency across distributed systems without compromising security.
For a fork() to occur, a port access right must first be checked. Then there is mapping between user- and kernel-threads. Those are the significant Mach bottlenecks. Linux has a much faster model for threading and scheduling (that 2.6+ scheduler is great!).
I wonder what de Raadt thinks of all this.
What a stunningly dumb article. Great high-level point of view on what problems can bubble up and look like, but no low-level understanding of what the problems *are* at all.
For example:
- Under 10.4, you need to ensure sockets get TCP_NODELAY, and that you don't try and use corking via TCP_NOPUSH or TCP_CORK. Memcached users are watching stuff *crawl* when they hit it, depending on the buffer size you happen to be using.
- Whinging about thread creation overhead ignores the fact that just about everything that uses heavily threaded environments use a thread pool and/or worker system - so thread creation overhead is pretty much a red herring in most app design. Sure, it's not brilliant that it's there, but it's also pretty pointless to talk about.
- As anyone who used poll() under heavy load knows, Panther could core dump; Tiger has improved, but it's poll() implementation is still suffering.
- There is, actually, a hidden cost on Macs - POWER state load/store is a lot more expensive, and the context switches are much higher. Tasks which cross the kernel barrier heavily do indeed pay a higher cost on the mac. This requires that folks who are used to 'cheaper' system calls think a bit more about how they can efficiently move their data in the smallest number of syscalls.
- And let's not forget to mention the exponentially more expensive cost of misaligned data access on PPC, easily invoked accidentally in code.
I mean, even once you get past the worse-than-one-might-want performance of the poll() causing problems, you've got the critical problem with TCP latency stepping in.
Strangely enough, all the tests they did that actually show problems are either known bugs, with known workarounds, or are known differences in behavior...
At some point, someone needs to call a spade a spade - was Apache built using TCP_CORK? You betcha. Was he using a fixed version of MySQL? Nope. Did the form of the tests for MySQL also succumb to the TCP_CORK problem? Almost guaranteed.
A poor test. Next time, pay some monkey to *write some code* if you're trying to prove the 'cost of latency'; if you're trying to prove that most Unix software isn't brilliantly optimized to work around issues which have existed on the mac for some time? Well, everything takes time, doesn't it.
-- A mind is a terrible thing.
Yes, one can easily question if moving from the G5 to Intel will be a performance win. But there are no portable machines with the G5 processor. The iBook and PowerBook lines make up enough of Apple's profits that they can't allow them to plateau. Regardless of what advances IBM has made to the G5, they still have not provided any offering that provides Apple something that can match an Intel Centrino for revising portable products. My guess is that Apple will phase out the G4 before they move on to eliminating any G5 offering.
Perhaps because of DRM? Apple can't release OS X for x86 until they have some kind of trusted hardware system to prevent the OS from being used on other hardware. Intel probably offered assurances about their trusted computing hardware.
Besides, I expect as before apple boxes will be kinda pricey for their performance thus it doesn't make sense for them to take risks to slice off a bit in processor price. AMD is producing some good chips now but will it still be at the top of the market in several years? Intel is huge and even if AMD keeps the pressure on them their market domination, capital and massive store of chip knowledge and patents guarantees that they will stay competitive for years.
In short it makes sense for apple to cut a deal with the market leader rather than the flashy new competitor.
If you liked this thought maybe you would find my blog nice too:
... to 99% of computer users.
/. crowd (Linux, SQL, etc...), as that's why this article was posted here, and that's very nice and all, but... to the normal computer user, it's still an OS X vs. Windoze thang. After switching to Mac I kick myself everyday for not doing it sooner. So when I read this article I realized it had nothing to do with "Apple platform compares, performance-wise, to the x86 PC platform" in normal, real world instances, but with esoteric server BS rather quickly. I moved on realizing the article blurb was a tad misleading.
Yes, it means much more to the
so let me see if I get this right... the high level tradeoff is that the user (programmer?) implementing benefits ease of use a distributed system (xGrid?) while the database admin gets lowly performance from mysql. I guess with some really vertical markets that can really take advantage of the vectorization of the g5 combined with distributed systems, OS X makes sense. Who's taking advantage of this benefit?
on the other hand, the end user gets overhead on every single fork() call, meaning making new threads take longer, but the general user doesn't notice this as much since the processes (apps) are much bigger.
Unfortuantely you bought when Apple had just switched to Asus for their iBook's logic boards. Their first revs were complete crap. This is a problem that is related mainly to the G3s. The later G4 iBooks are very reliable, even though they're still using Asus boards. I set my parents up with one, and now they don't call for help like they had prior with their various PCs.
It's a bummer that you ended up with a lemon, if you would've spent a bit more for a Powerbook(They do not use Asus boards.), or bought later on when the G4 iBook were released, chances are that you would've bought a machine that is truly reliable. I've had my PB for 2.5 years now and after the first year I stopped shuting it down. I just sleep it now. The only time I restart is during an update. The last time I powered down was to install Tiger. Overall, my Macs are 99.99% reliable, the 2 PCs(One is a workstation) I have in my office for Rendering, are only about 60% reliable.
Apple will replace all iBook logic boards free of charge. The time I had to call Apple for support, was when my wives Powerbook's screen hinges were busted by accident, they sent a box the very next day, and when we finally got around to sending it back, the fixed Powerbook showed up a day later. I've never had any serious issues with my desktops that warranted an on-site call, so I'm not sure what Apple's turn around is? Macs in general require very little maintenance, but like any other hardware manufacture, like Dell, they're bound to ship a few lemons; Like my Dell Axim.
I have a couple of friends that "were" hardcore Linux PC peeps, they're on Powerbooks now and haven't looked back. I'm an artist, so besides the early dos days, I've always relied primarily on Macs, and only used PCs for support and games. No complaints here, Apple machines are simply more reliable on average than all the PCs I've owned and used.
you miserable retard.... $%$#%^ your mother and the horse she rode in on! :)
I would have rpefered Apple going with AMD opteron's or contracting one of their other beefy 64 bit chips. Why intel?
1. Because Intel can bankroll transition costs to a large degree, as they benefit greatly from it.
2. Because people know Intel, not so much AMD. If you're going to say you're going to industry-standard chips, it makes sense to say you're going to the industry-leading (in terms of sales and marketing, not necessarily current performance) vendor.
3. Because Intel has a full spectrum of chip solutions, from XScale to high-end Pentium "5" architecture.
4. Because if Intel doesn't deliver then Apple can shift over to AMD quite quickly and easily.
Welcome to 10 years ago...
1 995/ukernel-construction.pdf
http://i30www.ira.uka.de/research/documents/l4ka/
Why do you (and AnandTech) conflate "faster" with "better?" I haven't read the Moshe Bar article you mentioned because it requires significant registration hoops, but there are numerous design decisions that Apple makes that impact performance.
OS X always links libc dynamically. OS X allows for floating point and SIMD in the kernel. OS X gives the kernel its own address space. Etc. There's a tradeoff between performance and binary compatibility/flexibility. In each of the above cases, Linux prefers the former, and Apple the latter. The Anandtech article makes no mention of these; their implicit conclusion is that Apple's engineers are incompetent.
And incidentally, Apple has done a great deal of performance work in their kernel.
Well, they possibly could. The other speculation is that they're hoping to make use of some of the Palladium infrastructure to keep people from pirating the OS. Frankly, I don't think they should.
I know that there have been screenshots out there proving that OSX works on AMD just fine. So who knows what Apple might do. Just be aware: Apple switched away from IBM for a variety of reasons, but chief amongst them was that they couldn't get low power G-whatevers out of IBM.
C//
Apple is moving to a successor to the Pentium M --not the Pentium IV. Anandtech are deceptive assholes, their speculatory comments about Apple's move to X86 intermixed with data about an irrelevant chip (the Pentium IV) is just their opening volley in a war against Mac on Intel. You see, a $500 macMini (wether it is G4 or Pentium M based) satisfies the needs of 98% of PC users. This will soon become more evident and sites like Anandtech and CPU (there for those in the 98% who now build their own PCs) will become obsolete until they can graduate from college (expand their education enough) to be relevant to the 2% of high-end users.
Well Oracle 10g seems to be pretty good:
... not IBM with AIX, not Hewlett Packard with HP/UX, not Sun with Solaris, and not Dell with any operating system can match the Apple OSX/Darwin technology and price."
http://www.psoug.org/rac_on_mac.html/ rac on mac.
These guys have no mac bias, the dba who did much of this config regularly deploys very large systems for Boeing, etc.
And they find; "In the 64bit technology space no company
What I like about it is the granularity. When you are responding to a message, you are in control until you go back to the queue for the next message, effectively doing a yield to other processes until you are given the next message. That way you don't have to worry about locks, and semaphores, and protecting "this data structure" while worrying if it is OK to not protect "that data structure." Of course you still have to worry about callbacks into your code changing your state and resources in an unexpected way, but if you don't make a function call that triggers a callback, you won't have any preemption, deadlock, or race conditions to worry about. And if you make such a function call, the callback takes place at that call instead of any old place like with preemption.
Even when preemptive multitasking is added, all of the setups I have seen (mainly Windows and Java Swing, but I believe this true of Linux window managers), the GUI is still single-threaded so you don't need resource-protection locks out the wazoo for all of the resources used by a GUI (window object, graphic-contect (GC) object, font object, etc). If you run multiple threads, you sync with the GUI thread through PostMessage() and SendMessage(), which apply the proper synchronization locks to the GUI message queue. Java has the exact same thing only GUI objects have InvokeLater() and InvokeNow() (or something like that) synchronization methods which work exactly like PostMessage() and SendMessage().
When I first experimented with threads under Windows, I noticed that the granularity of time slices was much chunkier than with a well-tuned cooperative multitasking approach. I could never get the thread priorities to do what I wanted. I got the best result when I used the preemptive multitasking in a cooperative manner -- I made sure that a thread did some state update quickly and then did a Sleep() or did a Wait() on a signal object -- this works just like cooperative multitasking where you work quickly in response to a message and then do a yield when you dip back into the message queue for the next message. The Windows preemption scheduler is just too coarse grained and too clunky and the only way to get good performance with threads is to treat them like coroutines which yield to one another at explicit synchronization points.
Given that even with preemptive multitasking I was depending on cooperation of tasks (getting a signal, doing something quickly, and then blocking that thread waiting to be signaled again), the one stumbling block on Windows is disk I/O. The only reason disk IO has gone away as a problem is the computer and their disks have gotten so fast that you don't notice Windows being a hog on disk I/O. Yeah, yeah, Windows has asynchronous file I/O, but how does that help you with the "hidden I/O" of page swaps?
I wouldn't even need preemptive multi-threading if Microsoft would have gotten just one thing right. If you write your own message loop, you can do idle-time processing to do animations and updates -- essentially writing your own scheduler for a state machine model of those animations and updates. The dang trouble is that if you pop up a message box or even if the user holds the mouse button down on a menu selection, your state machine grinds to a halt because Microsoft patches in substitute message loops for message boxes and menus, even though they scold you if you write a multi-message loop modal application.
To get around this, I have used an "idle time" thread that keeps feeding the GUI thread with PostMessage(WM_USER) to do the animations and other updates -- this allows any message loop, including the unoverridable ones in menus and message boxes to run the animations. This takes a bit of work to get right -- your idle time messages have to be made lower priority than window messages so you don't gum up the
I think that this article is full of mistakes that are done by purpose (i dont know, maybe!!) or are due to the misunderstanding of those guys about many computing ideas and principles. I really think that such articles that claim to be informative should not be allowed to be on internet as it is simply saying wrong things. My big concern about their tests is that they are not fair and they never tend yo be fair to the apple side and osx. For example i believe that everyone who pretend to make precise testing should realize that if they got results that differ so much and are so unexplained, well the best thing is to try different testing methods and tools. So tools may work well for a given platform, others may not work well. So any tempt to highlight any os design flaw should be done after testing many different benchmarking tools. They don't do that, instead they try to find some reasons that are completely meaningless in the sense that they are saying things that are technically wrong. Trying to find such whatever threading problems in osx in order to hurt the platform is not really fair...... So to begin with, let me comment on the Apache results. Well they use Apachebench to test osx, and they get rather low request per second with osx. Well ok, but why don't they try something else to test Apache performance, in that case they could figure out that the problem is either the os or the benchmarking tool (they recognize themself that apple did tell them that thre is a bug in ApacheServer, while running it on osx, maybe? i did not test it). Try to run WebBench on osx and linux ppc or x86, and have a look to the results. Well WebBench is a largely accepted benchmarking tool for test Apache performance, so it make sense to use it too. pcmag.com have tested a Xserve G5, http://www.pcmag.com/article2/0,1895,1630329,00.as p, and their result show something like almost 8000 request per second for 60 clients for a static configuration test. Ohhhh!!!! What's going on here? What we have here is something completely different, a completely different image compared to their results. What does this tell us? Well two different bench tools can produce very different outputs. But moreover everything that follows in their article simply collapse because nothing tell us that the tools that they use for MySQL testing are not having a problem too. Moreover WebBench involve as weel many threads creation, so their theory about this threading problem of osx collpase too. We simply dont get any global image of osx performance in server applications with their limited set of bench tools. Did they never think that the problem of those results could come from the benchmarking tools or the app itself that may have performance problems while running on osx. Here is the comment of pcmag.com "Performance-wise, the dual-processor Xserve G5 compares well with Linux-based x86 servers. This is not surprising, considering that Mac OS 10.x is based on FreeBSD UNIX. Using the included Apache server, we ran the Xserve G5 through our standard WebBench tests. It did quite well on the static WebBench test, outperforming a competitor's dual processor x86-64 server running Apache server on SuSe Linux-64." Something rather different to their general statement, isn't it? So now about MySQL. So first they mention fsync(). Let me correct. What are they talking about is wrong?, fsync() behaves the same as it does on all unixes: it writes the data from the host to the drive. However this is not good enough because drives will buffer the data and potentially write it in a different order than the app did. To deal with this, MacOS X provides an fcntl() called F_FULLFSYNC which does what fsync does and in addition asks the drive to flush all buffered data to disk. This is the only way for an app to be able to make any guarantees about things like transactions which is why InnoDB in MySQL uses it! And i think that because its an os feature it works whenever you use MyISAM o
The reason Apple went with Intel was simple. Intel could provide a complete chipset solution, not just a CPU. Intel has the production capacity to supply 1:1 a complete sboard+chip for every order placed. AMD just makes CPUs, and usually not enough to meet demand. Besides, just because the Dev units are P4s, do you really think that the chip for the MacIntels is just going to be an off-the-shelf x86?
Check out my foes list to see who is so retarded that they can't use the signature line!!!
> And I can't wait to move over a bunch of older intel's to mac os X. ;)_
Sorry, but it has been already in the tech news that Apple will have a special DRM chip in the Intel system. The x86 OSX simply won't install/work on your older machines.
But did you expect anything else? Apple hardly would shoot their hardware business in the head like that...
But there are no portable machines with the G5 processor.
There are also no portable machines with the e600 processor, the new G4-cored chips coming from Freescale. Why not? Because they're only just getting to the sampling stage.
These chips should be to the G5 what the Pentium M is to the P4: a small short-pipeline core that gets more work done per clock cycle, tied to a high bandwidth bus. Intel finally caught on that it's not so muc about CPU speed any more as it is about I/O bandwidth... and went from a 133 Mhz FSB to a 533 MHz FSB and the resulting chip made the P4 look poorly. Freescale's going from 166 MHz to two 768 MHz memory busses and separate PCI-X ports on-chip... which should give any P-M a run for its money even at 3/4 of the CPU clock speed.