Artem Fetishev 3f1b7a3a7f lib/storage: make lrucache ttl configurable
Previously, the `lrucache` ttl was hardcoded to 3 minutes and the code comment
said it was enough for most queries that are sent to vmstorage repeatedly. But
it appears that it is not always the case.

`indexDB` has this `tagFilters loop cache` that is used in index search
optimizations (see `getMetricIDsForDateAndFilters()`). Until recently, this
cache was implemented with `workingsetcache`. In
[10154](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/10154), this
implementation was changed to `lrucache`. After this change, some users reported
huge CPU utilization increase in vmstorage (see
[10297](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/10297)).

`workingsetcache` evicts an entry after two rotations that happen every 30
minutes. I.e. the entry ttl is 1h since the last time it was retrieved from the
cache. Hence the assumption that `lrucache` causes the CPU to raise because of
its too aggressive eviction policy.

Reverting back to `workingsetcache` helped but `lrucache` is still preferred
because it occupies less memory. Since `lrucache` is preferred, its ttl needs to
be increased. Instead changing the hardcoded value, the ttl was made
configurable.

The `tagFilters loops cache` was configured to have ttl of 1h to match the
default behavior of `workingsetcache`.

Although no one complained about this yet, the ttl was also increased for
`tfssCache` because previously it was also implemented with `workingsetcache`.

Finally, the `regexpCache` and `prefixesCache` were also configured to have 1h
ttl because these caches are also during the data retrieval.

Signed-off-by: Artem Fetishev <rtm@victoriametrics.com>
2026-02-09 12:01:24 +01:00
2026-01-19 15:29:25 +01:00
2025-06-11 13:54:16 +02:00
2022-08-31 02:27:24 +03:00
2025-06-30 17:01:05 +02:00
2025-07-15 14:27:15 +03:00
2024-08-29 10:35:36 +02:00

VictoriaMetrics

Latest Release Docker Pulls Go Report Build Status codecov License Slack X Reddit

VictoriaMetrics logo

VictoriaMetrics is a fast, cost-saving, and scalable solution for monitoring and managing time series data. It delivers high performance and reliability, making it an ideal choice for businesses of all sizes.

Here are some resources and information about VictoriaMetrics:

Yes, we open-source both the single-node VictoriaMetrics and the cluster version.

Prominent features

VictoriaMetrics is optimized for timeseries data, even when old time series are constantly replaced by new ones at a high rate, it offers a lot of features:

Enterprise version

In addition, the Enterprise version includes extra features:

  • Anomaly detection: Automation and simplification of your alerting rules, covering complex anomalies found in metrics data.
  • Backup automation: Automates regular backup procedures.
  • Multiple retentions: Reducing storage costs by specifying different retentions for different datasets.
  • Downsampling: Reducing storage costs and increasing performance for queries over historical data.
  • Stable releases with long-term support lines (LTS).
  • Comprehensive support: First-class consulting, feature requests and technical support provided by the core VictoriaMetrics dev team.
  • Many other features, which you can read about on the Enterprise page.

Contact us if you need enterprise support for VictoriaMetrics. Or you can request a free trial license here, downloaded Enterprise binaries are available at Github Releases.

We strictly apply security measures in everything we do. VictoriaMetrics has achieved security certifications for Database Software Development and Software-Based Monitoring Services. See Security page for more details.

Benchmarks

Some good benchmarks VictoriaMetrics achieved:

Community and contributions

Feel free asking any questions regarding VictoriaMetrics:

If you like VictoriaMetrics and want to contribute, then please read these docs.

The provided ZIP file contains three folders with different logo orientations. Each folder includes the following file types:

  • JPEG: Preview files
  • PNG: Preview files with transparent background
  • AI: Adobe Illustrator files

VictoriaMetrics Logo Usage Guidelines

Font

  • Font Used: Lato Black
  • Download here: Lato Font

Color Palette

Logo Usage Rules

  • Only use the Lato Black font as specified.
  • Maintain sufficient clear space around the logo for visibility.
  • Do not modify the spacing, alignment, or positioning of design elements.
  • You may resize the logo as needed, but ensure all proportions remain intact.

Thank you for your cooperation!

Languages
Go 87.2%
TypeScript 9.5%
SCSS 1.6%
Makefile 0.9%
Shell 0.5%