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] WIP: Bulk enqueueing of calls
Hello Binglin Chang, Henry Robinson, Mike Percy,
I'd like you to do a code review. Please visit
http://gerrit.cloudera.org:8080/2941
to review the following change.
Change subject: WIP: Bulk enqueueing of calls
......................................................................
WIP: Bulk enqueueing of calls
This changes the reactor thread to accumulate all of the new inbound calls in
each iteration of the event loop, and then only at the end of the loop enqueue
them in bulk to the backend service. The bulk enqueue allows for higher
throughput by reducing contention on the service queue lock: a single
lock acquisition can transfer several calls.
The improvement is more marked in the 'async' workload because this requires
the clients to be fast enough to push multiple calls to a single backend
reactor within a single event loop iteration.
WIP because it needs a lot of comments, cleanup, etc
Before:
Mode: Sync
Client threads: 24
Worker threads: 40
Server reactors: 24
----------------------------------
Reqs/sec: 388680
User CPU per req: 29.8484us
Sys CPU per req: 34.843us
Ctx Sw. per req: 5.2058
Mode: Async
Client reactors: 24
Call concurrency: 100
Worker threads: 40
Server reactors: 24
----------------------------------
Reqs/sec: 801922
User CPU per req: 20.018us
Sys CPU per req: 18.186us
Ctx Sw. per req: 0.756598
After:
Mode: Sync
Client threads: 24
Worker threads: 40
Server reactors: 24
----------------------------------
Reqs/sec: 384184
User CPU per req: 29.8106us
Sys CPU per req: 31.91us
Ctx Sw. per req: 4.8437
Mode: Async
Client reactors: 24
Call concurrency: 100
Worker threads: 40
Server reactors: 24
----------------------------------
Reqs/sec: 856798
User CPU per req: 22.4474us
Sys CPU per req: 19.2942us
Ctx Sw. per req: 0.736171
Change-Id: I11f25d516875a7f337a6761522355b32849b6c9d
---
M src/kudu/rpc/connection.cc
M src/kudu/rpc/messenger.cc
M src/kudu/rpc/messenger.h
M src/kudu/rpc/reactor.cc
M src/kudu/rpc/reactor.h
M src/kudu/rpc/rpc_service.h
M src/kudu/rpc/service_pool.cc
M src/kudu/rpc/service_pool.h
M src/kudu/rpc/service_queue.cc
M src/kudu/rpc/service_queue.h
10 files changed, 171 insertions(+), 46 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/41/2941/1
--
To view, visit http://gerrit.cloudera.org:8080/2941
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I11f25d516875a7f337a6761522355b32849b6c9d
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>