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: Andrew Gallatin <email@hidden>
- Date: Fri, 26 Nov 2010 15:56:45 -0500
Joel Reymont wrote:
On Nov 27, 2010, at 12:26 AM, Andrew Gallatin wrote:
The last time I measured it, Linux blows MacOSX out of the water for UDP latency, which is what really matters for HFT (like by a factor of 2 or more).
Bingo! But is this simply a matter of improving the Darwin network stack?
Having done ethernet drivers for a lot of platforms (MacOSX, Linux,
FreeBSD, Solaris, ESX, etc), my impression is that the linux
kernel is just generally "tighter" than anything else. Eg, they've
got tons of micro optimizations where they ensure data structures
are aligned to cacheline boundaries, etc. I don't think anybody
else has the manpower to do as good. They also don't even try to
maintain source compatibility from release to release, much less
a stable driver ABI. This gives them lots of freedom to optimize
things.
There's lots of stuff that linux has that OSX doesn't in terms
of networking. AFAIK, the IOKit "workloop" based interrupt
handling paradigm precludes using MSI-X & multiple receive queues,
there is no DCA API for hiding cache misses, etc. I haven't looked
at Lion yet (and if I had, I'd be under NDA and wouldn't be able
to say..). I'm sure the whole mbuf kpi abstraction isn't doing
them any favors either.
I think you could probably spend a couple of man years "just" improving
the network stack, and still only get close to linux.
Drew
_______________________________________________
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