From c8abf2f606c8e4f052f7dc32521f9abec6cb0ef9 Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Fri, 22 Nov 2024 06:52:35 +0000 Subject: [PATCH 1/2] Bench: Make EC2 service region configurable In preparation for distributing expensive benchmarking runs across different AWS service regions, this commit generalizes the EC2 benchmarking workflow to allow the specification of the target region. Signed-off-by: Hanno Becker --- .github/workflows/bench_ec2_reusable.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/bench_ec2_reusable.yml b/.github/workflows/bench_ec2_reusable.yml index a9d389012..7f347290c 100644 --- a/.github/workflows/bench_ec2_reusable.yml +++ b/.github/workflows/bench_ec2_reusable.yml @@ -58,9 +58,11 @@ on: type: string description: Additional packages to install when custom compiler is used. default: '' + aws_region: + type: string + default: "us-east-1" env: AWS_ROLE: arn:aws:iam::559050233797:role/mlkem-c-aarch64-gh-action - AWS_REGION: us-east-1 AMI_UBUNTU_LATEST_X86_64: ami-0e86e20dae9224db8 AMI_UBUNTU_LATEST_AARCH64: ami-096ea6a12ea24a797 jobs: @@ -100,7 +102,7 @@ jobs: uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2 with: role-to-assume: ${{ env.AWS_ROLE }} - aws-region: ${{ env.AWS_REGION }} + aws-region: ${{ inputs.aws_region }} - name: Start EC2 runner id: start-ec2-runner uses: mkannwischer/ec2-github-runner@d15c8804522523d2bac7119a01ffff83b7795d87 @@ -201,7 +203,7 @@ jobs: uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2 with: role-to-assume: ${{ env.AWS_ROLE }} - aws-region: ${{ env.AWS_REGION }} + aws-region: ${{ inputs.aws_region }} - name: Stop EC2 runner uses: mkannwischer/ec2-github-runner@d15c8804522523d2bac7119a01ffff83b7795d87 with: From f169dbd534304f3c5091ee6ddea59b8fd1634ed1 Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Fri, 22 Nov 2024 06:53:25 +0000 Subject: [PATCH 2/2] Bench: Switch c7i to metal Current benchmarks on c7i.large exhibit a high performance variability that is likely due to virtualization. This commit switches to a metal instance for c7i to counter this problem. Signed-off-by: Hanno Becker --- .github/workflows/bench.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index 29b842952..516b851c7 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -87,7 +87,7 @@ jobs: cflags: "-flto -DFORCE_X86_64" perf: PMU - name: Intel Xeon 4th gen (c7i) - ec2_instance_type: c7i.large + ec2_instance_type: c7i.metal-24xl ec2_ami: ubuntu-latest (x86_64) archflags: -mavx2 -mbmi2 -mpopcnt -maes cflags: "-flto -DFORCE_X86_64"