File tree 1 file changed +24
-0
lines changed
1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -106,6 +106,30 @@ In very high throughput environments it is possible to improve performance by ch
106
106
- ` sysctl -w net.unix.max_dgram_qlen=X` - Set datagram queue size to X (default value is usually 10).
107
107
- ` sysctl -w net.core.wmem_max=X` - Set the max size of the send buffer for all the host sockets.
108
108
109
+ # ## Maximum packets size in high-throughput scenarios
110
+
111
+ In order to have the most efficient use of this library in high-throughput scenarios,
112
+ default values for the maximum packets size have already been set to have the best
113
+ usage of the underlying network.
114
+ However, if you perfectly know your network and you know that a different value for the maximum packets
115
+ size should be used, you can set it with the option `WithMaxBytesPerPayload`. Example :
116
+
117
+ ` ` ` go
118
+ package main
119
+
120
+ import (
121
+ "log"
122
+ "github.com/DataDog/datadog-go/statsd"
123
+ )
124
+
125
+ func main() {
126
+ statsd, err := statsd.New("127.0.0.1:8125", WithMaxBytesPerPayload(4096))
127
+ if err != nil {
128
+ log.Fatal(err)
129
+ }
130
+ }
131
+ ` ` `
132
+
109
133
# # Development
110
134
111
135
Run the tests with :
You can’t perform that action at this time.
0 commit comments