New issue
Advanced search Search tips

Issue 902975 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

Speed: pipe buffer size on Windows is small and causes extra context switches

Project Member Reported by brucedaw...@chromium.org, Nov 8

Issue description

Chrome uses the default buffer size for its IPC pipes of 4 KB. Once message overhead is subtracted this means that additional context switches are needed for messages larger than about 3,900 bytes. The actual impact of this is unknown because the distribution of message sizes is unknown, but context switches are definitely expensive because of the kernel transitions and the cache pollution. There are a few investigative things worth doing in regards to this:

- Instrumenting mojo in order to find out typical message sizes to find out how big a problem this is
- Perhaps make mojo auto-adjust the buffer sizes so that the pipes which are used to carry larger messages are auto-expanded. The buffer sizes don't have to be big enough to accommodate the largest messages, but they should be big enough to reduce the number of excess context switches.

This was observed some years ago when doing performance testing with ipc_perftests, using ETW tracing or internal monitoring (see Chrome's task manager) to count context switches.

 
Cc: roc...@chromium.org
+ rockot

Sometimes I've seen us pass very large strings from renderer to browser [e.g. page URL can be 1MB+]. 
Cc: -roc...@chromium.org rockot@google.com
I had previously instrumented message sizes across the browser. I guess the local histogram got removed or never landed, I don't recall.

But the 90th percentile of message sizes was well under 3 kB.
Status: Available (was: Unconfirmed)
FYI brucedawson: Since you filed this and you're on the speed/power rotation, I'm considering this sufficiently triaged and am marking it as Available. Please triage further as you deem appropriate. Thanks.
Components: Internals>Mojo
Labels: Pri-2
Setting defect without priority to default.

Sign in to add a comment