mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-17 14:58:16 +00:00
Merge pull request #8421 from GabyCT/topic/enablestressng
tests: Enable stressng scalability test
This commit is contained in:
@@ -18,20 +18,15 @@ function install_dependencies() {
|
|||||||
|
|
||||||
declare -a system_deps=(
|
declare -a system_deps=(
|
||||||
jq
|
jq
|
||||||
|
curl
|
||||||
|
gnupg
|
||||||
)
|
)
|
||||||
|
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get -y install "${system_deps[@]}"
|
sudo apt-get -y install "${system_deps[@]}"
|
||||||
|
|
||||||
ensure_yq
|
ensure_yq
|
||||||
|
install_docker
|
||||||
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
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function run() {
|
function run() {
|
||||||
@@ -40,6 +35,9 @@ function run() {
|
|||||||
export ITERATIONS=2 MAX_CONTAINERS=20
|
export ITERATIONS=2 MAX_CONTAINERS=20
|
||||||
bash "${stability_dir}/soak_parallel_rm.sh"
|
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"
|
info "Running scability test using ${KATA_HYPERVISOR} hypervisor"
|
||||||
bash "${stability_dir}/scability_test.sh" 15 60
|
bash "${stability_dir}/scability_test.sh" 15 60
|
||||||
|
|
||||||
|
@@ -33,16 +33,6 @@ function main() {
|
|||||||
MEMORY_CMD="stress-ng --cpu 2 --vm 4 -t 5m"
|
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}"
|
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
|
# Test floating point on CPU for 60 seconds
|
||||||
info "Running floating tests on CPU"
|
info "Running floating tests on CPU"
|
||||||
FLOAT_CMD="stress-ng --matrix 1 -t 1m"
|
FLOAT_CMD="stress-ng --matrix 1 -t 1m"
|
||||||
@@ -50,7 +40,7 @@ function main() {
|
|||||||
|
|
||||||
# Runs two instances of the CPU stressors, one instance of the matrix
|
# Runs two instances of the CPU stressors, one instance of the matrix
|
||||||
info "Running instances of the CPU stressors"
|
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}"
|
sudo -E ctr t exec --exec-id "$(random_name)" "${CONTAINER_NAME}" sh -c "${INSTANCE_CMD}"
|
||||||
|
|
||||||
clean_env_ctr
|
clean_env_ctr
|
||||||
|
Reference in New Issue
Block a user