Alexey Serbin has uploaded a new patch set (#5) 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 some RPC tests fail because of assertions: F0523 00:54:13.663707 9868 messenger.cc:428] Check failed: closing_ Should have already shut down F0523 00:54:13.664211 9869 connection.cc:247] Check failed: outbound_transfers_.begin() == outbound_transfers_.end() 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/reactor.cc M src/kudu/rpc/reactor.h 6 files changed, 173 insertions(+), 280 deletions(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/05/5905/5 -- 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: 5 Gerrit-Owner: Todd Lipcon <t...@apache.org> Gerrit-Reviewer: David Ribeiro Alves <davidral...@gmail.com> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Michael Ho <michael...@gmail.com> Gerrit-Reviewer: Sailesh Mukil <sail...@apache.org> Gerrit-Reviewer: Tidy Bot (241) Gerrit-Reviewer: Todd Lipcon <t...@apache.org>