Skip to content

Commit

Permalink
Merge pull request kata-containers#8421 from GabyCT/topic/enablestressng
Browse files Browse the repository at this point in the history
tests: Enable stressng scalability test
  • Loading branch information
GabyCT authored Nov 16, 2023
2 parents 10996f3 + 9cc6908 commit 494174a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 19 deletions.
14 changes: 6 additions & 8 deletions tests/stability/gha-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,15 @@ function install_dependencies() {

declare -a system_deps=(
jq
curl
gnupg
)

sudo apt-get update
sudo apt-get -y install "${system_deps[@]}"

ensure_yq

declare -a github_deps
github_deps[0]="cri_containerd:$(get_from_kata_deps "externals.containerd.${CONTAINERD_VERSION}")"

for github_dep in "${github_deps[@]}"; do
IFS=":" read -r -a dep <<< "${github_dep}"
install_${dep[0]} "${dep[1]}"
done
install_docker
}

function run() {
Expand All @@ -40,6 +35,9 @@ function run() {
export ITERATIONS=2 MAX_CONTAINERS=20
bash "${stability_dir}/soak_parallel_rm.sh"

info "Running stressng scability test using ${KATA_HYPERVISOR} hypervisor"
bash "${stability_dir}/stressng.sh"

info "Running scability test using ${KATA_HYPERVISOR} hypervisor"
bash "${stability_dir}/scability_test.sh" 15 60

Expand Down
12 changes: 1 addition & 11 deletions tests/stability/stressng.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,14 @@ function main() {
MEMORY_CMD="stress-ng --cpu 2 --vm 4 -t 5m"
sudo -E ctr t exec --exec-id "$(random_name)" "${CONTAINER_NAME}" sh -c "${MEMORY_CMD}"

# Run shared memory stressors
info "Running 8 shared memory stressors"
SHARED_CMD="stress-ng --shm 0"
sudo -E ctr t exec --exec-id "$(random_name)" "${CONTAINER_NAME}" sh -c "${SHARED_CMD}"

# Run all stressors one by one on all CPUs
info "Running all stressors one by one"
STRESSORS_CMD="stress-ng --seq 0 -t 10 --tz -v"
sudo -E ctr t exec --exec-id "$(random_name)" "${CONTAINER_NAME}" sh -c "${STRESSORS_CMD}"

# Test floating point on CPU for 60 seconds
info "Running floating tests on CPU"
FLOAT_CMD="stress-ng --matrix 1 -t 1m"
sudo -E ctr t exec --exec-id "$(random_name)" "${CONTAINER_NAME}" sh -c "${FLOAT_CMD}"

# Runs two instances of the CPU stressors, one instance of the matrix
info "Running instances of the CPU stressors"
INSTANCE_CMD='stress-ng --cpu 2 --matrix 1 --mq 3 -t 5m'
INSTANCE_CMD='stress-ng --cpu 2 --matrix 1 --mq 3 -t 3m'
sudo -E ctr t exec --exec-id "$(random_name)" "${CONTAINER_NAME}" sh -c "${INSTANCE_CMD}"

clean_env_ctr
Expand Down

0 comments on commit 494174a

Please sign in to comment.