And one more from last night that got dropped:

---------- Forwarded message ----------
From: Amanda Walker <[EMAIL PROTECTED]>
Date: Wed, Nov 5, 2008 at 10:42 PM
Subject: Re: [chromium-dev] Re: OS X IPC Design doc
To: [email protected]


On Wed, Nov 5, 2008 at 10:32 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]>wrote:

>
> Based on my implementation of Gears IPC on MacOSX, I found out that
> the perf of FIFO implementation is not as good as the one using Mach
> port, especially for big message. For example,  Gears IPC unitest
> takes around 60 seconds to finish in a Tiger machine, compared with
> around 10 seconds by using Mach port. One reason for this slowdown is
> that the PIPE_BUF (the size to guarantee the atomic write and read) is
> 512 on OSX, which is far less than the one in Linux.


There are some other factors as well, but this matches fairly well with my
past experience, in which using a pipe was roughly an order of magnitude
slower than using mach messages for a simple request/response transaction
between tasks (this was several years ago (circa 2005), but as I recall, on
a Power Mac G5 I was seeing about 250us round trip time for mach messages
and about 2.5ms for pipes.  On the same hardware running a PowerPC linux
distro, pipes were around 300us round trip time.  I'm sure Leopard is better
than Tiger was, and current Intel machines are certainly better at context
switches and memory bandwidth than PowerPCs were, but this is part of the
bias I brought with me to the question :-).  In general POSIX APIs for IPC
and threading are much slower on the Mac than they are on an equivalent
Linux box.


> However, after talking with Greg and other people, I ended up with
> using FIFO instead of Mach port because:
> 1) Mach port is not a recommended or officially supported OSX API.


The Mach message API is officially supported and documented.  MIG is not,
which makes Mach RPC a bit questionable, but Mach ports and messages are not
in any way discouraged by Apple.


> I am not sure about the perf requirement for Chrome. If we really care
>
about perf, probably Mach port, or Cocoa Distributed Object. It is
> said that Cocoa DO is a very nice high-level API that can give you
> very efficient two-way IPC.


DO is a layer up, and is only usable from Objective-C.  Most of the code
that we're looking at right now for browser/renderer communication is C++.

--Amanda




-- 
--Amanda

"To invent, you need a good imagination and a pile of junk." --Thomas Edison

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Chromium-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/chromium-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to