VictoriaMetrics/app/vmstorage
Aliaksandr Valialkin 6232eaa938
lib/bytesutil: split Resize() into ResizeNoCopy() and ResizeWithCopy() functions
Previously bytesutil.Resize() was copying the original byte slice contents to a newly allocated slice.
This wasted CPU cycles and memory bandwidth in some places, where the original slice contents wasn't needed
after slize resizing. Switch such places to bytesutil.ResizeNoCopy().

Rename the original bytesutil.Resize() function to bytesutil.ResizeWithCopy() for the sake of improved readability.

Additionally, allocate new slice with `make()` instead of `append()`. This guarantees that the capacity of the allocated slice
exactly matches the requested size. The `append()` could return a slice with bigger capacity as an optimization for further `append()` calls.
This could result in excess memory usage when the returned byte slice was cached (for instance, in lib/blockcache).

Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2007
2022-01-25 15:28:42 +02:00
..
deployment Rootless docker images by default (#358) 2020-03-27 21:18:32 +02:00
multiarch deployment/docker: embed tzdata into prod Go app instead of installing it into base docker image 2021-02-12 04:56:27 +02:00
transport lib/bytesutil: split Resize() into ResizeNoCopy() and ResizeWithCopy() functions 2022-01-25 15:28:42 +02:00
main.go lib/{mergeset,storage}: properly limit cache sizes for indexdb 2022-01-20 18:45:03 +02:00
Makefile Makefile: prepare arm64 and amd64 release archives for cluster version on make release command 2021-04-05 23:01:45 +03:00
README.md all: open-sourcing cluster version 2019-05-23 00:25:38 +03:00

vmstorage performs the following tasks:

  • Accepts inserts from vminsert nodes and stores them to local storage.

  • Performs select requests from vmselect nodes.