HTeaPot icon indicating copy to clipboard operation
HTeaPot copied to clipboard

Logging latency

Open Az107 opened this issue 9 months ago • 1 comments

Despite the log mechanism is run in a separate thread, many calls to it introduces latency to the overall server We must review the log mechanism to optimice it or in the worst of the case add a configuration to reduce the logs (for example if is a release build the debug or timed logs should not appear)

Az107 avatar Apr 12 '25 10:04 Az107

for reference

without loggs

Running 10s test @ http://localhost:8081
  6 threads and 100 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   719.18us  625.86us   8.13ms   76.99%
    Req/Sec    19.27k     2.23k   25.52k    73.67%
  1151682 requests in 10.02s, 2.64GB read
Requests/sec: 114971.69
Transfer/sec:    269.62MB

with logs

Running 10s test @ http://localhost:8081
  6 threads and 100 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     1.19ms    0.97ms  19.14ms   76.52%
    Req/Sec    13.19k     1.60k   17.56k    66.33%
  788576 requests in 10.02s, 1.83GB read
Requests/sec:  78739.36
Transfer/sec:    187.13MB

``

Az107 avatar Apr 12 '25 10:04 Az107