Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autosize timer list shards #11888

Merged
merged 5 commits into from
Nov 10, 2017
Merged

Autosize timer list shards #11888

merged 5 commits into from
Nov 10, 2017

Conversation

ctiller
Copy link
Member

@ctiller ctiller commented Jul 20, 2017

Built on #11866

@grpc grpc deleted a comment from grpc-kokoro Oct 12, 2017
@ctiller ctiller requested a review from sreecha November 1, 2017 22:24
@grpc-testing
Copy link

****************************************************************

libgrpc.so

     VM SIZE                                                                                            FILE SIZE
 ++++++++++++++ GROWING                                                                              ++++++++++++++
  +3.9%    +160 src/core/lib/iomgr/timer_generic.cc                                                     +160  +3.9%
       +55%    +139 grpc_timer_list_init                                                                    +139   +55%
       +22%     +50 grpc_timer_list_shutdown                                                                 +50   +22%
      +1.0%     +13 run_some_expired_timers(grpc_exec_ctx*, long, long*, grpc_error*) [clone .part.2]        +13  +1.0%

 -------------- SHRINKING                                                                            --------------
  -1.0% -5.73Ki [None]                                                                                  -816  -0.0%
     -63.7% -5.49Ki g_shards                                                                                   0  [ = ]
      -0.0%      -8 [Unmapped]                                                                              -816  -0.0%
     -96.9%    -248 g_shard_queue                                                                              0  [ = ]

  -0.5% -5.57Ki TOTAL                                                                                   -656  -0.0%


****************************************************************

libgrpc++.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]



@grpc-testing
Copy link

[trickle] No significant performance differences

@grpc-testing
Copy link

