mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
c41a9b8d17
Before, buffer growth was always x2 of its size, which could lead to
excessive memory usage when processing big amount of data.
For example, scraping a target with hundreds of MBs in response could
result into hih memory spikes in vmagent because buffer has to double
its size to fit the response. See
https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6759
The change smoothes out the growth rate, trading higher allocation rate
for lower mem usage at certain conditions.
---------
Signed-off-by: hagen1778 <roman@victoriametrics.com>
(cherry picked from commit
|
||
---|---|---|
.. | ||
bytebuffer.go | ||
bytebuffer_test.go | ||
bytesutil.go | ||
bytesutil_test.go | ||
bytesutil_timing_test.go | ||
fast_string_matcher.go | ||
fast_string_matcher_test.go | ||
fast_string_matcher_timing_test.go | ||
fast_string_transformer.go | ||
fast_string_transformer_test.go | ||
fast_string_transformer_timing_test.go | ||
internstring.go | ||
internstring_test.go | ||
internstring_timing_test.go | ||
itoa.go | ||
itoa_test.go |