Tighten BDP increase conditions, better fix target transport window sizing

pull/10720/head
Craig Tiller 8 years ago
parent 42ab2b1753
commit 81f92c855d
  1. 7
      src/core/ext/transport/chttp2/transport/writing.c
  2. 2
      src/core/lib/transport/bdp_estimator.c

@ -164,11 +164,8 @@ uint32_t grpc_chttp2_target_incoming_window(grpc_chttp2_transport *t) {
return (uint32_t)GPR_MIN(
(int64_t)((1u << 31) - 1),
t->stream_total_over_incoming_window +
(int64_t)GPR_MAX(
t->settings[GRPC_SENT_SETTINGS]
[GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE] -
t->stream_total_under_incoming_window,
0));
t->settings[GRPC_SENT_SETTINGS]
[GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]);
}
bool grpc_chttp2_begin_write(grpc_exec_ctx *exec_ctx,

@ -100,7 +100,7 @@ void grpc_bdp_estimator_complete_ping(grpc_bdp_estimator *estimator) {
bw / 125000.0, estimator->bw_est / 125000.0);
}
GPR_ASSERT(estimator->ping_state == GRPC_BDP_PING_STARTED);
if (estimator->accumulator > 2 * estimator->estimate / 3 &&
if (estimator->accumulator > 7 * estimator->estimate / 8 &&
bw > estimator->bw_est) {
estimator->estimate *= 2;
estimator->bw_est = bw;

Loading…
Cancel
Save