Re: mac osx vs linux for high throughput network servers
Re: mac osx vs linux for high throughput network servers
- Subject: Re: mac osx vs linux for high throughput network servers
- From: Alastair Houghton <email@hidden>
- Date: Fri, 26 Nov 2010 15:05:30 +0000
On 26 Nov 2010, at 14:16, Matevž Markovič wrote:
> You can find some info on this web page: http://www.anandtech.com/show/1702/8 (no more mysteries, G5 vs X86).
> They tend to show that Linux has faster thread design. As far as I am concerned, the way OS X handels (Mach) threads is sufficient fast for about everything but the "be-the-most-responsive-web-server".
That article is pretty poor, actually, and it doesn't show anything about the thread design since it doesn't actually test the threading system. Instead, it tests process creation (fork()-ing). On Linux, last I looked, threads were really just processes that shared address space with their parent, but on Mac OS X that is very much not the case; processes are implemented on top of Mach tasks, and have a set of Mach threads associated with them.
It is also comparing G5 PowerPC Mac OS X with Linux on x86, which is just plain ridiculous. It doesn't make sense to compare except on the same hardware (and yes, Linux will run on a G5).
Further, other things can make a huge difference; for example, I have previously had networking code run faster on a 667MHz G4 PowerBook under Mac OS X than it did on a 4GHz Pentium 4 PC running Linux. This seems surprising---I think the cause was the fact that the PowerBook had its Ethernet hardware integrated with the logic chipset, whereas the P4 machine had to send everything over PCI to its Ethernet card, and I was using small packets (deliberately).
You may well find, too, that which is faster depends on whether or not the server software in question has the relevant optimisations for the platform you're testing (e.g. kqueue on Mac OS X and epoll on Linux).
Kind regards,
Alastair.
--
http://alastairs-place.net
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden