mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-23 20:37:12 +01:00
837d0d136d
Related issue: https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7182 - add a separate index cache for searches which might read through large amounts of random entries. Primary use-case for this is retention and downsampling filters, when applying filters background merge needs to fetch large amount of random entries which pollutes an index cache. Using different caches allows to reduce effect on memory usage and cache efficiency of the main cache while still having high cache hit rate. A separate cache size is 5% of allowed memory. - reduce size of indexdb/dataBlocks cache in order to free memory for new sparse cache. Reduced size by 5% and moved this to a separate cache. - add a separate metricName search which does not cache metric names - this is needed in order to allow disabling metric name caching when applying downsampling/retention filters. Applying filters during background merge accesses random entries, this fills up cache and does not provide an actual improvement due to random access nature. Merge performance and memory usage stats before and after the change: - before ![image](https://github.com/user-attachments/assets/485fffbb-c225-47ae-b5c5-bc8a7c57b36e) - after ![image](https://github.com/user-attachments/assets/f4ba3440-7c1c-4ec1-bc54-4d2ab431eef5) --------- Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com> |
||
---|---|---|
.. | ||
block_header.go | ||
block_stream_reader_test.go | ||
block_stream_reader.go | ||
block_stream_writer.go | ||
encoding_test.go | ||
encoding_timing_test.go | ||
encoding.go | ||
filenames.go | ||
inmemory_part.go | ||
merge_test.go | ||
merge.go | ||
metaindex_row.go | ||
part_header.go | ||
part_search_test.go | ||
part_search.go | ||
part.go | ||
table_search_test.go | ||
table_search_timing_test.go | ||
table_search.go | ||
table_test.go | ||
table.go |