|
1 |
| -# ASSUMPTIONS: |
2 |
| -# - Underlying cluster should have 100+ nodes. |
3 |
| -# - Number of nodes should be divisible by NODES_PER_NAMESPACE (default 100). |
4 |
| - |
5 |
| -#Constants |
6 |
| -{{$DENSITY_RESOURCE_CONSTRAINTS_FILE := DefaultParam .DENSITY_RESOURCE_CONSTRAINTS_FILE ""}} |
7 |
| -{{$NODE_MODE := DefaultParam .NODE_MODE "allnodes"}} |
8 |
| -{{$NODES_PER_NAMESPACE := DefaultParam .NODES_PER_NAMESPACE 100}} |
9 |
| -{{$PODS_PER_NODE := DefaultParam .PODS_PER_NODE 30}} |
10 |
| -{{$DENSITY_TEST_THROUGHPUT := DefaultParam .DENSITY_TEST_THROUGHPUT 20}} |
11 |
| -{{$SCHEDULER_THROUGHPUT_THRESHOLD := DefaultParam .CL2_SCHEDULER_THROUGHPUT_THRESHOLD 0}} |
12 |
| -# LATENCY_POD_MEMORY and LATENCY_POD_CPU are calculated for 1-core 4GB node. |
13 |
| -# Increasing allocation of both memory and cpu by 10% |
14 |
| -# decreases the value of priority function in scheduler by one point. |
15 |
| -# This results in decreased probability of choosing the same node again. |
16 |
| -{{$LATENCY_POD_CPU := DefaultParam .LATENCY_POD_CPU 100}} |
17 |
| -{{$LATENCY_POD_MEMORY := DefaultParam .LATENCY_POD_MEMORY 350}} |
18 |
| -{{$MIN_LATENCY_PODS := 500}} |
19 |
| -{{$MIN_SATURATION_PODS_TIMEOUT := 180}} |
20 |
| -{{$ENABLE_CHAOSMONKEY := DefaultParam .ENABLE_CHAOSMONKEY false}} |
21 |
| -{{$ENABLE_PROMETHEUS_API_RESPONSIVENESS := DefaultParam .ENABLE_PROMETHEUS_API_RESPONSIVENESS false}} |
22 |
| -{{$ENABLE_SYSTEM_POD_METRICS:= DefaultParam .ENABLE_SYSTEM_POD_METRICS true}} |
23 |
| -{{$USE_SIMPLE_LATENCY_QUERY := DefaultParam .USE_SIMPLE_LATENCY_QUERY false}} |
24 |
| -{{$ENABLE_RESTART_COUNT_CHECK := DefaultParam .ENABLE_RESTART_COUNT_CHECK false}} |
25 |
| -{{$RESTART_COUNT_THRESHOLD_OVERRIDES:= DefaultParam .RESTART_COUNT_THRESHOLD_OVERRIDES ""}} |
26 |
| -#Variables |
27 |
| -{{$namespaces := DivideInt .Nodes $NODES_PER_NAMESPACE}} |
28 |
| -{{$podsPerNamespace := MultiplyInt $PODS_PER_NODE $NODES_PER_NAMESPACE}} |
29 |
| -{{$totalPods := MultiplyInt $podsPerNamespace $namespaces}} |
30 |
| -{{$latencyReplicas := DivideInt (MaxInt $MIN_LATENCY_PODS .Nodes) $namespaces}} |
31 |
| -{{$totalLatencyPods := MultiplyInt $namespaces $latencyReplicas}} |
32 |
| -{{$saturationDeploymentTimeout := DivideFloat $totalPods $DENSITY_TEST_THROUGHPUT | AddInt $MIN_SATURATION_PODS_TIMEOUT}} |
33 |
| -# saturationDeploymentHardTimeout must be at least 20m to make sure that ~10m node |
34 |
| -# failure won't fail the test. See https://github.com/kubernetes/kubernetes/issues/73461#issuecomment-467338711 |
35 |
| -{{$saturationDeploymentHardTimeout := MaxInt $saturationDeploymentTimeout 1200}} |
36 |
| - |
| 1 | +# TODO(https://github.com/kubernetes/perf-tests/issues/1007): Get rid of this file |
37 | 2 | name: density
|
38 |
| -automanagedNamespaces: {{$namespaces}} |
39 |
| -tuningSets: |
40 |
| -- name: Uniform5qps |
41 |
| - qpsLoad: |
42 |
| - qps: 5 |
43 |
| -{{if $ENABLE_CHAOSMONKEY}} |
44 |
| -chaosMonkey: |
45 |
| - nodeFailure: |
46 |
| - failureRate: 0.01 |
47 |
| - interval: 1m |
48 |
| - jitterFactor: 10.0 |
49 |
| - simulatedDowntime: 10m |
50 |
| -{{end}} |
51 |
| -steps: |
52 |
| -- name: Starting measurements |
53 |
| - measurements: |
54 |
| - - Identifier: APIResponsivenessPrometheus |
55 |
| - Method: APIResponsivenessPrometheus |
56 |
| - Params: |
57 |
| - action: start |
58 |
| - - Identifier: APIResponsivenessPrometheusSimple |
59 |
| - Method: APIResponsivenessPrometheus |
60 |
| - Params: |
61 |
| - action: start |
62 |
| - # TODO(oxddr): figure out how many probers to run in function of cluster |
63 |
| - - Identifier: InClusterNetworkLatency |
64 |
| - Method: InClusterNetworkLatency |
65 |
| - Params: |
66 |
| - action: start |
67 |
| - replicasPerProbe: {{AddInt 2 (DivideInt .Nodes 100)}} |
68 |
| - - Identifier: DnsLookupLatency |
69 |
| - Method: DnsLookupLatency |
70 |
| - Params: |
71 |
| - action: start |
72 |
| - replicasPerProbe: {{AddInt 2 (DivideInt .Nodes 100)}} |
73 |
| - - Identifier: TestMetrics |
74 |
| - Method: TestMetrics |
75 |
| - Params: |
76 |
| - action: start |
77 |
| - nodeMode: {{$NODE_MODE}} |
78 |
| - resourceConstraints: {{$DENSITY_RESOURCE_CONSTRAINTS_FILE}} |
79 |
| - systemPodMetricsEnabled: {{$ENABLE_SYSTEM_POD_METRICS}} |
80 |
| - restartCountThresholdOverrides: {{YamlQuote $RESTART_COUNT_THRESHOLD_OVERRIDES 4}} |
81 |
| - enableRestartCountCheck: {{$ENABLE_RESTART_COUNT_CHECK}} |
82 |
| - |
83 |
| -- name: Starting saturation pod measurements |
84 |
| - measurements: |
85 |
| - - Identifier: SaturationPodStartupLatency |
86 |
| - Method: PodStartupLatency |
87 |
| - Params: |
88 |
| - action: start |
89 |
| - labelSelector: group = saturation |
90 |
| - threshold: {{$saturationDeploymentTimeout}}s |
91 |
| - - Identifier: WaitForRunningSaturationDeployments |
92 |
| - Method: WaitForControlledPodsRunning |
93 |
| - Params: |
94 |
| - action: start |
95 |
| - apiVersion: apps/v1 |
96 |
| - kind: Deployment |
97 |
| - labelSelector: group = saturation |
98 |
| - operationTimeout: {{$saturationDeploymentHardTimeout}}s |
99 |
| - - Identifier: SchedulingThroughput |
100 |
| - Method: SchedulingThroughput |
101 |
| - Params: |
102 |
| - action: start |
103 |
| - labelSelector: group = saturation |
104 |
| - |
105 |
| -- name: Creating saturation pods |
106 |
| - phases: |
107 |
| - - namespaceRange: |
108 |
| - min: 1 |
109 |
| - max: {{$namespaces}} |
110 |
| - replicasPerNamespace: 1 |
111 |
| - tuningSet: Uniform5qps |
112 |
| - objectBundle: |
113 |
| - - basename: saturation-deployment |
114 |
| - objectTemplatePath: deployment.yaml |
115 |
| - templateFillMap: |
116 |
| - Replicas: {{$podsPerNamespace}} |
117 |
| - Group: saturation |
118 |
| - CpuRequest: 1m |
119 |
| - MemoryRequest: 10M |
120 |
| - |
121 |
| -- name: Collecting saturation pod measurements |
122 |
| - measurements: |
123 |
| - - Identifier: WaitForRunningSaturationDeployments |
124 |
| - Method: WaitForControlledPodsRunning |
125 |
| - Params: |
126 |
| - action: gather |
127 |
| -- measurements: |
128 |
| - - Identifier: SaturationPodStartupLatency |
129 |
| - Method: PodStartupLatency |
130 |
| - Params: |
131 |
| - action: gather |
132 |
| -- measurements: |
133 |
| - - Identifier: SchedulingThroughput |
134 |
| - Method: SchedulingThroughput |
135 |
| - Params: |
136 |
| - action: gather |
137 |
| - threshold: {{$SCHEDULER_THROUGHPUT_THRESHOLD}} |
138 |
| - |
139 |
| -- name: Starting latency pod measurements |
140 |
| - measurements: |
141 |
| - - Identifier: PodStartupLatency |
142 |
| - Method: PodStartupLatency |
143 |
| - Params: |
144 |
| - action: start |
145 |
| - labelSelector: group = latency |
146 |
| - - Identifier: WaitForRunningLatencyDeployments |
147 |
| - Method: WaitForControlledPodsRunning |
148 |
| - Params: |
149 |
| - action: start |
150 |
| - apiVersion: apps/v1 |
151 |
| - kind: Deployment |
152 |
| - labelSelector: group = latency |
153 |
| - operationTimeout: 15m |
154 |
| - |
155 |
| -- name: Creating latency pods |
156 |
| - phases: |
157 |
| - - namespaceRange: |
158 |
| - min: 1 |
159 |
| - max: {{$namespaces}} |
160 |
| - replicasPerNamespace: {{$latencyReplicas}} |
161 |
| - tuningSet: Uniform5qps |
162 |
| - objectBundle: |
163 |
| - - basename: latency-deployment |
164 |
| - objectTemplatePath: deployment.yaml |
165 |
| - templateFillMap: |
166 |
| - Replicas: 1 |
167 |
| - Group: latency |
168 |
| - CpuRequest: {{$LATENCY_POD_CPU}}m |
169 |
| - MemoryRequest: {{$LATENCY_POD_MEMORY}}M |
170 |
| - |
171 |
| -- name: Waiting for latency pods to be running |
172 |
| - measurements: |
173 |
| - - Identifier: WaitForRunningLatencyDeployments |
174 |
| - Method: WaitForControlledPodsRunning |
175 |
| - Params: |
176 |
| - action: gather |
177 |
| - |
178 |
| -- name: Deleting latency pods |
179 |
| - phases: |
180 |
| - - namespaceRange: |
181 |
| - min: 1 |
182 |
| - max: {{$namespaces}} |
183 |
| - replicasPerNamespace: 0 |
184 |
| - tuningSet: Uniform5qps |
185 |
| - objectBundle: |
186 |
| - - basename: latency-deployment |
187 |
| - objectTemplatePath: deployment.yaml |
188 |
| - |
189 |
| -- name: Waiting for latency pods to be deleted |
190 |
| - measurements: |
191 |
| - - Identifier: WaitForRunningLatencyDeployments |
192 |
| - Method: WaitForControlledPodsRunning |
193 |
| - Params: |
194 |
| - action: gather |
195 |
| - |
196 |
| -- name: Collecting pod startup latency |
197 |
| - measurements: |
198 |
| - - Identifier: PodStartupLatency |
199 |
| - Method: PodStartupLatency |
200 |
| - Params: |
201 |
| - action: gather |
202 |
| - |
203 |
| -- name: Deleting saturation pods |
204 |
| - phases: |
205 |
| - - namespaceRange: |
206 |
| - min: 1 |
207 |
| - max: {{$namespaces}} |
208 |
| - replicasPerNamespace: 0 |
209 |
| - tuningSet: Uniform5qps |
210 |
| - objectBundle: |
211 |
| - - basename: saturation-deployment |
212 |
| - objectTemplatePath: deployment.yaml |
213 |
| - |
214 |
| -- name: Waiting for saturation pods to be deleted |
215 |
| - measurements: |
216 |
| - - Identifier: WaitForRunningSaturationDeployments |
217 |
| - Method: WaitForControlledPodsRunning |
218 |
| - Params: |
219 |
| - action: gather |
220 |
| - |
221 |
| -- name: Collecting measurements |
222 |
| - measurements: |
223 |
| - - Identifier: APIResponsivenessPrometheusSimple |
224 |
| - Method: APIResponsivenessPrometheus |
225 |
| - Params: |
226 |
| - action: gather |
227 |
| - enableViolations: true |
228 |
| - useSimpleLatencyQuery: true |
229 |
| - summaryName: APIResponsivenessPrometheus_simple |
230 |
| - {{if not $USE_SIMPLE_LATENCY_QUERY}} |
231 |
| - - Identifier: APIResponsivenessPrometheus |
232 |
| - Method: APIResponsivenessPrometheus |
233 |
| - Params: |
234 |
| - action: gather |
235 |
| - {{end}} |
236 |
| - - Identifier: InClusterNetworkLatency |
237 |
| - Method: InClusterNetworkLatency |
238 |
| - Params: |
239 |
| - action: gather |
240 |
| - - Identifier: DnsLookupLatency |
241 |
| - Method: DnsLookupLatency |
242 |
| - Params: |
243 |
| - action: gather |
244 |
| - - Identifier: TestMetrics |
245 |
| - Method: TestMetrics |
246 |
| - Params: |
247 |
| - action: gather |
248 |
| - systemPodMetricsEnabled: {{$ENABLE_SYSTEM_POD_METRICS}} |
249 |
| - restartCountThresholdOverrides: {{YamlQuote $RESTART_COUNT_THRESHOLD_OVERRIDES 4}} |
250 |
| - enableRestartCountCheck: {{$ENABLE_RESTART_COUNT_CHECK}} |
0 commit comments