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

Build cgroups to isolate Gatling process #228

Open
dmlemeshko opened this issue Mar 2, 2022 · 0 comments
Open

Build cgroups to isolate Gatling process #228

dmlemeshko opened this issue Mar 2, 2022 · 0 comments

Comments

@dmlemeshko
Copy link
Member

In order to minimise potential noise while running Kibana/ES and load executor (Gatling) on the same machine, we can limit CPU number that load executor can use.

Setup might look like:

# Isolate the Gatling process to the first 2 cores (2 physical cores)
sudo cset set --set=/benchmark --cpu=0-1
sudo cset proc --exec /benchmark mvn gatling:test -q -Dgatling.simulationClass=${simulationPackage}.${simulationClass}

Cleanup should be executed in the end:

function tearDown() {
    echo "Destroying cgroups"
    sudo cset set --destroy /benchmark
​
    echo "Setting CPU powersave governor"
    for (( cpu=0; cpu<=${CORE_INDEX}; cpu++ ))
    do
        sudo cpufreq-set -c ${cpu} --min ${MIN_FREQ} --max ${MAX_FREQ} --governor=powersave
    done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant