mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-02-09 15:27:11 +00:00
lib/storage: tune cache sizes according to production workload
This commit is contained in:
parent
8f973e34fb
commit
d0c830039d
1 changed files with 2 additions and 2 deletions
|
@ -175,9 +175,9 @@ func OpenStorage(path string, retentionMsecs int64, maxHourlySeries, maxDailySer
|
||||||
|
|
||||||
// Load caches.
|
// Load caches.
|
||||||
mem := memory.Allowed()
|
mem := memory.Allowed()
|
||||||
s.tsidCache = s.mustLoadCache("MetricName->TSID", "metricName_tsid", mem/3)
|
s.tsidCache = s.mustLoadCache("MetricName->TSID", "metricName_tsid", int(float64(mem)*0.35))
|
||||||
s.metricIDCache = s.mustLoadCache("MetricID->TSID", "metricID_tsid", mem/16)
|
s.metricIDCache = s.mustLoadCache("MetricID->TSID", "metricID_tsid", mem/16)
|
||||||
s.metricNameCache = s.mustLoadCache("MetricID->MetricName", "metricID_metricName", mem/8)
|
s.metricNameCache = s.mustLoadCache("MetricID->MetricName", "metricID_metricName", mem/10)
|
||||||
s.dateMetricIDCache = newDateMetricIDCache()
|
s.dateMetricIDCache = newDateMetricIDCache()
|
||||||
|
|
||||||
hour := fasttime.UnixHour()
|
hour := fasttime.UnixHour()
|
||||||
|
|
Loading…
Reference in a new issue