From b29279ca211ced045b3ce4267e8d93634b09a3ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Gurhem?= Date: Fri, 2 Feb 2024 12:07:08 +0100 Subject: [PATCH 1/4] test: add script to execute perf tests with HtcMock --- tools/perftest-htcmock.sh | 49 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 tools/perftest-htcmock.sh diff --git a/tools/perftest-htcmock.sh b/tools/perftest-htcmock.sh new file mode 100644 index 000000000..6eca94165 --- /dev/null +++ b/tools/perftest-htcmock.sh @@ -0,0 +1,49 @@ +#!/bin/bash + +just tag=0.0.0.0-test buildHtcmockClient + +just destroy + +just worker=mock replicas=30 partitions=1 build-deploy + +SHA=$(git rev-parse --short HEAD) +TAG=$(git describe --tags) +DATE=$(date '+%Y%m%d_%H%M%S') + +mkdir -p "logs/$SHA/$DATE" + +docker run --net armonik_network --rm \ + -e HtcMock__TotalCalculationTime=00:00:10 \ + -e HtcMock__NTasks=300 \ + -e HtcMock__SubTasksLevels=4 \ + -e HtcMock__EnableFastCompute=true \ + -e GrpcClient__Endpoint=http://armonik.control.submitter:1080 \ + dockerhubaneo/armonik_core_htcmock_test_client:0.0.0.0-test + + +for i in {0..6} +do +docker run --net armonik_network --rm \ + -e HtcMock__TotalCalculationTime=00:00:10 \ + -e HtcMock__NTasks=10000 \ + -e HtcMock__SubTasksLevels=100 \ + -e HtcMock__EnableFastCompute=true \ + -e GrpcClient__Endpoint=http://armonik.control.submitter:1080 \ + dockerhubaneo/armonik_core_htcmock_test_client:0.0.0.0-test | tee "logs/$SHA/$DATE/mock$i.log" + +done + +echo +echo +echo ===== Results ===== +echo +echo + +set -x +grep -h "Throughput for session" "logs/$SHA/$DATE/mock"* | jq -r .sessionThroughput +set +x + +AVG=$(grep -h "Throughput for session" "logs/$SHA/$DATE/mock"* | jq -r .sessionThroughput | awk 'BEGIN {sum=0; i=0} {i+=1 ; sum+=$1}; END {printf "%.1f", sum/i}') + +echo "| $SHA | $TAG | $AVG | |" + From aaabd204d0253302e76151f2bfa6a93222353d76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Gurhem?= Date: Fri, 2 Feb 2024 12:28:03 +0100 Subject: [PATCH 2/4] docs: add article on test process with htc mock --- .../0.installation/4.perftests-htcmock.md | 88 +++++++++++++++++++ tools/perftest-htcmock.sh | 2 +- 2 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 .docs/content/0.installation/4.perftests-htcmock.md diff --git a/.docs/content/0.installation/4.perftests-htcmock.md b/.docs/content/0.installation/4.perftests-htcmock.md new file mode 100644 index 000000000..2ee7d639c --- /dev/null +++ b/.docs/content/0.installation/4.perftests-htcmock.md @@ -0,0 +1,88 @@ +# ArmoniK.Core performance tests with HtcMock + +## Machine setup + +An AWS **c5.12xlarge** EC2 instance was used to perform the following tests with Amazon Linux 2 operating system. + +Dependencies were installed using the following commands: + +```bash +sudo yum install -y git docker yum-utils + +# just +mkdir -p ~/bin +curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to ~/bin + +# terraform +sudo yum-config-manager --add-repo https://rpm.releases.hashicorp.com/AmazonLinux/hashicorp.repo +sudo yum -y install terraform + +# docker +sudo systemctl enable docker.service +sudo systemctl start docker.service +sudo usermod -a -G docker ec2-user +``` + +## HtcMock client build + +```bash +just buildHtcmockClient +``` + +or + +```bash +docker build -t dockerhubaneo/armonik_core_htcmock_test_client:0.0.0.0-test -f Tests/HtcMock/Client/src/Dockerfile . +``` + +## Empty tasks and complex dependencies case + +ArmoniK.Core infrastructure used: +- Activemq +- 1 partition +- HtcMock worker +- 30 compute plane instances + +```bash +just worker=mock replicas=30 partitions=1 build-deploy +``` + +Once deployed, we do some warmup to put ArmoniK in its optimal state: + +```bash +docker run --net armonik_network --rm \ + -e HtcMock__TotalCalculationTime=00:00:10 \ + -e HtcMock__NTasks=300 \ + -e HtcMock__SubTasksLevels=4 \ + -e HtcMock__EnableFastCompute=true \ + -e GrpcClient__Endpoint=http://armonik.control.submitter:1080\ + dockerhubaneo/armonik_core_htcmock_test_client:0.0.0.0-test +``` + +Then we run the actual test: + +```bash +docker run --net armonik_network --rm \ + -e HtcMock__TotalCalculationTime=00:00:10 \ + -e HtcMock__NTasks=10000 \ + -e HtcMock__SubTasksLevels=100 \ + -e HtcMock__EnableFastCompute=true \ + -e GrpcClient__Endpoint=http://armonik.control.submitter:1080 \ + dockerhubaneo/armonik_core_htcmock_test_client:0.0.0.0-test +``` + +We execute this test several times and compute the average taks throughput. +See this [script](../../../tools/perftest-htcmock.sh) for the exact test process. + +## Some results + +| git rev-parse --short HEAD | git describe --tags | Tasks/seconds | +| -------------------------- | -------------------- | ------------: | +| 91f62cc2 | 0.20.2-5-g91f62cc2 | 595.0 | +| d436763c | 0.20.2-12-gd436763c | 569.0 | +| f41c9a2c | 0.20.5-33-gf41c9a2c | 575.2 | +| 4ea4db08 | 0.20.5-46-g4ea4db08 | 498.1 | +| 85d90c5b | 0.20.5-91-g85d90c5b | 494.7 | +| 968ca38 | 0.20.5-106-g968ca38e | 491.6 | +| 2bcbe5c2 | 0.20.5-109-g2bcbe5c2 | 494.0 | + diff --git a/tools/perftest-htcmock.sh b/tools/perftest-htcmock.sh index 6eca94165..186bd8366 100644 --- a/tools/perftest-htcmock.sh +++ b/tools/perftest-htcmock.sh @@ -45,5 +45,5 @@ set +x AVG=$(grep -h "Throughput for session" "logs/$SHA/$DATE/mock"* | jq -r .sessionThroughput | awk 'BEGIN {sum=0; i=0} {i+=1 ; sum+=$1}; END {printf "%.1f", sum/i}') -echo "| $SHA | $TAG | $AVG | |" +echo "| $SHA | $TAG | $AVG |" From 6179e55e2ca2b1b84fdf8193b0703fb3eb360bc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Gurhem?= Date: Fri, 2 Feb 2024 15:15:56 +0100 Subject: [PATCH 3/4] docs: lint --- .../0.installation/4.perftests-htcmock.md | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/.docs/content/0.installation/4.perftests-htcmock.md b/.docs/content/0.installation/4.perftests-htcmock.md index 2ee7d639c..487487b61 100644 --- a/.docs/content/0.installation/4.perftests-htcmock.md +++ b/.docs/content/0.installation/4.perftests-htcmock.md @@ -51,24 +51,24 @@ Once deployed, we do some warmup to put ArmoniK in its optimal state: ```bash docker run --net armonik_network --rm \ - -e HtcMock__TotalCalculationTime=00:00:10 \ - -e HtcMock__NTasks=300 \ - -e HtcMock__SubTasksLevels=4 \ - -e HtcMock__EnableFastCompute=true \ - -e GrpcClient__Endpoint=http://armonik.control.submitter:1080\ - dockerhubaneo/armonik_core_htcmock_test_client:0.0.0.0-test + -e HtcMock__TotalCalculationTime=00:00:10 \ + -e HtcMock__NTasks=300 \ + -e HtcMock__SubTasksLevels=4 \ + -e HtcMock__EnableFastCompute=true \ + -e GrpcClient__Endpoint=http://armonik.control.submitter:1080\ + dockerhubaneo/armonik_core_htcmock_test_client:0.0.0.0-test ``` Then we run the actual test: ```bash docker run --net armonik_network --rm \ - -e HtcMock__TotalCalculationTime=00:00:10 \ - -e HtcMock__NTasks=10000 \ - -e HtcMock__SubTasksLevels=100 \ - -e HtcMock__EnableFastCompute=true \ - -e GrpcClient__Endpoint=http://armonik.control.submitter:1080 \ - dockerhubaneo/armonik_core_htcmock_test_client:0.0.0.0-test + -e HtcMock__TotalCalculationTime=00:00:10 \ + -e HtcMock__NTasks=10000 \ + -e HtcMock__SubTasksLevels=100 \ + -e HtcMock__EnableFastCompute=true \ + -e GrpcClient__Endpoint=http://armonik.control.submitter:1080 \ + dockerhubaneo/armonik_core_htcmock_test_client:0.0.0.0-test ``` We execute this test several times and compute the average taks throughput. @@ -85,4 +85,3 @@ See this [script](../../../tools/perftest-htcmock.sh) for the exact test process | 85d90c5b | 0.20.5-91-g85d90c5b | 494.7 | | 968ca38 | 0.20.5-106-g968ca38e | 491.6 | | 2bcbe5c2 | 0.20.5-109-g2bcbe5c2 | 494.0 | - From 821ea07bf903d98b160c5db18112fad2774fd2ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Gurhem?= Date: Fri, 2 Feb 2024 15:19:55 +0100 Subject: [PATCH 4/4] docs: clearer table --- .../0.installation/4.perftests-htcmock.md | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/.docs/content/0.installation/4.perftests-htcmock.md b/.docs/content/0.installation/4.perftests-htcmock.md index 487487b61..e860fd0dd 100644 --- a/.docs/content/0.installation/4.perftests-htcmock.md +++ b/.docs/content/0.installation/4.perftests-htcmock.md @@ -39,6 +39,7 @@ docker build -t dockerhubaneo/armonik_core_htcmock_test_client:0.0.0.0-test -f T ArmoniK.Core infrastructure used: - Activemq +- Redis - 1 partition - HtcMock worker - 30 compute plane instances @@ -71,17 +72,17 @@ docker run --net armonik_network --rm \ dockerhubaneo/armonik_core_htcmock_test_client:0.0.0.0-test ``` -We execute this test several times and compute the average taks throughput. +We execute this test several times and compute the average tasks throughput. See this [script](../../../tools/perftest-htcmock.sh) for the exact test process. -## Some results - -| git rev-parse --short HEAD | git describe --tags | Tasks/seconds | -| -------------------------- | -------------------- | ------------: | -| 91f62cc2 | 0.20.2-5-g91f62cc2 | 595.0 | -| d436763c | 0.20.2-12-gd436763c | 569.0 | -| f41c9a2c | 0.20.5-33-gf41c9a2c | 575.2 | -| 4ea4db08 | 0.20.5-46-g4ea4db08 | 498.1 | -| 85d90c5b | 0.20.5-91-g85d90c5b | 494.7 | -| 968ca38 | 0.20.5-106-g968ca38e | 491.6 | -| 2bcbe5c2 | 0.20.5-109-g2bcbe5c2 | 494.0 | +## Some throughput results in tasks per seconds + +| git rev-parse --short HEAD | git describe --tags | ActiveMQ / Redis | +| -------------------------- | -------------------- | ---------------: | +| 91f62cc2 | 0.20.2-5-g91f62cc2 | 595.0 | +| d436763c | 0.20.2-12-gd436763c | 569.0 | +| f41c9a2c | 0.20.5-33-gf41c9a2c | 575.2 | +| 4ea4db08 | 0.20.5-46-g4ea4db08 | 498.1 | +| 85d90c5b | 0.20.5-91-g85d90c5b | 494.7 | +| 968ca38 | 0.20.5-106-g968ca38e | 491.6 | +| 2bcbe5c2 | 0.20.5-109-g2bcbe5c2 | 494.0 |