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

Benchmark Regression alert #424

Merged
merged 4 commits into from
Nov 26, 2024
Merged

Benchmark Regression alert #424

merged 4 commits into from
Nov 26, 2024

Conversation

potsrevennil
Copy link
Contributor

@potsrevennil potsrevennil commented Nov 18, 2024

potsrevennil#27

  • There will also be GH job summary generated.

  • There's some other options provided by the benchmark action (but not set in this pr) which one might be useful as well:

    • fail-on-alert
    • fail-threshold
    • alert-comment-cc-users

@potsrevennil potsrevennil marked this pull request as ready for review November 18, 2024 08:18
Copy link
Contributor

@hanno-becker hanno-becker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not yet clear to me that this will trigger at PR-time not only post-merge. @potsrevennil can you explain?

@potsrevennil potsrevennil marked this pull request as draft November 18, 2024 11:05
@potsrevennil potsrevennil force-pushed the bench-alert branch 4 times, most recently from 34cc2e2 to 9c57cd6 Compare November 19, 2024 06:59
@potsrevennil potsrevennil added the benchmark this PR should be benchmarked in CI label Nov 19, 2024
Copy link

@oqs-bot oqs-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Intel Xeon 4th gen (c7i) (no-opt)'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.03.

Benchmark suite Current: 372c3ef Previous: ea2193a Ratio
ML-KEM-512 keypair 37589 cycles 34692 cycles 1.08
ML-KEM-512 encaps 46894 cycles 43244 cycles 1.08
ML-KEM-512 decaps 62890 cycles 58124 cycles 1.08
ML-KEM-768 keypair 62723 cycles 57750 cycles 1.09
ML-KEM-768 encaps 75054 cycles 68963 cycles 1.09
ML-KEM-768 decaps 96720 cycles 88937 cycles 1.09
ML-KEM-1024 keypair 92949 cycles 85238 cycles 1.09
ML-KEM-1024 encaps 107828 cycles 98422 cycles 1.10
ML-KEM-1024 decaps 141106 cycles 128871 cycles 1.09

This comment was automatically generated by workflow using github-action-benchmark.

Copy link

@oqs-bot oqs-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Intel Xeon 3rd gen (c6i) (no-opt)'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.03.

Benchmark suite Current: 372c3ef Previous: ea2193a Ratio
ML-KEM-512 keypair 37535 cycles 35693 cycles 1.05
ML-KEM-512 encaps 46908 cycles 44458 cycles 1.06
ML-KEM-512 decaps 63045 cycles 59592 cycles 1.06
ML-KEM-768 keypair 62515 cycles 59467 cycles 1.05
ML-KEM-768 encaps 74847 cycles 71086 cycles 1.05
ML-KEM-768 decaps 96717 cycles 91771 cycles 1.05
ML-KEM-1024 keypair 92823 cycles 88374 cycles 1.05
ML-KEM-1024 encaps 107514 cycles 102244 cycles 1.05
ML-KEM-1024 decaps 141220 cycles 133901 cycles 1.05

This comment was automatically generated by workflow using github-action-benchmark.

Copy link

@oqs-bot oqs-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Intel Xeon 3rd gen (c6i)'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.15.

Benchmark suite Current: 10479e5 Previous: ea2193a Ratio
ML-KEM-512 keypair 16249 cycles 13949 cycles 1.16
ML-KEM-512 encaps 21007 cycles 18084 cycles 1.16
ML-KEM-512 decaps 28477 cycles 23909 cycles 1.19
ML-KEM-768 keypair 26449 cycles 22692 cycles 1.17
ML-KEM-768 encaps 29274 cycles 24353 cycles 1.20
ML-KEM-768 decaps 38266 cycles 32332 cycles 1.18
ML-KEM-1024 keypair 37967 cycles 32392 cycles 1.17
ML-KEM-1024 encaps 41924 cycles 35802 cycles 1.17
ML-KEM-1024 decaps 56315 cycles 47500 cycles 1.19

This comment was automatically generated by workflow using github-action-benchmark.