Corrupt JSON data (indicates timeout or crash): 
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_InProcessCHTTP2_NoOpMutator_NoOpMutator__32768_2_0.opt.new: 3
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_InProcessCHTTP2_NoOpMutator_NoOpMutator__8_2_0.opt.old: 4
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_MinInProcessCHTTP2_NoOpMutator_NoOpMutator__4096_2_0.opt.old: 2
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_MinInProcessCHTTP2_NoOpMutator_NoOpMutator__0_2_0.opt.old: 1
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_InProcessCHTTP2_NoOpMutator_NoOpMutator__32768_2_0.counters.old: 1
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_MinInProcessCHTTP2_NoOpMutator_NoOpMutator__64_2_0.opt.old: 1
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_MinInProcessCHTTP2_NoOpMutator_NoOpMutator__32768_2_0.opt.new: 2
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_MinInProcessCHTTP2_NoOpMutator_NoOpMutator__512_2_0.counters.new: 2
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_InProcessCHTTP2_NoOpMutator_NoOpMutator__512_2_0.counters.new: 3
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_MinInProcessCHTTP2_NoOpMutator_NoOpMutator__32768_2_0.counters.old: 1
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_InProcessCHTTP2_NoOpMutator_NoOpMutator__64_2_0.counters.new: 2
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_MinInProcessCHTTP2_NoOpMutator_NoOpMutator__1_2_0.counters.new: 2
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_MinInProcessCHTTP2_NoOpMutator_NoOpMutator__64_2_0.counters.old: 3
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_InProcessCHTTP2_NoOpMutator_NoOpMutator__32768_2_0.counters.new: 1
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_InProcessCHTTP2_NoOpMutator_NoOpMutator__4096_2_0.counters.old: 1
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_InProcessCHTTP2_NoOpMutator_NoOpMutator__8_2_0.counters.old: 4
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_MinInProcessCHTTP2_NoOpMutator_NoOpMutator__1_2_0.opt.old: 3
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_MinInProcessCHTTP2_NoOpMutator_NoOpMutator__8_2_0.counters.old: 3
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_MinInProcessCHTTP2_NoOpMutator_NoOpMutator__512_2_0.opt.old: 3
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_InProcessCHTTP2_NoOpMutator_NoOpMutator__512_2_0.opt.old: 3
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_InProcessCHTTP2_NoOpMutator_NoOpMutator__1_2_0.opt.new: 3
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_InProcessCHTTP2_NoOpMutator_NoOpMutator__0_2_0.counters.old: 2
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_InProcessCHTTP2_NoOpMutator_NoOpMutator__64_2_0.opt.new: 3
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_MinInProcessCHTTP2_NoOpMutator_NoOpMutator__8_2_0.opt.old: 3
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_MinInProcessCHTTP2_NoOpMutator_NoOpMutator__1_2_0.counters.old: 3
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_InProcessCHTTP2_NoOpMutator_NoOpMutator__4096_2_0.opt.old: 4
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_MinInProcessCHTTP2_NoOpMutator_NoOpMutator__0_2_0.counters.new: 2
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_MinInProcessCHTTP2_NoOpMutator_NoOpMutator__512_2_0.opt.new: 1
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_MinInProcessCHTTP2_NoOpMutator_NoOpMutator__8_2_0.counters.new: 2
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_MinInProcessCHTTP2_NoOpMutator_NoOpMutator__64_2_0.opt.new: 2
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_MinInProcessCHTTP2_NoOpMutator_NoOpMutator__512_2_0.counters.old: 2
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_InProcessCHTTP2_NoOpMutator_NoOpMutator__2097152_2_0.opt.new: 1
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_InProcessCHTTP2_NoOpMutator_NoOpMutator__512_2_0.opt.new: 1
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_InProcessCHTTP2_NoOpMutator_NoOpMutator__8_2_0.counters.new: 2
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_InProcessCHTTP2_NoOpMutator_NoOpMutator__1_2_0.opt.old: 2
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_InProcessCHTTP2_NoOpMutator_NoOpMutator__4096_2_0.counters.new: 2
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_InProcessCHTTP2_NoOpMutator_NoOpMutator__1_2_0.counters.new: 4
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_InProcessCHTTP2_NoOpMutator_NoOpMutator__0_2_0.opt.new: 1
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_InProcessCHTTP2_NoOpMutator_NoOpMutator__64_2_0.counters.old: 2
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_MinInProcessCHTTP2_NoOpMutator_NoOpMutator__4096_2_0.counters.new: 4
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_InProcessCHTTP2_NoOpMutator_NoOpMutator__0_2_0.opt.old: 1
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_InProcessCHTTP2_NoOpMutator_NoOpMutator__64_2_0.opt.old: 1
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_InProcessCHTTP2_NoOpMutator_NoOpMutator__1_2_0.counters.old: 1
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_MinInProcessCHTTP2_NoOpMutator_NoOpMutator__4096_2_0.opt.new: 4
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_MinInProcessCHTTP2_NoOpMutator_NoOpMutator__8_2_0.opt.new: 2
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_InProcessCHTTP2_NoOpMutator_NoOpMutator__512_2_0.counters.old: 2
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_MinInProcessCHTTP2_NoOpMutator_NoOpMutator__0_2_0.counters.old: 3


[microbenchmarks] Performance differences noted:
Benchmark                                                                                          locks_per_iteration
-------------------------------------------------------------------------------------------------  ---------------------
BM_PumpStreamClientToServer<InProcess>/134217728                                                   -12%
BM_PumpStreamServerToClient<InProcess>/134217728                                                   -6%
BM_StreamingPingPong<InProcessCHTTP2, NoOpMutator, NoOpMutator>/134217728/2                        -9%
BM_StreamingPingPong<MinInProcessCHTTP2, NoOpMutator, NoOpMutator>/134217728/2                     -9%
BM_StreamingPingPongWithCoalescingApi<InProcessCHTTP2, NoOpMutator, NoOpMutator>/134217728/2/0     -11%
BM_StreamingPingPongWithCoalescingApi<InProcessCHTTP2, NoOpMutator, NoOpMutator>/134217728/2/1     -9%
BM_StreamingPingPongWithCoalescingApi<MinInProcessCHTTP2, NoOpMutator, NoOpMutator>/134217728/2/0  -11%
BM_StreamingPingPongWithCoalescingApi<MinInProcessCHTTP2, NoOpMutator, NoOpMutator>/134217728/2/1  -10%
BM_UnaryPingPong<InProcess, NoOpMutator, NoOpMutator>/0/134217728                                  -9%
BM_UnaryPingPong<InProcess, NoOpMutator, NoOpMutator>/134217728/134217728                          -28%
BM_UnaryPingPong<InProcessCHTTP2, NoOpMutator, NoOpMutator>/134217728/134217728                    -16%
BM_UnaryPingPong<MinInProcess, NoOpMutator, NoOpMutator>/0/134217728                               -7%
BM_UnaryPingPong<MinInProcess, NoOpMutator, NoOpMutator>/134217728/134217728                       -28%
BM_UnaryPingPong<MinInProcessCHTTP2, NoOpMutator, NoOpMutator>/0/134217728                         -5%
BM_UnaryPingPong<MinInProcessCHTTP2, NoOpMutator, NoOpMutator>/134217728/134217728                 -16%

