statsdaemon
statsdaemon copied to clipboard
Multithreaded UDP socket reading, reuseport for improved performance?
Currently reading from udp socket is slow (golang udp lib not very optimized) and can saturate a CPU core. Should look into multithreaded udp reading and also reuseport. See https://lwn.net/Articles/542629/
statsd-proxy has REUSE https://github.com/hit9/statsd-proxy i drop less metrics with statsd-proxy + 4x nodejs pids than with statsdaemon latest.
Here is some data on statsd-proxy vs going straight into statsdaemon. The droprate doubles once switching from statsd-proxy -> 4 classic statsd pids to statsdaemon.
10:30 is when cutover occurs for a short test.
https://github.com/golang/go/issues/23696 https://groups.google.com/forum/#!msg/golang-dev/HAEaU5TakTU/ZfMLVLqEBAAJ https://go-review.googlesource.com/c/go/+/72810
It looks like go 1.11 will make this possible soon.
Nice !
any plans to implement this feature?