Open bjornleffler opened 3 years ago
This bottleneck was noticeable from the monitoring. As the server load (requests / second) increased, overall performance flat lined or even decreased.
When I switched libraries, the server performance improved. It could serve a much higher number of requests / second.
@bjornleffler which library did you switch to?
I'm now using https://github.com/jupp0r/prometheus-cpp
I used the Prometheus C client in a high performance network server application. Each server request increments a few prometheus counters (request count, bytes transferred, etc) and observes a few prometheus histograms (latency, request size, etc).
When I ran the cpu profiling from gperftools, I discovered that 24% of all cpu was spent inside the prom_map_get_index_internal function. See the attached screenshot for more details.
I've switched to another library, but wanted to let you know of my findings.