influxdata / influxdb-csharp

A .NET library for efficiently sending points to InfluxDB 1.x

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Heavy lock contention in multithreaded environments

amoerie opened this issue · comments

We use this library in a heavily multithreaded environment, and noticed that in heavy loads, this library introduces very serious lock contention issues in the IntervalBatcher class, which locks around the internal queue when enqueuing or emitting.

This eventually leads to 100% CPU usage on our servers, each of them waiting for this Influx client to release its locks.