|
| 1 | +# SPDX-License-Identifier: Apache-2.0 |
| 2 | +# SPDX-FileCopyrightText: Copyright the Vortex contributors |
| 3 | + |
| 4 | +name: S3 Measurements |
| 5 | + |
| 6 | +on: |
| 7 | + workflow_dispatch: |
| 8 | + inputs: |
| 9 | + windows: |
| 10 | + description: "Measurement windows, three hours apart, then stop" |
| 11 | + type: choice |
| 12 | + options: ["4", "1", "2", "3"] |
| 13 | + default: "4" |
| 14 | + push: |
| 15 | + branches: ["ji/s3-measurements"] |
| 16 | + paths: |
| 17 | + - .github/workflows/s3-measurements.yml |
| 18 | + - vortex-bench/src/bin/s3-measure.rs |
| 19 | + - benchmarks/s3/** |
| 20 | + |
| 21 | +permissions: |
| 22 | + contents: read |
| 23 | + id-token: write |
| 24 | + |
| 25 | +concurrency: |
| 26 | + group: s3-measurements-${{ github.ref }} |
| 27 | + cancel-in-progress: false |
| 28 | + |
| 29 | +jobs: |
| 30 | + collect: |
| 31 | + timeout-minutes: 780 |
| 32 | + runs-on: runs-on=${{ github.run_id }}/runner=bench-dedicated/family=c8gd.16xlarge/spot=false/image=ubuntu24-full-arm64-pre-v2/tag=s3-measure/extras=s3-cache |
| 33 | + env: |
| 34 | + AWS_REGION: us-east-1 |
| 35 | + REMOTE_ROOT: s3://vortex-ci-benchmark-datasets/s3-measurements/${{ github.run_id }}-${{ github.run_attempt }} |
| 36 | + MEASUREMENT_WINDOWS: ${{ inputs.windows || '1' }} |
| 37 | + S3_PROBE_ARGS: >- |
| 38 | + --sizes 4096,65536,262144,1048576,8388608 --concurrency 1,4,16,64 |
| 39 | + --requests 64 --rounds 3 --warmup-seconds 20 --timeout-seconds 60 |
| 40 | + steps: |
| 41 | + - uses: runs-on/action@v2 |
| 42 | + with: |
| 43 | + sccache: s3 |
| 44 | + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 |
| 45 | + - uses: ./.github/actions/setup-prebuild |
| 46 | + with: |
| 47 | + enable-sccache: "true" |
| 48 | + - uses: ./.github/actions/system-info |
| 49 | + - name: Build collector |
| 50 | + run: cargo build --locked -p vortex-bench --bin s3-measure --release |
| 51 | + - uses: aws-actions/configure-aws-credentials@e1253824e5c10ff9df46874f81ed3ec929e19cfd # v6 |
| 52 | + with: |
| 53 | + role-to-assume: arn:aws:iam::245040174862:role/GitHubBenchmarkRole |
| 54 | + aws-region: us-east-1 |
| 55 | + role-duration-seconds: 7200 |
| 56 | + - name: Verify region and create immutable probe objects |
| 57 | + run: | |
| 58 | + region=$(curl --silent --show-error --head --max-time 20 https://vortex-ci-benchmark-datasets.s3.amazonaws.com/ | |
| 59 | + awk 'tolower($1) == "x-amz-bucket-region:" {gsub("\r", "", $2); print $2}') |
| 60 | + test "$region" = "$AWS_REGION" |
| 61 | + test "$RUNS_ON_AWS_REGION" = "$AWS_REGION" |
| 62 | + python3 benchmarks/s3/create_probe.py |
| 63 | + for object in 1 2 3 4; do |
| 64 | + aws s3 cp s3-probe.bin "$REMOTE_ROOT/probe-$object.bin" |
| 65 | + done |
| 66 | + - name: Initialize the fixed measurement schedule |
| 67 | + id: schedule |
| 68 | + run: >- |
| 69 | + python3 benchmarks/s3/measure.py --source "$REMOTE_ROOT/" |
| 70 | + --count "$MEASUREMENT_WINDOWS" --seed 20261028 --initialize -- $S3_PROBE_ARGS |
| 71 | + - name: Collect window 1 |
| 72 | + continue-on-error: true |
| 73 | + run: >- |
| 74 | + python3 benchmarks/s3/measure.py --source "$REMOTE_ROOT/" |
| 75 | + --count "$MEASUREMENT_WINDOWS" --seed 20261028 --run-window 1 -- $S3_PROBE_ARGS |
| 76 | + - name: Wait for window 2 |
| 77 | + if: ${{ !cancelled() && steps.schedule.outcome == 'success' && fromJSON(env.MEASUREMENT_WINDOWS) >= 2 }} |
| 78 | + run: >- |
| 79 | + python3 benchmarks/s3/measure.py --source "$REMOTE_ROOT/" |
| 80 | + --count "$MEASUREMENT_WINDOWS" --seed 20261028 --wait-window 2 -- $S3_PROBE_ARGS |
| 81 | + - name: Configure credentials for window 2 |
| 82 | + if: ${{ !cancelled() && steps.schedule.outcome == 'success' && fromJSON(env.MEASUREMENT_WINDOWS) >= 2 }} |
| 83 | + uses: aws-actions/configure-aws-credentials@e1253824e5c10ff9df46874f81ed3ec929e19cfd # v6 |
| 84 | + with: |
| 85 | + role-to-assume: arn:aws:iam::245040174862:role/GitHubBenchmarkRole |
| 86 | + aws-region: us-east-1 |
| 87 | + role-duration-seconds: 7200 |
| 88 | + - name: Collect window 2 |
| 89 | + if: ${{ !cancelled() && steps.schedule.outcome == 'success' && fromJSON(env.MEASUREMENT_WINDOWS) >= 2 }} |
| 90 | + continue-on-error: true |
| 91 | + run: >- |
| 92 | + python3 benchmarks/s3/measure.py --source "$REMOTE_ROOT/" |
| 93 | + --count "$MEASUREMENT_WINDOWS" --seed 20261028 --run-window 2 -- $S3_PROBE_ARGS |
| 94 | + - name: Wait for window 3 |
| 95 | + if: ${{ !cancelled() && steps.schedule.outcome == 'success' && fromJSON(env.MEASUREMENT_WINDOWS) >= 3 }} |
| 96 | + run: >- |
| 97 | + python3 benchmarks/s3/measure.py --source "$REMOTE_ROOT/" |
| 98 | + --count "$MEASUREMENT_WINDOWS" --seed 20261028 --wait-window 3 -- $S3_PROBE_ARGS |
| 99 | + - name: Configure credentials for window 3 |
| 100 | + if: ${{ !cancelled() && steps.schedule.outcome == 'success' && fromJSON(env.MEASUREMENT_WINDOWS) >= 3 }} |
| 101 | + uses: aws-actions/configure-aws-credentials@e1253824e5c10ff9df46874f81ed3ec929e19cfd # v6 |
| 102 | + with: |
| 103 | + role-to-assume: arn:aws:iam::245040174862:role/GitHubBenchmarkRole |
| 104 | + aws-region: us-east-1 |
| 105 | + role-duration-seconds: 7200 |
| 106 | + - name: Collect window 3 |
| 107 | + if: ${{ !cancelled() && steps.schedule.outcome == 'success' && fromJSON(env.MEASUREMENT_WINDOWS) >= 3 }} |
| 108 | + continue-on-error: true |
| 109 | + run: >- |
| 110 | + python3 benchmarks/s3/measure.py --source "$REMOTE_ROOT/" |
| 111 | + --count "$MEASUREMENT_WINDOWS" --seed 20261028 --run-window 3 -- $S3_PROBE_ARGS |
| 112 | + - name: Wait for window 4 |
| 113 | + if: ${{ !cancelled() && steps.schedule.outcome == 'success' && fromJSON(env.MEASUREMENT_WINDOWS) >= 4 }} |
| 114 | + run: >- |
| 115 | + python3 benchmarks/s3/measure.py --source "$REMOTE_ROOT/" |
| 116 | + --count "$MEASUREMENT_WINDOWS" --seed 20261028 --wait-window 4 -- $S3_PROBE_ARGS |
| 117 | + - name: Configure credentials for window 4 |
| 118 | + if: ${{ !cancelled() && steps.schedule.outcome == 'success' && fromJSON(env.MEASUREMENT_WINDOWS) >= 4 }} |
| 119 | + uses: aws-actions/configure-aws-credentials@e1253824e5c10ff9df46874f81ed3ec929e19cfd # v6 |
| 120 | + with: |
| 121 | + role-to-assume: arn:aws:iam::245040174862:role/GitHubBenchmarkRole |
| 122 | + aws-region: us-east-1 |
| 123 | + role-duration-seconds: 7200 |
| 124 | + - name: Collect window 4 |
| 125 | + if: ${{ !cancelled() && steps.schedule.outcome == 'success' && fromJSON(env.MEASUREMENT_WINDOWS) >= 4 }} |
| 126 | + continue-on-error: true |
| 127 | + run: >- |
| 128 | + python3 benchmarks/s3/measure.py --source "$REMOTE_ROOT/" |
| 129 | + --count "$MEASUREMENT_WINDOWS" --seed 20261028 --run-window 4 -- $S3_PROBE_ARGS |
| 130 | + - name: Require all requested windows and summarize |
| 131 | + if: ${{ always() && steps.schedule.outcome == 'success' }} |
| 132 | + run: >- |
| 133 | + python3 benchmarks/s3/measure.py --source "$REMOTE_ROOT/" |
| 134 | + --count "$MEASUREMENT_WINDOWS" --seed 20261028 --summarize -- $S3_PROBE_ARGS |
| 135 | + - name: Preserve raw requests, manifests, schedule and median/p90 tables |
| 136 | + if: always() |
| 137 | + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7 |
| 138 | + with: |
| 139 | + name: s3-measurements-${{ github.run_attempt }} |
| 140 | + path: s3-measurements/ |
| 141 | + retention-days: 30 |
| 142 | + - name: Refresh credentials for cleanup |
| 143 | + if: always() |
| 144 | + uses: aws-actions/configure-aws-credentials@e1253824e5c10ff9df46874f81ed3ec929e19cfd # v6 |
| 145 | + with: |
| 146 | + role-to-assume: arn:aws:iam::245040174862:role/GitHubBenchmarkRole |
| 147 | + aws-region: us-east-1 |
| 148 | + - name: Remove this run's probe objects |
| 149 | + if: always() |
| 150 | + run: aws s3 rm --recursive "$REMOTE_ROOT/" |
0 commit comments