babylon

Use async logger

示例构成

性能演示

单线程低频

AMD EPYC 7W83 64-Core Processor latency cpu
spdlog [1419,1516,2070,5969] 0.105
brpc [1437,1555,2071,6130] 0.124
babylon [982,1002,1428,4017] 0.065

单线程吞吐

AMD EPYC 7W83 64-Core Processor max qps latency cpu
spdlog 2.07M [458,597,1074,1327] 1.99
brpc 0.53M [349,363,435,1614] 1.21
babylon 1.58M [560,575,892,1401] 1.07

spdlog和brpc都将全部或部分header格式化拆解到了异步线程执行,『单线程』极限吞吐场景可以通过分拆负载到消费线程提升综合吞吐,其中

多线程低频

AMD EPYC 7W83 64-Core Processor latency cpu
spdlog [1944,2290,4380,9876] 0.732
brpc [1706,1941,3582,7986] 0.818
babylon [1718,1791,2075,8011] 0.538

多线程吞吐

AMD EPYC 7W83 64-Core Processor max qps latency cpu
spdlog 1.41M [958,1206,4481,9771] 1.92
spdlog* 0.41M [23405,36043,111814,469699] 2.63
brpc 0.56M [311,329,436,820] 1.16
brpc* 0.67M [15066,21831,44584,71316] 5.56
babylon 5.58M [1225,1268,1508,8881] 7.28

* 生产端最大速率运行 spdlog和brpc都将全部或部分header格式化拆解到了异步线程执行,『多线程』极限吞吐相应受限