mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
app/vmstorage/transport: reduce memory allocations on data ingestion path
This commit is contained in:
parent
19906dc30e
commit
0f7ece84f3
1 changed files with 1 additions and 1 deletions
|
@ -395,7 +395,7 @@ type unmarshalWork struct {
|
|||
}
|
||||
|
||||
func (uw *unmarshalWork) reset() {
|
||||
if (len(uw.mrs)*4 > cap(uw.mrs) || len(uw.reqBuf)*4 > cap(uw.reqBuf)) && fasttime.UnixTimestamp()-uw.lastResetTime > 10 {
|
||||
if len(uw.reqBuf)*4 < cap(uw.reqBuf) && fasttime.UnixTimestamp()-uw.lastResetTime > 10 {
|
||||
// Periodically reset mrs and reqBuf in order to prevent from gradual memory usage growth
|
||||
// when ceratin entries in mr contain too long labels.
|
||||
// See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/490 for details.
|
||||
|
|
Loading…
Reference in a new issue