Skip to content

Commit c2fd8dc

Browse files
committed
Add description for buffer size parameter
1 parent c4cc80b commit c2fd8dc

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

options.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,14 @@ type Options struct {
133133

134134
// ReadBufferSize is the size of the bufio.Reader buffer for each connection.
135135
// Larger buffers can improve performance for commands that return large responses.
136+
// Smaller buffers can improve memory usage for larger pools.
136137
//
137138
// default: 0.5MiB (524288 bytes)
138139
ReadBufferSize int
139140

140141
// WriteBufferSize is the size of the bufio.Writer buffer for each connection.
141142
// Larger buffers can improve performance for large pipelines and commands with many arguments.
143+
// Smaller buffers can improve memory usage for larger pools.
142144
//
143145
// default: 0.5MiB (524288 bytes)
144146
WriteBufferSize int

osscluster.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,14 @@ type ClusterOptions struct {
9494

9595
// ReadBufferSize is the size of the bufio.Reader buffer for each connection.
9696
// Larger buffers can improve performance for commands that return large responses.
97+
// Smaller buffers can improve memory usage for larger pools.
9798
//
9899
// default: 0.5MiB (524288 bytes)
99100
ReadBufferSize int
100101

101102
// WriteBufferSize is the size of the bufio.Writer buffer for each connection.
102103
// Larger buffers can improve performance for large pipelines and commands with many arguments.
104+
// Smaller buffers can improve memory usage for larger pools.
103105
//
104106
// default: 0.5MiB (524288 bytes)
105107
WriteBufferSize int

ring.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,14 @@ type RingOptions struct {
116116

117117
// ReadBufferSize is the size of the bufio.Reader buffer for each connection.
118118
// Larger buffers can improve performance for commands that return large responses.
119+
// Smaller buffers can improve memory usage for larger pools.
119120
//
120121
// default: 0.5MiB (524288 bytes)
121122
ReadBufferSize int
122123

123124
// WriteBufferSize is the size of the bufio.Writer buffer for each connection.
124125
// Larger buffers can improve performance for large pipelines and commands with many arguments.
126+
// Smaller buffers can improve memory usage for larger pools.
125127
//
126128
// default: 0.5MiB (524288 bytes)
127129
WriteBufferSize int

0 commit comments

Comments
 (0)