Hello Alexey Serbin, Andrew Wong,

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

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

to review the following change.


Change subject: client: allocate InFlightOp from a Batcher Arena
......................................................................

client: allocate InFlightOp from a Batcher Arena

InFlightOps are always associated with a single Batcher, and Batchers
are always associated with a single "flush". Given that, we can allocate
them from a Batcher-local Arena instead of from the heap. This improves
CPU consumption and throughput of the client by about 10%.

Before:

INSERT report
    rows total: 40000000
    time total: 10302.3 ms
  time per row: 0.000257559 ms
Dropping auto-created table 
'default.loadgen_auto_0334edaa55fe4fdba242b0b4fcc5d360'

 Performance counter stats for './build/latest/bin/kudu perf loadgen localhost 
-num_rows_per_thread=5000000 -num_threads=8':

         100857.18 msec task-clock                #    9.738 CPUs utilized
            124584      context-switches          #    0.001 M/sec
              6047      cpu-migrations            #    0.060 K/sec
             31199      page-faults               #    0.309 K/sec
      412192743252      cycles                    #    4.087 GHz                
      (83.24%)
       95984615757      stalled-cycles-frontend   #   23.29% frontend cycles 
idle     (83.35%)
       80498019077      stalled-cycles-backend    #   19.53% backend cycles 
idle      (83.22%)
      225757843097      instructions              #    0.55  insn per cycle
                                                  #    0.43  stalled cycles per 
insn  (83.38%)
       43262879676      branches                  #  428.952 M/sec              
      (83.37%)
         276103070      branch-misses             #    0.64% of all branches    
      (83.43%)

      10.356736781 seconds time elapsed

      98.263563000 seconds user
       2.646264000 seconds sys

After:

INSERT report
    rows total: 40000000
    time total: 9730.09 ms
  time per row: 0.000243252 ms
Dropping auto-created table 
'default.loadgen_auto_ffc0ea72dd064db7b3fa12b037454eb2'

 Performance counter stats for './build/latest/bin/kudu.client-opt perf loadgen 
localhost -num_rows_per_thread=5000000 -num_threads=8':

          91317.10 msec task-clock                #    9.327 CPUs utilized
             57090      context-switches          #    0.625 K/sec
              6661      cpu-migrations            #    0.073 K/sec
             34568      page-faults               #    0.379 K/sec
      374170608484      cycles                    #    4.097 GHz                
      (83.31%)
       82165215635      stalled-cycles-frontend   #   21.96% frontend cycles 
idle     (83.35%)
       57601295335      stalled-cycles-backend    #   15.39% backend cycles 
idle      (83.25%)
      218776486065      instructions              #    0.58  insn per cycle
                                                  #    0.38  stalled cycles per 
insn  (83.35%)
       41762336591      branches                  #  457.333 M/sec              
      (83.34%)
         140528380      branch-misses             #    0.34% of all branches    
      (83.40%)

       9.790174460 seconds time elapsed

      89.079083000 seconds user
       2.276474000 seconds sys

Change-Id: I446a8d21253b7a274872bff6d3e76705ac95d0d5
---
M src/kudu/client/batcher.cc
M src/kudu/client/batcher.h
2 files changed, 10 insertions(+), 8 deletions(-)



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I446a8d21253b7a274872bff6d3e76705ac95d0d5
Gerrit-Change-Number: 16189
Gerrit-PatchSet: 1
Gerrit-Owner: Todd Lipcon <t...@apache.org>
Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <andrew.w...@cloudera.com>

Reply via email to