← All Use Cases
Central Composite Design

Container Resource Limits

Central Composite design optimizing CPU/memory requests and limits for utilization and stability

Summary

This experiment investigates container resource limits. Central Composite design optimizing CPU/memory requests and limits for utilization and stability.

The design varies 3 factors: cpu request m (millicores), ranging from 100 to 1000, cpu limit m (millicores), ranging from 500 to 2000, and memory request mb (MB), ranging from 128 to 1024. The goal is to optimize 2 responses: utilization pct (%) (maximize) and oom kills per day (count) (minimize). Fixed conditions held constant across all runs include memory limit mb = 2048, qos class = burstable.

A Central Composite Design (CCD) was selected to fit a full quadratic response surface model, including curvature and interaction effects. With 3 factors this produces 22 runs including center points and axial (star) points that extend beyond the factorial range.

Quadratic response surface models were fitted to capture potential curvature and factor interactions. The RSM contour plots below visualize how pairs of factors jointly affect each response.

Key Findings

For utilization pct, the most influential factors were cpu limit m (39.9%), memory request mb (30.1%), cpu request m (29.9%). The best observed value was 84.7 (at cpu request m = 550, cpu limit m = 1250, memory request mb = 576).

For oom kills per day, the most influential factors were cpu request m (45.1%), cpu limit m (28.4%), memory request mb (26.5%). The best observed value was 2.5 (at cpu request m = 550, cpu limit m = 1250, memory request mb = 576).

Recommended Next Steps

Experimental Setup

Factors

FactorLowHighUnit
cpu_request_m1001000millicores
cpu_limit_m5002000millicores
memory_request_mb1281024MB

Fixed: memory_limit_mb = 2048, qos_class = burstable

Responses

ResponseDirectionUnit
utilization_pct↑ maximize%
oom_kills_per_day↓ minimizecount

Configuration

use_cases/34_container_resource_limits/config.json
{ "metadata": { "name": "Container Resource Limits", "description": "Central Composite design optimizing CPU/memory requests and limits for utilization and stability" }, "factors": [ { "name": "cpu_request_m", "levels": [ "100", "1000" ], "type": "continuous", "unit": "millicores" }, { "name": "cpu_limit_m", "levels": [ "500", "2000" ], "type": "continuous", "unit": "millicores" }, { "name": "memory_request_mb", "levels": [ "128", "1024" ], "type": "continuous", "unit": "MB" } ], "fixed_factors": { "memory_limit_mb": "2048", "qos_class": "burstable" }, "responses": [ { "name": "utilization_pct", "optimize": "maximize", "unit": "%" }, { "name": "oom_kills_per_day", "optimize": "minimize", "unit": "count" } ], "settings": { "operation": "central_composite", "test_script": "use_cases/34_container_resource_limits/sim.sh" } }

Experimental Matrix

The Central Composite Design produces 22 runs. Each row is one experiment with specific factor settings.

Runcpu_request_mcpu_limit_mmemory_request_mb
15501250576
210005001024
31002000128
45502619.31576
55501250576
6-271.5841250576
75501250-241.932
85501250576
910002000128
101371.581250576
115501250576
12550-119.306576
135501250576
141005001024
155501250576
161000500128
1755012501393.93
18100020001024
195501250576
20100500128
2110020001024
225501250576

Step-by-Step Workflow

1

Preview the design

Terminal
$ doe info --config use_cases/34_container_resource_limits/config.json
2

Generate the runner script

Terminal
$ doe generate --config use_cases/34_container_resource_limits/config.json \ --output use_cases/34_container_resource_limits/results/run.sh --seed 42
3

Execute the experiments

Terminal
$ bash use_cases/34_container_resource_limits/results/run.sh
4

Analyze results

Terminal
$ doe analyze --config use_cases/34_container_resource_limits/config.json
5

Get optimization recommendations

Terminal
$ doe optimize --config use_cases/34_container_resource_limits/config.json
6

Multi-objective optimization

With 2 competing responses, use --multi to find the best compromise via Derringer–Suich desirability.

Terminal
$ doe optimize --config use_cases/34_container_resource_limits/config.json --multi
7

Generate the HTML report

Terminal
$ doe report --config use_cases/34_container_resource_limits/config.json \ --output use_cases/34_container_resource_limits/results/report.html

Features Exercised

FeatureValue
Design typecentral_composite
Factor typescontinuous (all 3)
Arg styledouble-dash
Responses2 (utilization_pct ↑, oom_kills_per_day ↓)
Total runs22