@potsrevennil potsrevennil marked this pull request as ready for review November 19, 2024 07:07
@potsrevennil potsrevennil added benchmark this PR should be benchmarked in CI and removed benchmark this PR should be benchmarked in CI labels Nov 19, 2024
@mkannwischer mkannwischer added benchmark this PR should be benchmarked in CI and removed benchmark this PR should be benchmarked in CI labels Nov 19, 2024
@potsrevennil potsrevennil added benchmark this PR should be benchmarked in CI and removed benchmark this PR should be benchmarked in CI labels Nov 19, 2024
Copy link

@oqs-bot oqs-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'AMD EPYC 4th gen (c7a)'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.02.

Benchmark suite Current: 10479e5 Previous: ea2193a Ratio
ML-KEM-512 encaps 20412 cycles 19713 cycles 1.04

This comment was automatically generated by workflow using github-action-benchmark.

@mkannwischer
Copy link
Contributor

Okay, we have to resolve the variance first before proceeding with the alerts.
I opened an issue for that: #429

Turning this into a draft PR for now.

@mkannwischer mkannwischer marked this pull request as draft November 20, 2024 00:28
@mkannwischer mkannwischer added benchmark this PR should be benchmarked in CI and removed benchmark this PR should be benchmarked in CI labels Nov 21, 2024
@hanno-becker
Copy link
Contributor

Variance should be fixed now that we have moved c7i to a metal instance. @potsrevennil Can you update this PR?

@potsrevennil potsrevennil added benchmark this PR should be benchmarked in CI and removed benchmark this PR should be benchmarked in CI labels Nov 25, 2024
@potsrevennil potsrevennil added benchmark this PR should be benchmarked in CI and removed benchmark this PR should be benchmarked in CI labels Nov 25, 2024
@potsrevennil potsrevennil added benchmark this PR should be benchmarked in CI and removed benchmark this PR should be benchmarked in CI labels Nov 25, 2024
@potsrevennil potsrevennil marked this pull request as ready for review November 25, 2024 07:18
@mkannwischer mkannwischer added benchmark this PR should be benchmarked in CI and removed benchmark this PR should be benchmarked in CI labels Nov 26, 2024
@mkannwischer mkannwischer added benchmark this PR should be benchmarked in CI and removed benchmark this PR should be benchmarked in CI labels Nov 26, 2024
The threshold is set to 103%, which means that if the previous benchmark
result is 100 cycles, then there should be an GH comment alert in the PR if
the benchmark result is > 103 cycles.

For the `comment-on-alert` to work on PR, we cannot skip the `store
benchmark result` step.
We could avoid pushing to `gh-pages` branch directly from PR by configuring
`auto-push` to `false` if not on `main` branch.

Signed-off-by: Thing-han, Lim <[email protected]>
Permission of pull_requests is required for leaving a comment on alert
on PR.

Permission of contents is required to be `write` when pushing to
gh-pages, originally set to `read` still worked might due to the write
permission had already been set somewhere else (repo/org-wise).

Signed-off-by: Thing-han, Lim <[email protected]>
Set default alert threshold to 103%

Signed-off-by: Thing-han, Lim <[email protected]>
If benchmark result is not pushed to gh-pages, on a consecutive
benchmark step, there will be a non-fast-forward git fetch error

Signed-off-by: Thing-han, Lim <[email protected]>
Copy link
Contributor

@mkannwischer mkannwischer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thanks @potsrevennil ! I tested this 3 times now and it's stable.

@mkannwischer mkannwischer added benchmark this PR should be benchmarked in CI and removed benchmark this PR should be benchmarked in CI labels Nov 26, 2024
@mkannwischer mkannwischer merged commit e8c00f3 into main Nov 26, 2024
67 checks passed
@mkannwischer mkannwischer deleted the bench-alert branch November 26, 2024 08:24
@hanno-becker
Copy link
Contributor

Thanks @potsrevennil !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
benchmark this PR should be benchmarked in CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show performance difference to main in benchmark output of CI
4 participants