mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
* [ML] Increasing calculated model memory limit * updating comment * updating tests
This commit is contained in:
parent
5e43110a2e
commit
5d37bf5619
2 changed files with 6 additions and 6 deletions
|
@ -75,11 +75,11 @@ export function calculateModelMemoryLimitProvider(callWithRequest) {
|
|||
let mmlKB = 0;
|
||||
if (i === 0) {
|
||||
// first in the list is the basic calculation.
|
||||
// a base of 10MB plus 32KB per series per detector
|
||||
// i.e. 10000KB + (32KB * cardinality of split field * number or detectors)
|
||||
// a base of 10MB plus 64KB per series per detector
|
||||
// i.e. 10000KB + (64KB * cardinality of split field * number or detectors)
|
||||
const cardinality = resp[splitFieldName];
|
||||
mmlKB = 10000;
|
||||
const SERIES_MULTIPLIER = 32;
|
||||
const SERIES_MULTIPLIER = 64;
|
||||
const numberOfFields = fieldNames.length;
|
||||
|
||||
if (cardinality !== undefined) {
|
||||
|
|
|
@ -25,7 +25,7 @@ describe('ML - validateModelMemoryLimit', () => {
|
|||
}
|
||||
},
|
||||
limits: {
|
||||
max_model_memory_limit: '20mb'
|
||||
max_model_memory_limit: '30mb'
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -111,7 +111,7 @@ describe('ML - validateModelMemoryLimit', () => {
|
|||
it('Called with no duration or split and mml above limit', () => {
|
||||
const job = getJobConfig();
|
||||
const duration = undefined;
|
||||
job.analysis_limits.model_memory_limit = '21mb';
|
||||
job.analysis_limits.model_memory_limit = '31mb';
|
||||
|
||||
return validateModelMemoryLimit(callWithRequest, job, duration).then(
|
||||
(messages) => {
|
||||
|
@ -139,7 +139,7 @@ describe('ML - validateModelMemoryLimit', () => {
|
|||
const dtrs = createDetectors(2);
|
||||
const job = getJobConfig(['instance'], dtrs);
|
||||
const duration = { start: 0, end: 1 };
|
||||
job.analysis_limits.model_memory_limit = '20mb';
|
||||
job.analysis_limits.model_memory_limit = '30mb';
|
||||
|
||||
return validateModelMemoryLimit(callWithRequest, job, duration).then(
|
||||
(messages) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue