Todd Lipcon has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/2942 )

Change subject: rpc: cache call deadline in InboundCall
......................................................................

rpc: cache call deadline in InboundCall

The call deadline is used when queueing a call in the service queue.
Previously, we recomputed the deadline from a non-inlined function
every time it was needed, which hurt the performance of queueing.

To test, I set the number of worker threads to only 2 to ensure
that a lot of calls were hitting the queue itself instead of the
direct hand-off path. I ran this both before and after two times each,
alternatingly:

  rpc-bench --worker_threads=2 --client_threads=24 \
    --async_call_concurrency=100 --server_reactors=24 --run_seconds=2 \
    --gtest_filter=\*Calls --gtest_repeat=30 \

I then grepped out the 'Reqs/sec' and ran a t-test using R:

> t.test(d.before$V1, d.after$V1)

        Welch Two Sample t-test

data:  d.before$V1 and d.after$V1
t = -5.3229, df = 113.94, p-value = 5.182e-07
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
 -11997.452  -5489.415
sample estimates:
mean of x mean of y
 375830.2  384573.6

So, with 95% confidence this improves throughput by at least 1.5%.

Oddly, the user CPU, system CPU, and context switch rate didn't show any
statistically significant difference, but the throughput difference was
clear.

Change-Id: I72138b4dcee6db105bbf9499961c4c1e8c26bd3f
Reviewed-on: http://gerrit.cloudera.org:8080/2942
Reviewed-by: Adar Dembo <[email protected]>
Tested-by: Todd Lipcon <[email protected]>
---
M src/kudu/rpc/inbound_call.cc
M src/kudu/rpc/inbound_call.h
2 files changed, 15 insertions(+), 16 deletions(-)

Approvals:
  Adar Dembo: Looks good to me, approved
  Todd Lipcon: Verified

--
To view, visit http://gerrit.cloudera.org:8080/2942
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I72138b4dcee6db105bbf9499961c4c1e8c26bd3f
Gerrit-Change-Number: 2942
Gerrit-PatchSet: 6
Gerrit-Owner: Todd Lipcon <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Binglin Chang <[email protected]>
Gerrit-Reviewer: Henry Robinson <[email protected]>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <[email protected]>
Gerrit-Reviewer: Todd Lipcon <[email protected]>

Reply via email to