File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 5858 # # calculation of percentiles. Raising this limit increases the accuracy
5959 # # of percentiles but also increases the memory usage and cpu time.
6060 percentile_limit = 1000
61+
62+ # # Maximum socket buffer size in bytes, once the buffer fills up, metrics
63+ # # will start dropping. Defaults to the OS default.
64+ # read_buffer_size = 65535
6165```
6266
6367### Description
Original file line number Diff line number Diff line change @@ -76,6 +76,8 @@ type Statsd struct {
7676 // see https://github.com/influxdata/telegraf/pull/992
7777 UDPPacketSize int `toml:"udp_packet_size"`
7878
79+ ReadBufferSize int `toml:"read_buffer_size"`
80+
7981 sync.Mutex
8082 // Lock for preventing a data race during resource cleanup
8183 cleanup sync.Mutex
@@ -411,6 +413,10 @@ func (s *Statsd) udpListen() error {
411413 }
412414 log .Println ("I! Statsd UDP listener listening on: " , s .UDPlistener .LocalAddr ().String ())
413415
416+ if s .ReadBufferSize > 0 {
417+ s .UDPlistener .SetReadBuffer (s .ReadBufferSize )
418+ }
419+
414420 buf := make ([]byte , UDP_MAX_PACKET_SIZE )
415421 for {
416422 select {
You can’t perform that action at this time.
0 commit comments