Skip to content
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

add ingress-perf config template to be overwirte #634

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
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
60 changes: 60 additions & 0 deletions workloads/ingress-perf/config/standard-template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# vi: expandtab shiftwidth=2 softtabstop=2

# First scenario is configured as warmup and it will also tune the default ingress-controller to assign the router pods to the infra nodes
- termination: http
connections: 200
samples: 5
duration: 5m
path: /1024.html
concurrency: 18
tool: wrk
serverReplicas: 45
tuningPatch: $TUNING_PATCH
delay: 10s
requestTimeout: 10s
warmup: true

- termination: http
connections: $CONNECTIONS
samples: $SAMPLES
duration: $DURATION
path: $ENDPOINT_PATH
concurrency: $CONCURRENCY
tool: $TOOL
serverReplicas: $SERVER_REPLICAS
requestTimeout: $REQUEST_TIMEOUT
delay: $DELAY

- termination: edge
connections: $CONNECTIONS
samples: $SAMPLES
duration: $DURATION
path: $ENDPOINT_PATH
concurrency: $CONCURRENCY
tool: $TOOL
serverReplicas: $SERVER_REPLICAS
requestTimeout: $REQUEST_TIMEOUT
delay: $DELAY

- termination: reencrypt
connections: 200
samples: $SAMPLES
duration: $DURATION
path: $ENDPOINT_PATH
concurrency: $CONCURRENCY
tool: $TOOL
serverReplicas: $SERVER_REPLICAS
requestTimeout: $REQUEST_TIMEOUT
delay: $DELAY

- termination: passthrough
connections: $CONNECTIONS
samples: $SAMPLES
duration: $DURATION
path: $ENDPOINT_PATH
concurrency: $CONCURRENCY
tool: $TOOL
serverReplicas: $SERVER_REPLICAS
requestTimeout: $REQUEST_TIMEOUT
delay: $DELAY

18 changes: 18 additions & 0 deletions workloads/ingress-perf/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,24 @@ TOLERANCY=${TOLERANCY:-20}
OS=$(uname -s)
HARDWARE=$(uname -m)

export TUNING_PATCH=${TUNING_PATCH:-"'{\"spec\":{\"nodePlacement\": {\"nodeSelector\": {\"matchLabels\": {\"node-role.kubernetes.io/infra\": \"\"}}}, \"replicas\": 2}}'"}
Copy link
Member

Choose a reason for hiding this comment

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

Rather than modifying run.sh, can you push this changes into a new file custom-run.sh? that way we won't touch any of the current logic in CPT

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I have used new configurations to run different replica numbers. I find t is more easier than custom-run.sh for me that I can just provide the new config file as an env var, no need to update the CI to use a new cmd like custom-run.sh. So I think I can close this one.

@rsevilla87 If you have any suggestion to
#634 (comment), it could be helpful. Now to tune the thread number, I do it outside of ingress-perf with oc command before the ingress-perf test.

export CONNECTIONS=${CONNECTIONS:-200}
export SAMPLES=${SAMPLES:-2}
export DURATION=${DURATION:-5m}
export ENDPOINT_PATH=${ENDPOINT_PATH:-'/1024.html'}
export CONCURRENCY=${CONCURRENCY:-18}
export TOOL=${TOOL:-wrk}
export SERVER_REPLICAS=${SERVER_REPLICAS:-45}
export REQUEST_TIMEOUT=${REQUEST_TIMEOUT:-10s}
export DELAY=${DELAY:-10s}

export CONFIG_TEMPLATE=${CONFIG_TEMPLATE}

if [[ ! -z ${CONFIG_TEMPLATE} ]]; then
envsubst < ${CONFIG_TEMPLATE} > ${CONFIG}
fi
cat ${CONFIG}

download_binary(){
INGRESS_PERF_URL=https://github.com/cloud-bulldozer/ingress-perf/releases/download/v${INGRESS_PERF_VERSION}/ingress-perf-${OS}-v${INGRESS_PERF_VERSION}-${HARDWARE}.tar.gz
curl --fail --retry 8 --retry-all-errors -sS -L ${INGRESS_PERF_URL} | tar xz ingress-perf
Expand Down