-
Notifications
You must be signed in to change notification settings - Fork 542
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Hantao (Will) Wang
committed
Jul 29, 2019
1 parent
aa4f18d
commit 69472bc
Showing
10 changed files
with
142 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
...oader2/testing/experimental/storage/pod-startup/cluster_load_scale_by_nodes/override.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
TEST_NAME: cluster-load-scale-by-node | ||
PODS_PER_NODE: 10 | ||
VOLUMES_PER_POD: 1 |
128 changes: 85 additions & 43 deletions
128
clusterloader2/testing/experimental/storage/pod-startup/config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,100 +1,142 @@ | ||
# ASSUMPTIONS: | ||
# - Number of nodes should be divisible by NODES_PER_NAMESPACE (default 100). | ||
|
||
#Constants | ||
# TODO(mucahitkurt) copied from load tests, open for discussion. | ||
{{$NODE_MODE := DefaultParam .NODE_MODE "allnodes"}} | ||
{{$NODES_PER_NAMESPACE := DefaultParam .NODES_PER_NAMESPACE 100}} | ||
{{$PODS_PER_NODE := DefaultParam .PODS_PER_NODE 30}} | ||
# Cluster Variables | ||
{{$NODE_MODE := DefaultParam .NODE_MODE "allnodes"}} | ||
{{$NODES_PER_NAMESPACE := DefaultParam .NODES_PER_NAMESPACE 100}} | ||
|
||
{{$POD_TEMPLATE_PATH := DefaultParam .POD_TEMPLATE_PATH "../volume-types/emptydir/pod_with_emptydir.yaml"}} | ||
{{$LOAD_TEST_THROUGHPUT := DefaultParam .LOAD_TEST_THROUGHPUT 10}} | ||
# Test Variales | ||
{{$TEST_NAME := DefaultParam .TEST_NAME "generic-test"}} | ||
{{$PODS_PER_NODE := .PODS_PER_NODE}} | ||
{{$POD_TEMPLATE_PATH := .POD_TEMPLATE_PATH }} | ||
{{$VOLUMES_PER_POD := .VOLUMES_PER_POD}} | ||
{{$VOLUME_TEMPLATE_PATH := .VOLUME_TEMPLATE_PATH}} | ||
{{$PROVISION_VOLUME := DefaultParam .PROVISION_VOLUME false}} | ||
{{$VOL_SIZE := DefaultParam .VOL_SIZE "8Gi"}} | ||
{{$WAIT_FOR_PVC := DefaultParam .WAIT_FOR_PVC false}} | ||
# TODO(hantaowang): remove knob after deciding on right values | ||
{{$POD_STARTUP_TIMEOUT := DefaultParam .POD_STARTUP_TIMEOUT "15m"}} | ||
{{$POD_STARTUP_SLO := DefaultParam .POD_STARTUP_SLO 300}} | ||
|
||
{{$VOLUMES_PER_POD := DefaultParam .VOLUMES_PER_POD 1}} | ||
{{$VOLUME_TEMPLATE_PATH := .VOLUME_TEMPLATE_PATH}} | ||
{{$PROVISION_VOLUME := DefaultParam .PROVISION_VOLUME false}} | ||
# Computed Variables | ||
{{$namespaces := DivideInt .Nodes $NODES_PER_NAMESPACE | MaxInt 1}} | ||
{{$totalPods := MultiplyInt $namespaces $NODES_PER_NAMESPACE $PODS_PER_NODE}} | ||
{{$podsPerNamespace := MultiplyInt $NODES_PER_NAMESPACE $PODS_PER_NODE}} | ||
{{$volumesPerNamespace := MultiplyInt $podsPerNamespace $VOLUMES_PER_POD}} | ||
{{$totalVols := MultiplyInt $volumesPerNamespace $namespaces}} | ||
{{$PVCBoundTime := MultiplyInt $totalVols 2 | MaxInt 60}} | ||
|
||
{{$APP_NAME := "pod-load"}} | ||
{{$GROUP := "pod-with-ephemeral-volume-startup-latency"}} | ||
|
||
#Variables | ||
# used stateless pod SLO for initial run | ||
{{$namespaces := DivideInt .Nodes $NODES_PER_NAMESPACE | MaxInt 1}} | ||
{{$podStartupTimeout := 5}} | ||
{{$totalPods := MultiplyInt $namespaces $NODES_PER_NAMESPACE $PODS_PER_NODE}} | ||
{{$podsPerNamespace := MultiplyInt $NODES_PER_NAMESPACE $PODS_PER_NODE}} | ||
{{$volumesPerNamespace := MultiplyInt $podsPerNamespace $VOLUMES_PER_POD}} | ||
|
||
name: pod-with-ephemeral-volume-startup-latency | ||
name: storage-{{$TEST_NAME}} | ||
automanagedNamespaces: {{$namespaces}} | ||
tuningSets: | ||
- name: UniformQPS | ||
qpsLoad: | ||
qps: {{$LOAD_TEST_THROUGHPUT}} | ||
- name: Sequence | ||
parallelismLimitedLoad: | ||
parallelismLimit: 1 | ||
steps: | ||
# Start measurements | ||
- measurements: | ||
- Identifier: APIResponsiveness | ||
Method: APIResponsiveness | ||
Params: | ||
action: reset | ||
- Identifier: PodWithMultiVolumeStartupLatency | ||
- Identifier: APIResponsivenessPrometheus | ||
Method: APIResponsivenessPrometheus | ||
Params: | ||
action: start | ||
- Identifier: TestMetrics | ||
Method: TestMetrics | ||
Params: | ||
action: start | ||
nodeMode: {{$NODE_MODE}} | ||
- Identifier: PodWithVolumesStartupLatency | ||
Method: PodStartupLatency | ||
Params: | ||
action: start | ||
labelSelector: group = {{$GROUP}} | ||
threshold: {{$podStartupTimeout}}s | ||
labelSelector: group = volume-test | ||
threshold: {{$POD_STARTUP_SLO}}s | ||
{{ if $PROVISION_VOLUME }} | ||
# Provision volumes | ||
- phases: | ||
- namespaceRange: | ||
min: 1 | ||
max: {{$namespaces}} | ||
replicasPerNamespace: {{$volumesPerNamespace}} | ||
tuningSet: UniformQPS | ||
tuningSet: Sequence | ||
objectBundle: | ||
- basename: vol-{{$APP_NAME}} | ||
- basename: vol-{{$TEST_NAME}} | ||
objectTemplatePath: {{$VOLUME_TEMPLATE_PATH}} | ||
templateFillMap: | ||
Group: volume-test | ||
VolSize: {{$VOL_SIZE}} | ||
{{ end }} | ||
{{ if $WAIT_FOR_PVC }} | ||
- measurements: | ||
- Identifier: WaitForPVCsToBeBound | ||
Method: WaitForBoundPVCs | ||
Params: | ||
desiredPVCCount: {{$totalVols}} | ||
apiVersion: v1 | ||
labelSelector: group = volume-test | ||
timeout: {{$PVCBoundTime}}s | ||
{{ end }} | ||
# Create pods | ||
- phases: | ||
- namespaceRange: | ||
min: 1 | ||
max: {{$namespaces}} | ||
replicasPerNamespace: {{$podsPerNamespace}} | ||
tuningSet: UniformQPS | ||
tuningSet: Sequence | ||
objectBundle: | ||
- basename: {{$APP_NAME}} | ||
- basename: pod-{{$TEST_NAME}} | ||
objectTemplatePath: {{$POD_TEMPLATE_PATH}} | ||
templateFillMap: | ||
Group: {{$GROUP}} | ||
Group: volume-test | ||
VolumesPerPod: {{$VOLUMES_PER_POD}} | ||
AppName: {{$APP_NAME}} | ||
- measurements: | ||
- Identifier: WaitForRunningPodsWithStorage | ||
- Identifier: WaitForRunningPodsWithVolumes | ||
Method: WaitForRunningPods | ||
Params: | ||
desiredPodCount: {{$totalPods}} | ||
labelSelector: group = {{$GROUP}} | ||
# TODO(mucahitkurt) decide this after test roll-out phase | ||
timeout: 15m | ||
labelSelector: group = volume-test | ||
timeout: {{$POD_STARTUP_TIMEOUT}} | ||
# Delete pods | ||
- phases: | ||
- namespaceRange: | ||
min: 1 | ||
max: {{$namespaces}} | ||
replicasPerNamespace: 0 | ||
tuningSet: UniformQPS | ||
tuningSet: Sequence | ||
objectBundle: | ||
- basename: {{$APP_NAME}} | ||
- basename: pod-{{$TEST_NAME}} | ||
objectTemplatePath: {{$POD_TEMPLATE_PATH}} | ||
{{ if $PROVISION_VOLUME }} | ||
# Delete volumes | ||
- phases: | ||
- namespaceRange: | ||
min: 1 | ||
max: {{$namespaces}} | ||
replicasPerNamespace: 0 | ||
tuningSet: Sequence | ||
objectBundle: | ||
- basename: vol-{{$TEST_NAME}} | ||
objectTemplatePath: {{$VOLUME_TEMPLATE_PATH}} | ||
{{ end }} | ||
# Collect measurements | ||
- measurements: | ||
- Identifier: PodWithMultiVolumeStartupLatency | ||
Method: PodStartupLatency | ||
Params: | ||
action: gather | ||
- Identifier: APIResponsiveness | ||
Method: APIResponsiveness | ||
Params: | ||
action: gather | ||
- Identifier: APIResponsivenessPrometheus | ||
Method: APIResponsivenessPrometheus | ||
Params: | ||
action: gather | ||
- Identifier: TestMetrics | ||
Method: TestMetrics | ||
Params: | ||
action: gather | ||
- Identifier: PodWithVolumesStartupLatency | ||
Method: PodStartupLatency | ||
Params: | ||
action: gather |
1 change: 1 addition & 0 deletions
1
clusterloader2/testing/experimental/storage/pod-startup/max_volumes_per_node/override.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
TEST_NAME: max-volumes-per-node | ||
PODS_PER_NODE: 100 | ||
VOLUMES_PER_POD: 1 | ||
NODES_PER_NAMESPACE: 1 |
1 change: 1 addition & 0 deletions
1
clusterloader2/testing/experimental/storage/pod-startup/max_volumes_per_pod/override.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
TEST_NAME: max-volumes-per-pod | ||
PODS_PER_NODE: 1 | ||
VOLUMES_PER_POD: 100 | ||
NODES_PER_NAMESPACE: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
...der2/testing/experimental/storage/pod-startup/volume-types/persistentvolume/override.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
PROVISION_VOLUME: true | ||
WAIT_FOR_PVC: true | ||
POD_TEMPLATE_PATH: "volume-types/persistentvolume/pod_with_pvc.yaml" | ||
VOLUME_TEMPLATE_PATH: "volume-types/persistentvolume/pvc.yaml" |
27 changes: 27 additions & 0 deletions
27
.../testing/experimental/storage/pod-startup/volume-types/persistentvolume/pod_with_pvc.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{{$index := .Index}} | ||
{{$appName := .AppName}} | ||
{{$volumesPerPod := .VolumesPerPod}} | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: {{.Name}} | ||
labels: | ||
app: {{.Name}} | ||
group: {{.Group}} | ||
spec: | ||
containers: | ||
- name: {{.Name}} | ||
image: k8s.gcr.io/pause:3.1 | ||
imagePullPolicy: IfNotPresent | ||
volumeMounts: | ||
{{ range $volumeIndex, $vol := Seq .VolumesPerPod }} | ||
- name: vol-{{$volumeIndex}} | ||
mountPath: /usr/share/{{$volumeIndex}} | ||
{{ end }} | ||
volumes: | ||
{{ range $volumeIndex, $vol := Seq .VolumesPerPod }} | ||
- name: vol-{{$volumeIndex}} | ||
persistentVolumeClaim: | ||
claimName: vol-{{$appName}}-{{AddInt $volumeIndex (MultiplyInt $index $volumesPerPod)}} | ||
readOnly: false | ||
{{ end }} |
13 changes: 13 additions & 0 deletions
13
...erloader2/testing/experimental/storage/pod-startup/volume-types/persistentvolume/pvc.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: {{.Name}} | ||
labels: | ||
app: {{.Name}} | ||
group: {{.Group}} | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: {{.VolSize}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters