@@ -1167,7 +1167,14 @@ void CUnivariateTimeSeriesModel::debugMemoryUsage(core::CMemoryUsage::TMemoryUsa
1167
1167
mem->setName (" CUnivariateTimeSeriesModel" );
1168
1168
core::CMemoryDebug::dynamicSize (" m_Controllers" , m_Controllers, mem);
1169
1169
core::CMemoryDebug::dynamicSize (" m_TrendModel" , m_TrendModel, mem);
1170
+ // We made various memory improvements in 6.4 partly in preparation for multi-bucket
1171
+ // analysis. This is not going to be available until 6.5; however, we will account for
1172
+ // its memory now. The memory usage is used, for example, to allocate jobs to nodes and
1173
+ // to decide if there is sufficient memory to create jobs. Operationally, we therefore
1174
+ // want to avoid unnecessary changes in model memory between versions. An extra residual
1175
+ // model is a good proxy for the amount of memory multi-bucket will consume.
1170
1176
core::CMemoryDebug::dynamicSize (" m_ResidualModel" , m_ResidualModel, mem);
1177
+ core::CMemoryDebug::dynamicSize (" m_ResidualModelPad" , m_ResidualModel, mem);
1171
1178
core::CMemoryDebug::dynamicSize (" m_AnomalyModel" , m_AnomalyModel, mem);
1172
1179
core::CMemoryDebug::dynamicSize (" m_ChangeDetector" , m_ChangeDetector, mem);
1173
1180
core::CMemoryDebug::dynamicSize (" m_SlidingWindow" , m_SlidingWindow, mem);
@@ -1176,7 +1183,8 @@ void CUnivariateTimeSeriesModel::debugMemoryUsage(core::CMemoryUsage::TMemoryUsa
1176
1183
std::size_t CUnivariateTimeSeriesModel::memoryUsage () const {
1177
1184
return core::CMemory::dynamicSize (m_Controllers) +
1178
1185
core::CMemory::dynamicSize (m_TrendModel) +
1179
- core::CMemory::dynamicSize (m_ResidualModel) +
1186
+ /* see above*/
1187
+ 2 * core::CMemory::dynamicSize (m_ResidualModel) +
1180
1188
core::CMemory::dynamicSize (m_AnomalyModel) +
1181
1189
core::CMemory::dynamicSize (m_ChangeDetector) +
1182
1190
core::CMemory::dynamicSize (m_SlidingWindow);
@@ -2440,15 +2448,23 @@ void CMultivariateTimeSeriesModel::debugMemoryUsage(core::CMemoryUsage::TMemoryU
2440
2448
mem->setName (" CUnivariateTimeSeriesModel" );
2441
2449
core::CMemoryDebug::dynamicSize (" m_Controllers" , m_Controllers, mem);
2442
2450
core::CMemoryDebug::dynamicSize (" m_TrendModel" , m_TrendModel, mem);
2451
+ // We made various memory improvements in 6.4 partly in preparation for multi-bucket
2452
+ // analysis. This is not going to be available until 6.5; however, we will account for
2453
+ // its memory now. The memory usage is used, for example, to allocate jobs to nodes and
2454
+ // to decide if there is sufficient memory to create jobs. Operationally, we therefore
2455
+ // want to avoid unnecessary changes in model memory between versions. An extra residual
2456
+ // model is a good proxy for the amount of memory multi-bucket will consume.
2443
2457
core::CMemoryDebug::dynamicSize (" m_ResidualModel" , m_ResidualModel, mem);
2458
+ core::CMemoryDebug::dynamicSize (" m_ResidualModelPad" , m_ResidualModel, mem);
2444
2459
core::CMemoryDebug::dynamicSize (" m_AnomalyModel" , m_AnomalyModel, mem);
2445
2460
core::CMemoryDebug::dynamicSize (" m_SlidingWindow" , m_SlidingWindow, mem);
2446
2461
}
2447
2462
2448
2463
std::size_t CMultivariateTimeSeriesModel::memoryUsage () const {
2449
2464
return core::CMemory::dynamicSize (m_Controllers) +
2450
2465
core::CMemory::dynamicSize (m_TrendModel) +
2451
- core::CMemory::dynamicSize (m_ResidualModel) +
2466
+ /* see above*/
2467
+ 2 * core::CMemory::dynamicSize (m_ResidualModel) +
2452
2468
core::CMemory::dynamicSize (m_AnomalyModel) +
2453
2469
core::CMemory::dynamicSize (m_SlidingWindow);
2454
2470
}
0 commit comments