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

feat: github proving benchmark #701

Merged
merged 12 commits into from
Nov 6, 2024
Merged

feat: github proving benchmark #701

merged 12 commits into from
Nov 6, 2024

Conversation

atanmarko
Copy link
Member

@atanmarko atanmarko commented Oct 4, 2024

Resolves #651

Here we download proving_benchmark_results.txt artifact form previous succesfull run.
We run the proving job with $BENCHMARK_WITNESS file.
We append the resulting time to the simple textual result file and upload it to artifacts repo.

Job is executed every night at 4AM and manually.

@atanmarko atanmarko added the ci label Oct 4, 2024
@atanmarko atanmarko added this to the Testing and Validation milestone Oct 4, 2024
@atanmarko atanmarko self-assigned this Oct 4, 2024
@atanmarko atanmarko force-pushed the feat/github-ci-benchmark branch 17 times, most recently from 14c9fda to f1fcb2d Compare October 4, 2024 14:06
@atanmarko atanmarko marked this pull request as ready for review October 4, 2024 14:36
@atanmarko atanmarko force-pushed the feat/github-ci-benchmark branch 3 times, most recently from 698e957 to 91001e8 Compare October 4, 2024 15:05
@sai-deng
Copy link
Contributor

sai-deng commented Oct 4, 2024

I think you can still use perf stat to capture CPU times (user and system time) in addition to the total wall clock time. This would give more granular insight into CPU performance.

@atanmarko
Copy link
Member Author

Making it draft until we find the appropriate testing data.

@atanmarko atanmarko marked this pull request as draft October 7, 2024 09:45
@atanmarko atanmarko marked this pull request as ready for review November 5, 2024 10:41
@atanmarko atanmarko removed the request for review from muursh November 5, 2024 11:49
.github/workflows/benchmark.yml Outdated Show resolved Hide resolved
jobs:
benchmark_proving:
name: Benchmark proving for representative blocks
runs-on: zero-reg
Copy link
Contributor

Choose a reason for hiding this comment

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

info: is there somewhere I can read about the different CI runners we have, and how they're spec'd out/intended to be used?

Copy link
Member Author

@atanmarko atanmarko Nov 6, 2024

Choose a reason for hiding this comment

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

This one is created by Ben for this particular benchmark. Best available.

.github/workflows/benchmark.yml Outdated Show resolved Hide resolved
.github/workflows/benchmark.yml Outdated Show resolved Hide resolved
.github/workflows/benchmark.yml Show resolved Hide resolved
Copy link
Contributor

@0xaatif 0xaatif left a comment

Choose a reason for hiding this comment

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

I think I'd prefer storing the data differently - how do you feel about saving off wide information as follows?

Get full information from time

/usr/bin/time \
  --format='{"command":"%C","avg_unshared_data_kb":%D,"elapsed_real_hms":"%E","pg_fault_io_major_ct":%F,"fs_inputs_ct":%I,"avg_mem_kb":%K,"max_rss_kb":%M,"fs_outputs_ct":%O,"cpu_pc":"%P","pg_fault_minor_ct":%R,"cpu_kernel_secs":%S,"cpu_user_secs":%U,"swap_ct":%W,"avg_shared_text_kb":%X,"system_pg_size_bytes":%Z,"ctx_switch_forced_ct":%c,"elapsed_real_secs":%e,"signals_recv_ct":%k,"avg_unshared_stack_kb":%p,"socket_recv_ct":%r,"socket_sent_ct":%s,"avg_rss_kb":%t,"ctx_switch_yield_ct":%w,"exit_status":%x}' \
  --output time.json \
  "$COMMAND" \
  "$ARGS"

Combine information as follows

{
  "commit": $hash,
  "date": $date,
  "runner": {
    "name": $runner,
    "cores": ...,
    "arch": ...,
  },
  "time": {
    // from time.json
  },
}

I would strongly prefer moving away from bash scripts too - can we do the above in xtask?

@atanmarko
Copy link
Member Author

@0xaatif I am fine to switch to xtask and switch from bash to Rust. Could we perform the switch as a separate task I'll open the ticker for?

Copy link
Contributor

@0xaatif 0xaatif left a comment

Choose a reason for hiding this comment

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

Ok let's just get something running then

Copy link
Collaborator

@Nashtare Nashtare left a comment

Choose a reason for hiding this comment

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

I'd also ideally have this process automated, flagging regressions directly but good as a first shot

@atanmarko
Copy link
Member Author

I'd also ideally have this process automated, flagging regressions directly but good as a first shot

Yes, switching to Rust processing of the results, I think we could raise some flags and alarms in case of regressions.

@atanmarko atanmarko merged commit 80e1e44 into develop Nov 6, 2024
23 checks passed
@atanmarko atanmarko deleted the feat/github-ci-benchmark branch November 6, 2024 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Add proof benchmarking in CI pipeline
4 participants