envoyproxy/envoy

Possible optimization opportunity: set EVENT_BASE_FLAG_NOLOCK

Open

#5,703 创建于 2019年1月24日

在 GitHub 查看
 (9 评论) (0 反应) (0 负责人)C++ (5,373 fork)batch import
area/perfhelp wanted

仓库指标

Star
 (27,997 star)
PR 合并指标
 (平均合并 8天) (30 天内合并 378 个 PR)

描述

Possible optimization opportunity: set EVENT_BASE_FLAG_NOLOCK

Description: While looking for potential accuracy and throughput improvements for Nighthawk [1] (a load generator/benchmarking tool based on Envoy's libraries), observational data suggested that configuring libevent with EVENT_BASE_FLAG_NOLOCK would yield around 5% added troughput and about 1us lower reported latencies in the benchmarking client in max rps test runs.

Subsequently maxing out rps on an Envoy instance with the same patch applied [2] (which probably breaks a few things in its current form!) yields another improvement compared to a non-patched Envoy, which while not as pronounced as it was in Nighthawk, may still be worth exploring further, hence me filing this issue. If an audit of event usage would show this is low hanging fruit, incorporating a proper version of this patch may be little work and yield a quick win.

Links:

贡献者指南