mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-23 12:31:07 +01:00
lib/bytesutil/internstring.go: increase the limit on the maximum string lengths, which can be interned
The limit has been increased from 300 bytes to 500 bytes according to the collected production stats. This allows reducing CPU usage without significant increase of RAM usage in most practical cases. Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3692
This commit is contained in:
parent
1cbdcd391c
commit
ac8bc77688
@ -9,7 +9,7 @@ import (
|
||||
"github.com/VictoriaMetrics/VictoriaMetrics/lib/fasttime"
|
||||
)
|
||||
|
||||
var internStringMaxLen = flag.Int("internStringMaxLen", 300, "The maximum length for strings to intern. Lower limit may save memory at the cost of higher CPU usage. "+
|
||||
var internStringMaxLen = flag.Int("internStringMaxLen", 500, "The maximum length for strings to intern. Lower limit may save memory at the cost of higher CPU usage. "+
|
||||
"See https://en.wikipedia.org/wiki/String_interning")
|
||||
|
||||
// InternBytes interns b as a string
|
||||
|
Loading…
Reference in New Issue
Block a user