Analysis Results

Generated from actual experiment runs using the DOE Helper Tool.

Response: utilization_pct

Top factors: cpu_limit_m (39.9%), memory_request_mb (30.1%), cpu_request_m (29.9%).

ANOVA

SourceDFSSMSFp-value
SourceDFSSMSFp-value
cpu_request_m43161.3336790.333461.6700.0000
cpu_limit_m42163.5436540.885942.2050.0000
memory_request_mb42076.3677519.091940.5050.0000
LackofFit20.00000.0000
PureError789.7088
Error90.000012.8155
Total216793.3277323.4918

Pareto Chart

Pareto chart for utilization_pct

Main Effects Plot

Main effects plot for utilization_pct

Normal Probability Plot of Effects

Normal probability plot for utilization_pct

Half-Normal Plot of Effects

Half-normal plot for utilization_pct

Model Diagnostics

Model diagnostics for utilization_pct

Response: oom_kills_per_day

Top factors: cpu_request_m (45.1%), cpu_limit_m (28.4%), memory_request_mb (26.5%).

ANOVA

SourceDFSSMSFp-value
SourceDFSSMSFp-value
cpu_request_m4130.140932.53526.0090.0123
cpu_limit_m452.144213.03612.4080.1259
memory_request_mb448.280912.07022.2290.1462
LackofFit266.726133.3630
PureError737.8987
Error9104.62485.4141
Total21335.190915.9615

Pareto Chart

Pareto chart for oom_kills_per_day

Main Effects Plot

Main effects plot for oom_kills_per_day

Normal Probability Plot of Effects

Normal probability plot for oom_kills_per_day

Half-Normal Plot of Effects

Half-normal plot for oom_kills_per_day

Model Diagnostics

Model diagnostics for oom_kills_per_day

Response Surface Plots

3D surfaces fitted with quadratic RSM. Red dots are observed data points.

oom kills per day cpu limit m vs memory request mb

RSM surface: oom kills per day cpu limit m vs memory request mb

oom kills per day cpu request m vs cpu limit m

RSM surface: oom kills per day cpu request m vs cpu limit m

oom kills per day cpu request m vs memory request mb

RSM surface: oom kills per day cpu request m vs memory request mb

utilization pct cpu limit m vs memory request mb

RSM surface: utilization pct cpu limit m vs memory request mb

utilization pct cpu request m vs cpu limit m

RSM surface: utilization pct cpu request m vs cpu limit m

utilization pct cpu request m vs memory request mb

RSM surface: utilization pct cpu request m vs memory request mb

Multi-Objective Optimization

When responses compete, Derringer–Suich desirability finds the best compromise. Each response is scaled to a 0–1 desirability, then combined via a weighted geometric mean.

Overall Desirability
D = 0.9545

Per-Response Desirability

ResponseWeightDesirabilityPredictedDir
utilization_pct 1.5
0.9545
84.70 0.9545 84.70 %
oom_kills_per_day 1.0
0.9545
2.50 0.9545 2.50 count

Recommended Settings

FactorValue
cpu_request_m1000 millicores
cpu_limit_m2000 millicores
memory_request_mb1024 MB

Source: from observed run #17

Trade-off Summary

Sacrifice = how much worse than single-objective best.

ResponsePredictedBest ObservedSacrifice
oom_kills_per_day2.502.50+0.00

Top 3 Runs by Desirability

RunDFactor Settings
#20.9072cpu_request_m=-271.584, cpu_limit_m=1250, memory_request_mb=576
#180.8788cpu_request_m=1371.58, cpu_limit_m=1250, memory_request_mb=576

Model Quality

ResponseType
oom_kills_per_day0.0935linear

Full Multi-Objective Output

