[ML] Increasing calculated model memory limit (#18723) (#18730)

* [ML] Increasing calculated model memory limit

* updating comment

* updating tests
This commit is contained in:
James Gowdy 2018-05-02 21:53:17 +01:00 committed by GitHub
parent 5e43110a2e
commit 5d37bf5619
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View file

@ -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) {

View file

@ -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) => {