Hello Alexey Serbin, Andrew Wong,
I'd like you to do a code review. Please visit
http://gerrit.cloudera.org:8080/14869
to review the following change.
Change subject: client: use dense_hash_set in Batcher
......................................................................
client: use dense_hash_set in Batcher
The Batcher implementation keeps an unordered set of in-flight
operations. The built-in unordered_map is not very fast. Google's
dense_hash_map is noticeably faster.
This sped up a client-reactor-bound benchmark by around 27%.
Before:
Generator report
time total : 37293.8 ms
time per row: 0.000466172 ms
Dropping auto-created table
'default.loadgen_auto_ece2f41beef94a9fa032c77899f7e61c'
Performance counter stats for './build/thinlto/bin/kudu perf loadgen
localhost -num_rows_per_thread=10000000 -num_threads=8':
189,125.49 msec task-clock # 5.060 CPUs utilized
29,363 context-switches # 0.155 K/sec
2,043 cpu-migrations # 0.011 K/sec
48,405 page-faults # 0.256 K/sec
772,496,448,279 cycles # 4.085 GHz
(83.33%)
129,999,474,226 stalled-cycles-frontend # 16.83% frontend cycles
idle (83.36%)
300,049,388,250 stalled-cycles-backend # 38.84% backend cycles
idle (83.30%)
414,415,517,571 instructions # 0.54 insn per cycle
# 0.72 stalled cycles
per insn (83.32%)
76,829,647,882 branches # 406.236 M/sec
(83.34%)
352,749,453 branch-misses # 0.46% of all branches
(83.35%)
37.376785122 seconds time elapsed
186.834651000 seconds user
2.143945000 seconds sys
After:
Generator report
time total : 29191.6 ms
time per row: 0.000364895 ms
Dropping auto-created table
'default.loadgen_auto_86e36746a9ce4bf19ef2beee143c09f7'
Performance counter stats for './build/thinlto/bin/kudu perf loadgen
localhost -num_rows_per_thread=10000000 -num_threads=8':
175,386.48 msec task-clock # 5.993 CPUs utilized
107,552 context-switches # 0.613 K/sec
3,056 cpu-migrations # 0.017 K/sec
49,802 page-faults # 0.284 K/sec
718,173,598,221 cycles # 4.095 GHz
(83.34%)
154,338,830,503 stalled-cycles-frontend # 21.49% frontend cycles
idle (83.35%)
162,605,327,354 stalled-cycles-backend # 22.64% backend cycles
idle (83.33%)
407,408,456,605 instructions # 0.57 insn per cycle
# 0.40 stalled cycles
per insn (83.33%)
76,468,794,077 branches # 436.002 M/sec
(83.31%)
462,854,805 branch-misses # 0.61% of all branches
(83.35%)
29.266327666 seconds time elapsed
171.921196000 seconds user
3.312785000 seconds sys
Change-Id: Ieb2d190b9445b49ed752c5991146477fd793099a
---
M src/kudu/client/batcher.cc
M src/kudu/client/batcher.h
2 files changed, 6 insertions(+), 4 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/69/14869/1
--
To view, visit http://gerrit.cloudera.org:8080/14869
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieb2d190b9445b49ed752c5991146477fd793099a
Gerrit-Change-Number: 14869
Gerrit-PatchSet: 1
Gerrit-Owner: Todd Lipcon <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>