New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 776435 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Sep 19
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Consider using pipes instead of unix sockets for PlatformChannelPair.

Project Member Reported by erikc...@chromium.org, Oct 19 2017

Issue description

I switched OOP HP to not use PlatformChannelPair, and to use a manually created pipe() instead. This sped up performance by 4x on macOS.
Screen Shot 2017-10-19 at 11.09.20 AM.png
184 KB View Download
The only difference between memlog-all and memlog-all-socketpair is that I avoided using PlatformChannelPair and made a pipe() directly. This also causes some differences w.r.t. number of emitted trace events, but as discussed in:
https://groups.google.com/a/google.com/forum/#!search/chrome-benchmarking/chrome-desktop-memory/UAVNrpO9pw0/QLYq3J3LBAAJ

The main cause of slowness is performance of write().

Comment 3 by roc...@chromium.org, Oct 19 2017

Main issue here is that afaik pipes don't support file descriptor transfer.
And introducing a separate pipe for data-only messages substantially
increases the complexity of the system.

A third option which might be tolerable would be to use a pipe for all
messages, and a separate domain socket for any fds, synchronizing only when
fds are expected for received message. I don't really have time to explore
that at the moment though.
Cc: roc...@chromium.org reillyg@chromium.org
Owner: ----
Status: Available (was: Assigned)
I ran the same test on Linux. socketpair3 is misnamed - that's the test with a pipe(). socketpair4 uses a socketpair(). Here we see that the performance gains are much more modest. So I would only expect this to have a large impact on macOS.
Screen Shot 2017-10-19 at 12.19.56 PM.png
741 KB View Download
Components: Internals>Mojo
Status: WontFix (was: Available)
Just doing some bug cleanup. This is not a feasible request because pipes don't support transfer of file descriptors.

Also if the only performance gain would be on Mac, it's probably moot. I would expect better performance improvements on Mac by building a dedicated Channel implementation directly on mach_msg.

Sign in to add a comment