doe optimize --multi
============================================================ MULTI-OBJECTIVE OPTIMIZATION Method: Derringer-Suich Desirability Function ============================================================ Overall desirability: D = 0.9545 Response Weight Desirability Predicted Direction --------------------------------------------------------------------- utilization_pct 1.5 0.9545 84.70 % ↑ oom_kills_per_day 1.0 0.9545 2.50 count ↓ Recommended settings: cpu_request_m = 1000 millicores cpu_limit_m = 2000 millicores memory_request_mb = 1024 MB (from observed run #17) Trade-off summary: utilization_pct: 84.70 (best observed: 84.70, sacrifice: +0.00) oom_kills_per_day: 2.50 (best observed: 2.50, sacrifice: +0.00) Model quality: utilization_pct: R² = 0.4125 (quadratic) oom_kills_per_day: R² = 0.0935 (linear) Top 3 observed runs by overall desirability: 1. Run #17 (D=0.9545): cpu_request_m=1000, cpu_limit_m=2000, memory_request_mb=1024 2. Run #2 (D=0.9072): cpu_request_m=-271.584, cpu_limit_m=1250, memory_request_mb=576 3. Run #18 (D=0.8788): cpu_request_m=1371.58, cpu_limit_m=1250, memory_request_mb=576

Full Analysis Output

doe analyze
=== Main Effects: utilization_pct === Factor Effect Std Error % Contribution -------------------------------------------------------------- cpu_limit_m 41.4500 3.8346 39.9% memory_request_mb 31.3000 3.8346 30.1% cpu_request_m 31.0750 3.8346 29.9% === ANOVA Table: utilization_pct === Source DF SS MS F p-value ----------------------------------------------------------------------------- cpu_request_m 4 3161.3336 790.3334 61.670 0.0000 cpu_limit_m 4 2163.5436 540.8859 42.205 0.0000 memory_request_mb 4 2076.3677 519.0919 40.505 0.0000 Lack of Fit 2 0.0000 0.0000 0.000 1.0000 Pure Error 7 89.7088 12.8155 Error 9 0.0000 12.8155 Total 21 6793.3277 323.4918 === Summary Statistics: utilization_pct === cpu_request_m: Level N Mean Std Min Max ------------------------------------------------------------ -271.584 1 65.7000 0.0000 65.7000 65.7000 100 4 63.2000 16.0813 47.2000 84.3000 1000 4 34.6250 21.0616 15.7000 63.2000 1371.58 1 45.9000 0.0000 45.9000 45.9000 550 12 65.4667 11.7760 35.6000 84.7000 cpu_limit_m: Level N Mean Std Min Max ------------------------------------------------------------ -119.306 1 78.5000 0.0000 78.5000 78.5000 1250 12 61.1667 10.2098 35.6000 71.5000 2000 4 43.2500 18.3814 22.4000 66.2000 2619.31 1 84.7000 0.0000 84.7000 84.7000 500 4 54.5750 28.6909 15.7000 84.3000 memory_request_mb: Level N Mean Std Min Max ------------------------------------------------------------ -241.932 1 35.6000 0.0000 35.6000 35.6000 1024 4 46.9750 17.6375 22.4000 63.2000 128 4 50.8500 30.4213 15.7000 84.3000 1393.93 1 66.9000 0.0000 66.9000 66.9000 576 12 66.2250 9.5696 45.9000 84.7000 === Main Effects: oom_kills_per_day === Factor Effect Std Error % Contribution -------------------------------------------------------------- cpu_request_m 10.2250 0.8518 45.1% cpu_limit_m 6.4500 0.8518 28.4% memory_request_mb 6.0000 0.8518 26.5% === ANOVA Table: oom_kills_per_day === Source DF SS MS F p-value ----------------------------------------------------------------------------- cpu_request_m 4 130.1409 32.5352 6.009 0.0123 cpu_limit_m 4 52.1442 13.0361 2.408 0.1259 memory_request_mb 4 48.2809 12.0702 2.229 0.1462 Lack of Fit 2 66.7261 33.3630 6.162 0.0286 Pure Error 7 37.8987 5.4141 Error 9 104.6248 5.4141 Total 21 335.1909 15.9615 === Summary Statistics: oom_kills_per_day === cpu_request_m: Level N Mean Std Min Max ------------------------------------------------------------ -271.584 1 10.1000 0.0000 10.1000 10.1000 100 4 7.6750 4.2602 4.1000 12.9000 1000 4 9.6000 4.7735 4.9000 14.9000 1371.58 1 16.1000 0.0000 16.1000 16.1000 550 12 5.8750 2.7343 2.5000 11.0000 cpu_limit_m: Level N Mean Std Min Max ------------------------------------------------------------ -119.306 1 3.5000 0.0000 3.5000 3.5000 1250 12 7.5583 3.7369 4.2000 16.1000 2000 4 8.9500 4.3000 4.3000 12.9000 2619.31 1 2.5000 0.0000 2.5000 2.5000 500 4 8.3250 4.9655 4.1000 14.9000 memory_request_mb: Level N Mean Std Min Max ------------------------------------------------------------ -241.932 1 5.0000 0.0000 5.0000 5.0000 1024 4 9.8750 3.6518 4.9000 12.9000 128 4 7.4000 5.0977 4.1000 14.9000 1393.93 1 11.0000 0.0000 11.0000 11.0000 576 12 6.7250 3.9190 2.5000 16.1000

Optimization Recommendations

doe optimize
=== Optimization: utilization_pct === Direction: maximize Best observed run: #17 cpu_request_m = 550 cpu_limit_m = 1250 memory_request_mb = 576 Value: 84.7 RSM Model (linear, R² = 0.2621, Adj R² = 0.1391): Coefficients: intercept +58.5682 cpu_request_m +4.7827 cpu_limit_m +9.7689 memory_request_mb +1.7553 RSM Model (quadratic, R² = 0.5502, Adj R² = 0.2129): Coefficients: intercept +63.2997 cpu_request_m +4.7827 cpu_limit_m +9.7690 memory_request_mb +1.7553 cpu_request_m*cpu_limit_m -10.2750 cpu_request_m*memory_request_mb -7.3750 cpu_limit_m*memory_request_mb -5.0500 cpu_request_m^2 -1.5908 cpu_limit_m^2 -4.7108 memory_request_mb^2 -0.7958 Curvature analysis: cpu_limit_m coef=-4.7108 concave (has a maximum) cpu_request_m coef=-1.5908 concave (has a maximum) memory_request_mb coef=-0.7958 concave (has a maximum) Notable interactions: cpu_request_m*cpu_limit_m coef=-10.2750 (antagonistic) cpu_request_m*memory_request_mb coef=-7.3750 (antagonistic) cpu_limit_m*memory_request_mb coef=-5.0500 (antagonistic) Predicted optimum (from quadratic model, at observed points): cpu_request_m = 100 cpu_limit_m = 2000 memory_request_mb = 1024 Predicted value: 75.5440 Surface optimum (via L-BFGS-B, quadratic model): cpu_request_m = 100 cpu_limit_m = 2000 memory_request_mb = 1024 Predicted value: 75.5440 Model quality: Moderate fit — use predictions directionally, not precisely. Factor importance: 1. cpu_limit_m (effect: 52.0, contribution: 50.2%) 2. cpu_request_m (effect: 29.0, contribution: 28.0%) 3. memory_request_mb (effect: 22.6, contribution: 21.8%) === Optimization: oom_kills_per_day === Direction: minimize Best observed run: #17 cpu_request_m = 550 cpu_limit_m = 1250 memory_request_mb = 576 Value: 2.5 RSM Model (linear, R² = 0.1199, Adj R² = -0.0267): Coefficients: intercept +7.5364 cpu_request_m -0.1399 cpu_limit_m -0.9218 memory_request_mb +1.3681 RSM Model (quadratic, R² = 0.4887, Adj R² = 0.1053): Coefficients: intercept +6.5811 cpu_request_m -0.1399 cpu_limit_m -0.9218 memory_request_mb +1.3681 cpu_request_m*cpu_limit_m +1.1750 cpu_request_m*memory_request_mb +2.1000 cpu_limit_m*memory_request_mb +0.7500 cpu_request_m^2 -0.8124 cpu_limit_m^2 +1.4826 memory_request_mb^2 +0.7626 Curvature analysis: cpu_limit_m coef=+1.4826 convex (has a minimum) cpu_request_m coef=-0.8124 concave (has a maximum) memory_request_mb coef=+0.7626 convex (has a minimum) Notable interactions: cpu_request_m*memory_request_mb coef=+2.1000 (synergistic) cpu_request_m*cpu_limit_m coef=+1.1750 (synergistic) cpu_limit_m*memory_request_mb coef=+0.7500 (synergistic) Predicted optimum (from quadratic model, at observed points): cpu_request_m = 550 cpu_limit_m = -119.306 memory_request_mb = 576 Predicted value: 13.2063 Surface optimum (via L-BFGS-B, quadratic model): cpu_request_m = 1000 cpu_limit_m = 1375.67 memory_request_mb = 128 Predicted value: 2.8817 Model quality: Weak fit — consider adding center points or using a different design. Factor importance: 1. memory_request_mb (effect: 11.1, contribution: 46.1%) 2. cpu_limit_m (effect: 8.9, contribution: 36.9%) 3. cpu_request_m (effect: 4.1, contribution: 17.0%)
← Previous: API Rate Limiter Tuning All Use Cases →