Size input_cmsg_buf_ more conservatively
Categories
(Core :: IPC, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox80 | --- | fixed |
People
(Reporter: u608768, Assigned: u608768)
References
(Blocks 1 open bug)
Details
(Whiteboard: [overhead:92k] )
Attachments
(1 file, 1 obsolete file)
(deleted),
text/x-phabricator-request
|
Details |
From bug 1639922 comment #4:
49,152 bytes (34,656 requested / 14,496 slop)
Individual block sizes: 12,288 x 4
#01: IPC::Channel::Channel(int, IPC::Channel::Mode, IPC::Channel::Listener*) (/Users/andrewmccreight/mc/ipc/chromium/src/chrome/common/ipc_channel_posix.cc:927)This looks like
ChannelImpl
, which has an inline buffer for reads and another one for cmsg data.There's not much to be done about those (although moving them out of line might reduce the clownshoes lossage suggested by a 12k size and 2x4k buffers, and allow dynamically resizing them). It looks like the findings are mostly
ChannelImpl
allocations and thestd::
containers you already looked at.
Considering we only allow 250 descriptors per message, the current size of 4096 + 32 bytes is kind of excessive. It was chosen somewhat arbitrarily in bug 988251.
We might be able to reduce that 250 number as well. It was increased from 7 to 250 in that same bug.
Comment 2•4 years ago
|
||
Each content process seems to have about 11-12 channels each when idle (measured with the ipc-channels
tree in about:memory), each channel has two ends (in different processes), and this patch should move ChannelImpl
from the 12k bucket to the 8k bucket (assuming the table at the top of memory/build/mozjemalloc.cpp
is up-to-date). I've adjusted the overhead tag to account for all of that memory.
Updated•4 years ago
|
We'll never read more than MAX_DESCRIPTORS_PER_MESSAGE file descriptors in a
single message, so size the buffer based on that value.
Comment 5•4 years ago
|
||
bugherder |
Description
•