-
Notifications
You must be signed in to change notification settings - Fork 7
Add SLI Read-Only Test Scenario 10 Nodes with 1000 Pods #183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
1c6b205
10 nodes sli read only test scenario with 1000 pods
vittoriasalim 5255e8b
adjust load profile and address some comments
vittoriasalim 007fea4
linter fix
vittoriasalim 6158260
fix misleading comments
vittoriasalim 0807dad
add fix grammatical error
vittoriasalim f6a76de
adjust number of shares according to real world traffic
vittoriasalim File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
100 changes: 100 additions & 0 deletions
100
contrib/cmd/runkperf/commands/bench/node10_job1_pod1k.go
This file contains hidden or 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,100 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
// SLI Read Only Benchmark | ||
// This benchmark is to test the read-only performance of a Kubernetes cluster | ||
// deploying a job with 1000 pods on 10 virtual nodes. | ||
package bench | ||
|
||
import ( | ||
"context" | ||
"fmt" | ||
"sync" | ||
"time" | ||
|
||
internaltypes "github.com/Azure/kperf/contrib/internal/types" | ||
"github.com/Azure/kperf/contrib/utils" | ||
|
||
"github.com/urfave/cli" | ||
) | ||
|
||
var benchNode10Job1Pod1kCase = cli.Command{ | ||
Name: "node10_job1_pod1k", | ||
Usage: ` | ||
The test suite is to setup 10 virtual nodes and deploy one job with 1000 pods on | ||
those nodes. It repeats to create and delete job. The load profile is fixed. | ||
`, | ||
Flags: append( | ||
[]cli.Flag{ | ||
cli.IntFlag{ | ||
Name: "total", | ||
Usage: "Total requests per runner (There are 10 runners totally and runner's rate is 1)", | ||
Value: 1000, | ||
}, | ||
}, | ||
commonFlags..., | ||
), | ||
Action: func(cliCtx *cli.Context) error { | ||
_, err := renderBenchmarkReportInterceptor( | ||
addAPIServerCoresInfoInterceptor(benchNode10Job1Pod1kCaseRun), | ||
)(cliCtx) | ||
return err | ||
}, | ||
} | ||
|
||
func benchNode10Job1Pod1kCaseRun(cliCtx *cli.Context) (*internaltypes.BenchmarkReport, error) { | ||
ctx := context.Background() | ||
kubeCfgPath := cliCtx.GlobalString("kubeconfig") | ||
|
||
rgCfgFile, rgSpec, rgCfgFileDone, err := newLoadProfileFromEmbed(cliCtx, | ||
"loadprofile/node10_job1_pod1k.yaml") | ||
if err != nil { | ||
return nil, err | ||
} | ||
defer func() { _ = rgCfgFileDone() }() | ||
|
||
vcDone, err := deployVirtualNodepool(ctx, cliCtx, "node10job1pod1k", | ||
10, | ||
cliCtx.Int("cpu"), | ||
cliCtx.Int("memory"), | ||
cliCtx.Int("max-pods"), | ||
) | ||
if err != nil { | ||
return nil, fmt.Errorf("failed to deploy virtual node: %w", err) | ||
} | ||
defer func() { _ = vcDone() }() | ||
|
||
var wg sync.WaitGroup | ||
wg.Add(1) | ||
|
||
jobInterval := 5 * time.Second | ||
jobCtx, jobCancel := context.WithCancel(ctx) | ||
go func() { | ||
defer wg.Done() | ||
|
||
utils.RepeatJobWithPod(jobCtx, kubeCfgPath, "job1pod1k", "workload/1kpod.job.yaml", jobInterval) | ||
}() | ||
|
||
rgResult, derr := utils.DeployRunnerGroup(ctx, | ||
cliCtx.GlobalString("kubeconfig"), | ||
cliCtx.GlobalString("runner-image"), | ||
rgCfgFile, | ||
cliCtx.GlobalString("runner-flowcontrol"), | ||
cliCtx.GlobalString("rg-affinity"), | ||
) | ||
jobCancel() | ||
wg.Wait() | ||
|
||
if derr != nil { | ||
return nil, derr | ||
} | ||
|
||
return &internaltypes.BenchmarkReport{ | ||
Description: fmt.Sprintf(` | ||
Environment: 10 virtual nodes managed by kwok-controller, | ||
Workload: Deploy 1 job with 1,000 pods repeatedly. The parallelism is 100. The interval is %v`, jobInterval), | ||
LoadSpec: *rgSpec, | ||
Result: *rgResult, | ||
Info: make(map[string]interface{}), | ||
}, nil | ||
} |
This file contains hidden or 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
23 changes: 23 additions & 0 deletions
23
contrib/internal/manifests/loadprofile/node10_job1_pod1k.yaml
This file contains hidden or 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,23 @@ | ||
# SLI Read-Only Node10 Job1 Pod1k load profile | ||
count: 10 | ||
loadProfile: | ||
version: 1 | ||
description: "10nodes_1000pods" | ||
spec: | ||
rate: 10 | ||
conns: 10 | ||
client: 10 | ||
contentType: json | ||
requests: | ||
- staleList: | ||
version: v1 | ||
resource: pods | ||
namespace: job1pod1k | ||
shares: 10 | ||
- staleGet: | ||
version: v1 | ||
resource: pods | ||
namespace: virtualnodes-kperf-io | ||
name: node10job1pod1k-1 | ||
vittoriasalim marked this conversation as resolved.
Show resolved
Hide resolved
|
||
shares: 300 | ||
#TODO: Add more resources: jobs, nodes, configmaps ... in next pr |
This file contains hidden or 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,32 @@ | ||
#SLI Read-Only Node10 Job1 Pod1k workload manifest | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: batchjobs | ||
spec: | ||
completions: 1000 | ||
parallelism: 100 | ||
template: | ||
metadata: | ||
labels: | ||
app: fake-pod | ||
spec: | ||
restartPolicy: Never | ||
affinity: | ||
nodeAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
- key: type | ||
operator: In | ||
values: | ||
- kperf-virtualnodes | ||
# A taints was added to an automatically created Node. | ||
# You can remove taints of Node or add this tolerations. | ||
tolerations: | ||
- key: "kperf.io/nodepool" | ||
operator: "Exists" | ||
effect: "NoSchedule" | ||
containers: | ||
- name: fake-container | ||
image: fake-image |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.