Alexey Serbin has uploaded a new patch set (#6) to the change originally
created by Todd Lipcon. ( http://gerrit.cloudera.org:8080/5905 )
Change subject: WIP: KUDU-1865 (part 1): reduce some cross-thread allocations
......................................................................
WIP: KUDU-1865 (part 1): reduce some cross-thread allocations
Per the analysis in the JIRA, each RPC caused two "cross-thread"
allocations of ReactorTasks (one in the client, one in the server).
These cross-thread allocations harm tcmalloc caching.
ReactorTasks don't actually need to be heap-allocated -- that was only
an easy mechanism to use a normal-looking "interface" paradigm. Instead,
if we use a struct with some std::functions in it, and std::move() it
to/from the pending tasks container, we avoid the heap allocation. More
importantly, we avoid the worst kind of heap allocation which is
allocated on one thread and freed on another.
I verified that this removed the cross-thread allocation traffic
using tcmalloc tracing and the script posted to the JIRA.
WIP:
* need to clarify why TabletServerTest.TestStatus test fails
with SIGSEGV
*** SIGSEGV (@0x271e838) received by PID 676 (TID 0x7f15f5e4a8c0) from PID
41019448; stack trace: ***
@ 0x7f15efaba330 (unknown) at ??:0
@ 0x271e838 (unknown) at ??:0
@ 0x7f15edc445b7
_ZZN4kudu3rpc10Connection20QueueResponseForCallESt10unique_ptrINS0_11InboundCallESt14default_deleteIS3_EEENKUlRKNS_6StatusEE0_clES9_
at ??:0
@ 0x7f15edc4898b
_ZNSt17_Function_handlerIFvRKN4kudu6StatusEEZNS0_3rpc10Connection20QueueResponseForCallESt10unique_ptrINS5_11InboundCallESt14default_deleteIS8_EEEUlS3_E0_E9_M_invokeERKSt9_Any_dataS3_
at ??:0
@ 0x7f15f350a607 std::function<>::operator()() at ??:0
@ 0x7f15edc7d429 kudu::rpc::Reactor::Shutdown() at ??:0
@ 0x7f15edc5e3cb kudu::rpc::Messenger::ShutdownInternal() at ??:0
@ 0x7f15edc5e07d kudu::rpc::Messenger::Shutdown() at ??:0
Change-Id: I7d4d5f14fb302196b1797c712b21cfce81f157c1
---
M src/kudu/rpc/connection.cc
M src/kudu/rpc/connection.h
M src/kudu/rpc/messenger.cc
M src/kudu/rpc/messenger.h
M src/kudu/rpc/negotiation.cc
M src/kudu/rpc/reactor.cc
M src/kudu/rpc/reactor.h
7 files changed, 179 insertions(+), 284 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/05/5905/6
--
To view, visit http://gerrit.cloudera.org:8080/5905
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I7d4d5f14fb302196b1797c712b21cfce81f157c1
Gerrit-Change-Number: 5905
Gerrit-PatchSet: 6
Gerrit-Owner: Todd Lipcon <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>
Gerrit-Reviewer: David Ribeiro Alves <[email protected]>
Gerrit-Reviewer: Grant Henke <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Michael Ho <[email protected]>
Gerrit-Reviewer: Sailesh Mukil <[email protected]>
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Todd Lipcon <[email protected]>