Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 38 additions & 3 deletions clusterloader2/testing/list/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
{{$configMapBytes := DefaultParam .CL2_LIST_CONFIG_MAP_BYTES 100000}}
{{$configMapNumber := DefaultParam .CL2_LIST_CONFIG_MAP_NUMBER 10000}}
{{$configMapGroup := DefaultParam .CL2_LIST_CONFIG_MAP_GROUP "list-configmap"}}
{{$podsNumber := DefaultParam .CL2_LIST_PODS_NUMBER 100000}}
{{$podGroup := DefaultParam .CL2_LIST_POD_GROUP "list-pods"}}
{{$podBytes := DefaultParam .CL2_LIST_POD_BYTES 10000}}

{{$listReplicas := DefaultParam .CL2_LIST_BENCHMARK_PODS 1}}
{{$contentType := DefaultParam .CL2_LIST_BENCHMARK_CONTENT_TYPE "json"}}
Expand Down Expand Up @@ -64,17 +67,17 @@ steps:
uri: /api/v1/configmaps?resourceVersion=0
namespaced: false
contentType: {{$contentType}}
- module:
- module: &startMeasurements
path: /modules/measurements.yaml
params:
action: start
- name: Wait 5 minutes
measurements:
measurements: &waitMeasurements
- Identifier: Wait
Method: Sleep
Params:
duration: 5m
- module:
- module: &gatherMeasurements
path: /modules/measurements.yaml
params:
action: gather
Expand All @@ -83,3 +86,35 @@ steps:
params:
namePrefix: "list-configmaps-"
replicas: 0

- name: Create pods
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think you should delete configmaps and wait couple of minutes so that they are not counted in memory used when collecting metrics for pods.

Copy link
Author

@GunaKKIBM GunaKKIBM Aug 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might need a little help with some reference or example within in this repo. Does the action - "delete" help? I tried looking into any existing examples, but not quite sure.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mborsz , could you please help me here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mborsz @wojtek-t I am still looking for some help here!

phases:
- namespaceRange:
min: 1
max: 1
tuningSet: Sequence
replicasPerNamespace: {{$podsNumber}}
objectBundle:
- basename: {{$podGroup}}
objectTemplatePath: pod.yaml
templateFillMap:
bytes: {{$podBytes}}
group: {{$podGroup}}

- module:
path: modules/list-benchmark.yaml
params:
namePrefix: "list-pods-"
replicas: {{$listReplicas}}
uri: /api/v1/pods?resourceVersion=0
namespaced: false
contentType: {{$contentType}}
- module: *startMeasurements
- name: Wait 5 minutes
measurements: *waitMeasurements
- module: *gatherMeasurements
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doing measurements this way will override file with configmap measurements. We need to put them in separate files.

cc @mborsz for ideas.

- module:
path: modules/list-benchmark.yaml
params:
namePrefix: "list-pods-"
replicas: 0
19 changes: 19 additions & 0 deletions clusterloader2/testing/list/pod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{$group := DefaultParam .group .Name}}
{{$bytes := .bytes}}

apiVersion: v1
kind: Pod
metadata:
name: {{.Name}}
labels:
app: {{$group}}
spec:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The goal is to measure the cost of Listing objects from apiserver. Pods are a different from configmaps as they cannot be passively created without side effects. Immediately after pod creation K8s controllers will start processing them for container to run, scheduler will assign node, Kubelet will pull it and start updating status etc. We would like to avoid that.

Could you propose some way to avoid those pods being processed? For example adding a node selector that prevents scheduling or find other ways to disable scheduler?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After checking how and where perfdash is deployed which led me to this link -https://github.com/kubernetes/k8s.io/blob/main/running-in-community-clusters.md

Adding nodeaffinity/antiaffinity didn't seem like the right option, hence chose to put a schedulerName which is simpler.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good

schedulerName: non-existing-scheduler
containers:
- name: nginx-container
image: nginx
env:
- name: RANDOM_PAYLOAD
value: "{{RandData $bytes}}"
ports:
- containerPort: 80