@grpc-testing
Copy link

****************************************************************

libgrpc.so

     VM SIZE                                                                                            FILE SIZE
 ++++++++++++++ GROWING                                                                              ++++++++++++++
  +3.9%    +160 src/core/lib/iomgr/timer_generic.cc                                                     +160  +3.9%
       +55%    +139 grpc_timer_list_init                                                                    +139   +55%
       +22%     +50 grpc_timer_list_shutdown                                                                 +50   +22%
      +1.0%     +13 run_some_expired_timers(grpc_exec_ctx*, long, long*, grpc_error*) [clone .part.2]        +13  +1.0%

 -------------- SHRINKING                                                                            --------------
  -1.0% -5.73Ki [None]                                                                                  -824  -0.0%
     -63.7% -5.49Ki g_shards                                                                                   0  [ = ]
      -0.0%      -8 [Unmapped]                                                                              -824  -0.0%
     -96.9%    -248 g_shard_queue                                                                              0  [ = ]

  -0.5% -5.57Ki TOTAL                                                                                   -664  -0.0%


****************************************************************

libgrpc++.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]



@grpc-testing
Copy link

[trickle] No significant performance differences

@grpc-testing
Copy link

Corrupt JSON data (indicates timeout or crash): 
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPongWithCoalescingApi_InProcessCHTTP2_NoOpMutator_NoOpMutator__16777216_1_0.counters.old: 1


[microbenchmarks] Performance differences noted:
Benchmark                                                                                          locks_per_iteration
-------------------------------------------------------------------------------------------------  ---------------------
BM_PumpStreamClientToServer<InProcessCHTTP2>/134217728                                             -4%
BM_StreamingPingPong<InProcessCHTTP2, NoOpMutator, NoOpMutator>/134217728/2                        -7%
BM_StreamingPingPong<MinInProcessCHTTP2, NoOpMutator, NoOpMutator>/134217728/2                     -6%
BM_StreamingPingPongWithCoalescingApi<InProcess, NoOpMutator, NoOpMutator>/16777216/2/1            -4%
BM_StreamingPingPongWithCoalescingApi<InProcessCHTTP2, NoOpMutator, NoOpMutator>/134217728/2/0     -7%
BM_StreamingPingPongWithCoalescingApi<InProcessCHTTP2, NoOpMutator, NoOpMutator>/134217728/2/1     -9%
BM_StreamingPingPongWithCoalescingApi<MinInProcessCHTTP2, NoOpMutator, NoOpMutator>/134217728/2/0  -8%
BM_UnaryPingPong<InProcessCHTTP2, NoOpMutator, NoOpMutator>/134217728/134217728                    -8%
BM_UnaryPingPong<MinInProcess, NoOpMutator, NoOpMutator>/134217728/134217728                       -28%
BM_UnaryPingPong<MinInProcessCHTTP2, NoOpMutator, NoOpMutator>/134217728/134217728                 -5%

@ctiller ctiller merged commit 9ee455c into grpc:master Nov 10, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Jan 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants