You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kudu.apache.org by "Todd Lipcon (Code Review)" <ge...@cloudera.org> on 2016/05/03 20:56:37 UTC

[kudu-CR] rpc: cache call deadline in InboundCall

Hello Binglin Chang, Henry Robinson, Mike Percy,

I'd like you to do a code review.  Please visit

    http://gerrit.cloudera.org:8080/2942

to review the following change.

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:

before:
  Mode:            Sync
  Client threads:   24
  Worker threads:   2
  Server reactors:  24
  ----------------------------------
  Reqs/sec:         381311
  User CPU per req: 26.5224us
  Sys CPU per req:  31.6455us
  Ctx Sw. per req:  4.6317
  s)

  Mode:            Async
  Client reactors:  24
  Call concurrency: 100
  Worker threads:   2
  Server reactors:  24
  ----------------------------------
  Reqs/sec:         359538
  User CPU per req: 21.5274us
  Sys CPU per req:  24.1651us
  Ctx Sw. per req:  2.33781

after:
  Mode:            Sync
  Client threads:   24
  Worker threads:   2
  Server reactors:  24
  ----------------------------------
  Reqs/sec:         392932
  User CPU per req: 25.6824us
  Sys CPU per req:  31.0559us
  Ctx Sw. per req:  4.41511
  s)

  Mode:            Async
  Client reactors:  24
  Call concurrency: 100
  Worker threads:   2
  Server reactors:  24
  ----------------------------------
  Reqs/sec:         405450
  User CPU per req: 19.1213us
  Sys CPU per req:  21.93us
  Ctx Sw. per req:  1.9041

Change-Id: I72138b4dcee6db105bbf9499961c4c1e8c26bd3f
---
M src/kudu/rpc/inbound_call.cc
M src/kudu/rpc/inbound_call.h
2 files changed, 14 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/42/2942/1
-- 
To view, visit http://gerrit.cloudera.org:8080/2942
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I72138b4dcee6db105bbf9499961c4c1e8c26bd3f
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Binglin Chang <de...@gmail.com>
Gerrit-Reviewer: Henry Robinson <he...@cloudera.com>
Gerrit-Reviewer: Mike Percy <mp...@apache.org>