diff options
author | Hope Casey-Allen <hcaseyal@google.com> | 2018-09-19 20:46:17 -0700 |
---|---|---|
committer | Hope Casey-Allen <hcaseyal@google.com> | 2018-09-19 20:46:17 -0700 |
commit | 29d9489ea9fa4b6249c3243bc122a65746c928ac (patch) | |
tree | bf0d368178e30d0a2d87efc11219d16116b6d875 /test/cpp/microbenchmarks | |
parent | 91727bd015c9fd0ac9076b191520504bc227f685 (diff) |
Increase initial arena size to be more representative of real workload scenario and increase frequency of recreating the arena to avoid oom
Diffstat (limited to 'test/cpp/microbenchmarks')
-rw-r--r-- | test/cpp/microbenchmarks/bm_chttp2_hpack.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/cpp/microbenchmarks/bm_chttp2_hpack.cc b/test/cpp/microbenchmarks/bm_chttp2_hpack.cc index f160e77634..741825cada 100644 --- a/test/cpp/microbenchmarks/bm_chttp2_hpack.cc +++ b/test/cpp/microbenchmarks/bm_chttp2_hpack.cc @@ -457,7 +457,7 @@ static void BM_HpackParserParseHeader(benchmark::State& state) { std::vector<grpc_slice> benchmark_slices = Fixture::GetBenchmarkSlices(); grpc_chttp2_hpack_parser p; grpc_chttp2_hpack_parser_init(&p); - const int kArenaSize = 4096; + const int kArenaSize = 4096 * 4096; gpr_arena* arena = gpr_arena_create(kArenaSize); p.on_header = OnHeader; p.on_header_user_data = arena; @@ -469,8 +469,8 @@ static void BM_HpackParserParseHeader(benchmark::State& state) { GPR_ASSERT(GRPC_ERROR_NONE == grpc_chttp2_hpack_parser_parse(&p, slice)); } grpc_core::ExecCtx::Get()->Flush(); - // recreate arena every 64k iterations to avoid oom - if (0 == (state.iterations() & 0xffff)) { + // Recreate arena every 4k iterations to avoid oom + if (0 == (state.iterations() & 0xfff)) { gpr_arena_destroy(arena); arena = gpr_arena_create(kArenaSize); } |