mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
Revert "app/vmselect: add -search.estimatedSeriesCountAfterAggregation
command-line flag for tuning the probability of OOMs or false-positive not enough memory
errors"
This reverts commit fbb7986dd2380fce2fc8633b7eda8b67f419e74c. Reason for revert: this commit has been removed from single-node version
This commit is contained in:
parent
d54a93fc81
commit
f341c6fcc4
1 changed files with 5 additions and 7 deletions
|
@ -18,10 +18,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
maxPointsPerTimeseries = flag.Int("search.maxPointsPerTimeseries", 30e3, "The maximum points per a single timeseries returned from the search")
|
maxPointsPerTimeseries = flag.Int("search.maxPointsPerTimeseries", 30e3, "The maximum points per a single timeseries returned from the search")
|
||||||
estimatedSeriesCountAfterAggregation = flag.Int("search.estimatedSeriesCountAfterAggregation", 1000, "Estimated number of series returned by aggregation with grouping "+
|
|
||||||
"such as `sum(...) by (...)`. Increase this value in order to reduce the probability of OOMs. Reduce this value in order to reduce 'not enough memory' errors "+
|
|
||||||
"for queries containing aggregation with grouping")
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// The minimum number of points per timeseries for enabling time rounding.
|
// The minimum number of points per timeseries for enabling time rounding.
|
||||||
|
@ -682,7 +679,8 @@ func evalRollupFuncWithMetricExpr(ec *EvalConfig, name string, rf rollupFunc,
|
||||||
if iafc.ae.Modifier.Op != "" {
|
if iafc.ae.Modifier.Op != "" {
|
||||||
// Increase the number of timeseries for non-empty group list: `aggr() by (something)`,
|
// Increase the number of timeseries for non-empty group list: `aggr() by (something)`,
|
||||||
// since each group can have own set of time series in memory.
|
// since each group can have own set of time series in memory.
|
||||||
timeseriesLen *= *estimatedSeriesCountAfterAggregation
|
// Estimate the number of such groups is lower than 1000 :)
|
||||||
|
timeseriesLen *= 1000
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rollupPoints := mulNoOverflow(pointsPerTimeseries, int64(timeseriesLen*len(rcs)))
|
rollupPoints := mulNoOverflow(pointsPerTimeseries, int64(timeseriesLen*len(rcs)))
|
||||||
|
@ -692,8 +690,8 @@ func evalRollupFuncWithMetricExpr(ec *EvalConfig, name string, rf rollupFunc,
|
||||||
rss.Cancel()
|
rss.Cancel()
|
||||||
return nil, fmt.Errorf("not enough memory for processing %d data points across %d time series with %d points in each time series; "+
|
return nil, fmt.Errorf("not enough memory for processing %d data points across %d time series with %d points in each time series; "+
|
||||||
"possible solutions are: reducing the number of matching time series; switching to node with more RAM; "+
|
"possible solutions are: reducing the number of matching time series; switching to node with more RAM; "+
|
||||||
"increasing -memory.allowedPercent; increasing `step` query arg (%gs); reducing -search.estimatedSeriesCountAfterAggregation",
|
"increasing -memory.allowedPercent; increasing `step` query arg (%gs)",
|
||||||
rollupPoints, timeseriesLen*len(rcs), pointsPerTimeseries, float64(ec.Step)/1e3)
|
rollupPoints, rssLen*len(rcs), pointsPerTimeseries, float64(ec.Step)/1e3)
|
||||||
}
|
}
|
||||||
defer rml.Put(uint64(rollupMemorySize))
|
defer rml.Put(uint64(rollupMemorySize))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue