From 29d9489ea9fa4b6249c3243bc122a65746c928ac Mon Sep 17 00:00:00 2001 From: Hope Casey-Allen Date: Wed, 19 Sep 2018 20:46:17 -0700 Subject: Increase initial arena size to be more representative of real workload scenario and increase frequency of recreating the arena to avoid oom --- test/cpp/microbenchmarks/bm_chttp2_hpack.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/cpp/microbenchmarks') 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 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); } -- cgit v1.2.3