mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #126337 from macsko/add_larger_scheduler_perf_test_cases
Add larger scheduler_perf test cases
This commit is contained in:
commit
983875b2f5
@ -64,15 +64,17 @@ func getAvailablePort() (int, error) {
|
||||
|
||||
// startEtcd executes an etcd instance. The returned function will signal the
|
||||
// etcd process and wait for it to exit.
|
||||
func startEtcd(output io.Writer) (func(), error) {
|
||||
etcdURL := env.GetEnvAsStringOrFallback("KUBE_INTEGRATION_ETCD_URL", "http://127.0.0.1:2379")
|
||||
conn, err := net.Dial("tcp", strings.TrimPrefix(etcdURL, "http://"))
|
||||
if err == nil {
|
||||
klog.Infof("etcd already running at %s", etcdURL)
|
||||
conn.Close()
|
||||
return func() {}, nil
|
||||
func startEtcd(output io.Writer, forceCreate bool) (func(), error) {
|
||||
if !forceCreate {
|
||||
etcdURL := env.GetEnvAsStringOrFallback("KUBE_INTEGRATION_ETCD_URL", "http://127.0.0.1:2379")
|
||||
conn, err := net.Dial("tcp", strings.TrimPrefix(etcdURL, "http://"))
|
||||
if err == nil {
|
||||
klog.Infof("etcd already running at %s", etcdURL)
|
||||
_ = conn.Close()
|
||||
return func() {}, nil
|
||||
}
|
||||
klog.V(1).Infof("could not connect to etcd: %v", err)
|
||||
}
|
||||
klog.V(1).Infof("could not connect to etcd: %v", err)
|
||||
|
||||
currentURL, stop, err := RunCustomEtcd("integration_test_etcd_data", nil, output)
|
||||
if err != nil {
|
||||
@ -217,7 +219,7 @@ func EtcdMain(tests func() int) {
|
||||
goleak.IgnoreTopFunction("github.com/moby/spdystream.(*Connection).shutdown"),
|
||||
)
|
||||
|
||||
stop, err := startEtcd(nil)
|
||||
stop, err := startEtcd(nil, false)
|
||||
if err != nil {
|
||||
klog.Fatalf("cannot run integration tests: unable to start etcd: %v", err)
|
||||
}
|
||||
@ -247,8 +249,8 @@ func GetEtcdURL() string {
|
||||
//
|
||||
// Starting etcd multiple times per test run instead of once with EtcdMain
|
||||
// provides better separation between different tests.
|
||||
func StartEtcd(tb testing.TB, etcdOutput io.Writer) {
|
||||
stop, err := startEtcd(etcdOutput)
|
||||
func StartEtcd(tb testing.TB, etcdOutput io.Writer, forceCreate bool) {
|
||||
stop, err := startEtcd(etcdOutput, forceCreate)
|
||||
if err != nil {
|
||||
tb.Fatalf("unable to start etcd: %v", err)
|
||||
}
|
||||
|
@ -30,11 +30,17 @@
|
||||
initPods: 500
|
||||
measurePods: 1000
|
||||
- name: 5000Nodes
|
||||
labels: [performance, fast]
|
||||
labels: [fast]
|
||||
params:
|
||||
initNodes: 5000
|
||||
initPods: 1000
|
||||
measurePods: 1000
|
||||
- name: 5000Nodes_10000Pods
|
||||
labels: [performance]
|
||||
params:
|
||||
initNodes: 5000
|
||||
initPods: 1000
|
||||
measurePods: 10000
|
||||
|
||||
- name: SchedulingPodAntiAffinity
|
||||
defaultPodTemplatePath: config/templates/pod-with-pod-anti-affinity.yaml
|
||||
@ -59,11 +65,17 @@
|
||||
initPods: 100
|
||||
measurePods: 400
|
||||
- name: 5000Nodes
|
||||
labels: [performance, fast]
|
||||
labels: [fast]
|
||||
params:
|
||||
initNodes: 5000
|
||||
initPods: 1000
|
||||
measurePods: 1000
|
||||
- name: 5000Nodes_2000Pods
|
||||
labels: [performance]
|
||||
params:
|
||||
initNodes: 5000
|
||||
initPods: 1000
|
||||
measurePods: 2000
|
||||
|
||||
- name: SchedulingSecrets
|
||||
defaultPodTemplatePath: config/templates/pod-with-secret-volume.yaml
|
||||
@ -83,14 +95,19 @@
|
||||
initPods: 500
|
||||
measurePods: 1000
|
||||
- name: 5000Nodes
|
||||
labels: [performance, fast]
|
||||
labels: [fast]
|
||||
params:
|
||||
initNodes: 5000
|
||||
initPods: 5000
|
||||
measurePods: 1000
|
||||
- name: 5000Nodes_10000Pods
|
||||
labels: [performance]
|
||||
params:
|
||||
initNodes: 5000
|
||||
initPods: 1000
|
||||
measurePods: 10000
|
||||
|
||||
- name: SchedulingInTreePVs
|
||||
labels: [performance]
|
||||
workloadTemplate:
|
||||
- opcode: createNodes
|
||||
countParam: $initNodes
|
||||
@ -115,9 +132,14 @@
|
||||
initNodes: 5000
|
||||
initPods: 5000
|
||||
measurePods: 1000
|
||||
- name: 5000Nodes_2000Pods
|
||||
labels: [performance]
|
||||
params:
|
||||
initNodes: 5000
|
||||
initPods: 1000
|
||||
measurePods: 2000
|
||||
|
||||
- name: SchedulingMigratedInTreePVs
|
||||
labels: [performance]
|
||||
workloadTemplate:
|
||||
- opcode: createNodes
|
||||
countParam: $initNodes
|
||||
@ -151,9 +173,14 @@
|
||||
initNodes: 5000
|
||||
initPods: 5000
|
||||
measurePods: 1000
|
||||
- name: 5000Nodes_5000Pods
|
||||
labels: [performance]
|
||||
params:
|
||||
initNodes: 5000
|
||||
initPods: 5000
|
||||
measurePods: 5000
|
||||
|
||||
- name: SchedulingCSIPVs
|
||||
labels: [performance]
|
||||
workloadTemplate:
|
||||
- opcode: createNodes
|
||||
countParam: $initNodes
|
||||
@ -185,6 +212,12 @@
|
||||
initNodes: 5000
|
||||
initPods: 5000
|
||||
measurePods: 1000
|
||||
- name: 5000Nodes_5000Pods
|
||||
labels: [performance]
|
||||
params:
|
||||
initNodes: 5000
|
||||
initPods: 5000
|
||||
measurePods: 5000
|
||||
|
||||
- name: SchedulingPodAffinity
|
||||
defaultPodTemplatePath: config/templates/pod-with-pod-affinity.yaml
|
||||
@ -213,14 +246,19 @@
|
||||
initPods: 500
|
||||
measurePods: 1000
|
||||
- name: 5000Nodes
|
||||
labels: [performance, fast]
|
||||
labels: [fast]
|
||||
params:
|
||||
initNodes: 5000
|
||||
initPods: 5000
|
||||
measurePods: 1000
|
||||
- name: 5000Nodes_5000Pods
|
||||
labels: [performance]
|
||||
params:
|
||||
initNodes: 5000
|
||||
initPods: 5000
|
||||
measurePods: 5000
|
||||
|
||||
- name: SchedulingPreferredPodAffinity
|
||||
labels: [performance]
|
||||
defaultPodTemplatePath: config/templates/pod-with-preferred-pod-affinity.yaml
|
||||
workloadTemplate:
|
||||
- opcode: createNodes
|
||||
@ -247,6 +285,12 @@
|
||||
initNodes: 5000
|
||||
initPods: 5000
|
||||
measurePods: 1000
|
||||
- name: 5000Nodes_5000Pods
|
||||
labels: [performance]
|
||||
params:
|
||||
initNodes: 5000
|
||||
initPods: 5000
|
||||
measurePods: 5000
|
||||
|
||||
- name: SchedulingPreferredPodAntiAffinity
|
||||
defaultPodTemplatePath: config/templates/pod-with-preferred-pod-affinity.yaml
|
||||
@ -271,11 +315,17 @@
|
||||
initPods: 500
|
||||
measurePods: 1000
|
||||
- name: 5000Nodes
|
||||
labels: [performance, fast]
|
||||
labels: [fast]
|
||||
params:
|
||||
initNodes: 5000
|
||||
initPods: 5000
|
||||
measurePods: 1000
|
||||
- name: 5000Nodes_5000Pods
|
||||
labels: [performance]
|
||||
params:
|
||||
initNodes: 5000
|
||||
initPods: 5000
|
||||
measurePods: 5000
|
||||
|
||||
# This test case simulates the scheduling of daemonset.
|
||||
# https://github.com/kubernetes/kubernetes/issues/124709
|
||||
@ -326,11 +376,17 @@
|
||||
initPods: 500
|
||||
measurePods: 1000
|
||||
- name: 5000Nodes
|
||||
labels: [performance, fast]
|
||||
labels: [fast]
|
||||
params:
|
||||
initNodes: 5000
|
||||
initPods: 5000
|
||||
measurePods: 1000
|
||||
- name: 5000Nodes_10000Pods
|
||||
labels: [performance]
|
||||
params:
|
||||
initNodes: 5000
|
||||
initPods: 5000
|
||||
measurePods: 10000
|
||||
|
||||
- name: TopologySpreading
|
||||
workloadTemplate:
|
||||
@ -355,14 +411,19 @@
|
||||
initPods: 1000
|
||||
measurePods: 1000
|
||||
- name: 5000Nodes
|
||||
labels: [performance, fast]
|
||||
labels: [fast]
|
||||
params:
|
||||
initNodes: 5000
|
||||
initPods: 5000
|
||||
measurePods: 2000
|
||||
- name: 5000Nodes_5000Pods
|
||||
labels: [performance]
|
||||
params:
|
||||
initNodes: 5000
|
||||
initPods: 5000
|
||||
measurePods: 5000
|
||||
|
||||
- name: PreferredTopologySpreading
|
||||
labels: [performance]
|
||||
workloadTemplate:
|
||||
- opcode: createNodes
|
||||
countParam: $initNodes
|
||||
@ -389,9 +450,14 @@
|
||||
initNodes: 5000
|
||||
initPods: 5000
|
||||
measurePods: 2000
|
||||
- name: 5000Nodes_5000Pods
|
||||
labels: [performance]
|
||||
params:
|
||||
initNodes: 5000
|
||||
initPods: 5000
|
||||
measurePods: 5000
|
||||
|
||||
- name: MixedSchedulingBasePod
|
||||
labels: [performance]
|
||||
defaultPodTemplatePath: config/templates/pod-default.yaml
|
||||
workloadTemplate:
|
||||
- opcode: createNodes
|
||||
@ -437,6 +503,12 @@
|
||||
initNodes: 5000
|
||||
initPods: 2000
|
||||
measurePods: 1000
|
||||
- name: 5000Nodes_5000Pods
|
||||
labels: [performance]
|
||||
params:
|
||||
initNodes: 5000
|
||||
initPods: 2000
|
||||
measurePods: 5000
|
||||
|
||||
- name: PreemptionBasic
|
||||
labels: [performance]
|
||||
@ -516,11 +588,17 @@
|
||||
initPods: 200
|
||||
measurePods: 1000
|
||||
- name: 5000Nodes/200InitPods
|
||||
labels: [performance, fast]
|
||||
labels: [fast]
|
||||
params:
|
||||
initNodes: 5000
|
||||
initPods: 200
|
||||
measurePods: 5000
|
||||
- name: 5000Nodes/200InitPods/10000Pods
|
||||
labels: [performance]
|
||||
params:
|
||||
initNodes: 5000
|
||||
initPods: 200
|
||||
measurePods: 10000
|
||||
- name: 5000Nodes/2000InitPods
|
||||
params:
|
||||
initNodes: 5000
|
||||
@ -550,13 +628,17 @@
|
||||
initNodes: 1000
|
||||
measurePods: 1000
|
||||
- name: 5000Nodes
|
||||
labels: [performance, fast]
|
||||
labels: [fast]
|
||||
params:
|
||||
initNodes: 5000
|
||||
measurePods: 2000
|
||||
- name: 5000Nodes_10000Pods
|
||||
labels: [performance]
|
||||
params:
|
||||
initNodes: 5000
|
||||
measurePods: 10000
|
||||
|
||||
- name: SchedulingRequiredPodAntiAffinityWithNSSelector
|
||||
labels: [performance]
|
||||
defaultPodTemplatePath: config/templates/pod-anti-affinity-ns-selector.yaml
|
||||
workloadTemplate:
|
||||
- opcode: createNodes
|
||||
@ -593,9 +675,15 @@
|
||||
initPodsPerNamespace: 40
|
||||
initNamespaces: 100
|
||||
measurePods: 1000
|
||||
- name: 5000Nodes_2000Pods
|
||||
labels: [performance]
|
||||
params:
|
||||
initNodes: 6000
|
||||
initPodsPerNamespace: 40
|
||||
initNamespaces: 100
|
||||
measurePods: 2000
|
||||
|
||||
- name: SchedulingPreferredAntiAffinityWithNSSelector
|
||||
labels: [performance]
|
||||
defaultPodTemplatePath: config/templates/pod-preferred-anti-affinity-ns-selector.yaml
|
||||
workloadTemplate:
|
||||
- opcode: createNodes
|
||||
@ -632,9 +720,15 @@
|
||||
initPodsPerNamespace: 40
|
||||
initNamespaces: 100
|
||||
measurePods: 1000
|
||||
- name: 5000Nodes_2000Pods
|
||||
labels: [performance]
|
||||
params:
|
||||
initNodes: 5000
|
||||
initPodsPerNamespace: 40
|
||||
initNamespaces: 100
|
||||
measurePods: 2000
|
||||
|
||||
- name: SchedulingRequiredPodAffinityWithNSSelector
|
||||
labels: [performance]
|
||||
defaultPodTemplatePath: config/templates/pod-affinity-ns-selector.yaml
|
||||
workloadTemplate:
|
||||
- opcode: createNodes
|
||||
@ -674,9 +768,15 @@
|
||||
initPodsPerNamespace: 50
|
||||
initNamespaces: 100
|
||||
measurePods: 1000
|
||||
- name: 5000Nodes_2000Pods
|
||||
labels: [performance]
|
||||
params:
|
||||
initNodes: 5000
|
||||
initPodsPerNamespace: 50
|
||||
initNamespaces: 100
|
||||
measurePods: 2000
|
||||
|
||||
- name: SchedulingPreferredAffinityWithNSSelector
|
||||
labels: [performance]
|
||||
defaultPodTemplatePath: config/templates/pod-preferred-affinity-ns-selector.yaml
|
||||
workloadTemplate:
|
||||
- opcode: createNodes
|
||||
@ -713,6 +813,13 @@
|
||||
initPodsPerNamespace: 50
|
||||
initNamespaces: 100
|
||||
measurePods: 1000
|
||||
- name: 5000Nodes_5000Pods
|
||||
labels: [performance]
|
||||
params:
|
||||
initNodes: 5000
|
||||
initPodsPerNamespace: 50
|
||||
initNamespaces: 100
|
||||
measurePods: 5000
|
||||
|
||||
- name: SchedulingWithNodeInclusionPolicy
|
||||
featureGates:
|
||||
|
@ -777,8 +777,8 @@ func setupTestCase(t testing.TB, tc *testCase, output io.Writer, outOfTreePlugin
|
||||
framework.GoleakCheck(t)
|
||||
|
||||
// Now that we are ready to run, start
|
||||
// etcd.
|
||||
framework.StartEtcd(t, output)
|
||||
// a brand new etcd.
|
||||
framework.StartEtcd(t, output, true)
|
||||
|
||||
for feature, flag := range tc.FeatureGates {
|
||||
featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, feature, flag)
|
||||
|
Loading…
Reference in New Issue
Block a user