-
Notifications
You must be signed in to change notification settings - Fork 180
178 lines (170 loc) · 6.99 KB
/
bench_s3express.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
name: Benchmark (s3-express one zone)
# We use environments to require approval to run benchmarks on PRs, but not on pushes to `main`
# (which have been approved already since PRs are required for `main`).
on:
workflow_call:
inputs:
environment:
type: string
publish:
type: boolean
default: false
ref:
required: true
type: string
s3_bench_results_prefix:
type: string
env:
RUST_BACKTRACE: 1
CARGO_TERM_COLOR: always
S3_BUCKET_NAME: ${{ vars.S3_EXPRESS_ONE_ZONE_BENCH_BUCKET_NAME }}
S3_BUCKET_TEST_PREFIX: ${{ vars.S3_BUCKET_BENCH_PREFIX || 'mountpoint-benchmark/' }}
S3_BUCKET_BENCH_FILE: ${{ vars.BENCH_FILE_NAME || 'bench100GB.bin' }}
S3_BUCKET_SMALL_BENCH_FILE: ${{ vars.SMALL_BENCH_FILE_NAME || 'bench5MB.bin' }}
# Optional endpoint url, can be empty
S3_ENDPOINT_URL: ${{ vars.S3_EXPRESS_ONE_ZONE_BENCH_ENDPOINT_URL }}
S3_REGION: ${{ vars.S3_BENCH_REGION }}
jobs:
bench:
name: Benchmark (Throughput)
runs-on: [self-hosted, linux, x64, nvme-high-performance]
environment: ${{ inputs.environment }}
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ vars.ACTIONS_BENCH_IAM_ROLE }}
aws-region: ${{ vars.S3_BENCH_REGION }}
role-duration-seconds: 21600
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
submodules: true
persist-credentials: false
- name: Install operating system dependencies
uses: ./.github/actions/install-dependencies
with:
fuseVersion: 2
libunwind: true
fio: true
- name: Set up Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
# setup-rust-toolchain sets "-D warnings" by default, and Rust treats any warning as compile error.
# We need to this currently because `vendor/fuser` contains some warnings and it breaks the build.
rustflags: ""
- name: Build
run: cargo build --release
- name: Run Benchmark
run: mountpoint-s3/scripts/fs_bench.sh
- name: Save benchmark results in S3
if: inputs.s3_bench_results_prefix
run: .github/actions/scripts/save-benchmark-results.sh
env:
S3_BENCH_REGION: ${{ vars.S3_BENCH_REGION }}
S3_BENCH_BUCKET_NAME: ${{ vars.S3_BENCH_RESULTS_BUCKET_NAME }}
S3_BENCH_RESULTS_PREFIX: ${{ inputs.s3_bench_results_prefix }}/${{ github.job }}
COMMIT_ID: ${{ inputs.ref }}
- name: Check benchmark results
uses: benchmark-action/github-action-benchmark@v1
with:
name: Throughput Benchmark (S3 Express One Zone)
tool: 'customBiggerIsBetter'
output-file-path: results/output.json
benchmark-data-dir-path: dev/s3-express/bench
alert-threshold: "200%"
fail-on-alert: true
# GitHub API token to make a commit comment
github-token: ${{ secrets.GITHUB_TOKEN }}
# Make sure to add this chart to the step provisioning static content and pushing the changes
auto-push: false
comment-on-alert: true
max-items-in-chart: 20
summary-always: true
- name: Check resource utilization
uses: benchmark-action/github-action-benchmark@v1
with:
name: Throughput Benchmark - Peak Memory Usage (S3 Express One Zone)
tool: 'customSmallerIsBetter'
output-file-path: results/peak_mem_usage.json
benchmark-data-dir-path: dev/s3-express/bench/peak_mem_usage
alert-threshold: "200%"
fail-on-alert: false
# GitHub API token to make a commit comment
github-token: ${{ secrets.GITHUB_TOKEN }}
# Make sure to add this chart to the step provisioning static content and pushing the changes
auto-push: false
comment-on-alert: false
max-items-in-chart: 20
skip-fetch-gh-pages: true
summary-always: true
- name: Provision static content and push benchmark results
# Store the results and deploy GitHub pages if the results are from main branch
if: ${{ inputs.publish }}
run: |
.github/actions/scripts/copy-static-files.sh dev/s3-express/bench dev/s3-express/bench/peak_mem_usage
git push 'https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git' gh-pages:gh-pages
latency-bench:
name: Benchmark (Latency)
runs-on: [self-hosted, linux, x64, nvme-high-performance]
environment: ${{ inputs.environment }}
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ vars.ACTIONS_BENCH_IAM_ROLE }}
aws-region: ${{ vars.S3_BENCH_REGION }}
role-duration-seconds: 21600
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
submodules: true
persist-credentials: false
- name: Install operating system dependencies
uses: ./.github/actions/install-dependencies
with:
fuseVersion: 2
libunwind: true
fio: true
- name: Set up Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
# setup-rust-toolchain sets "-D warnings" by default, and Rust treats any warning as compile error.
# We need to this currently because `vendor/fuser` contains some warnings and it breaks the build.
rustflags: ""
- name: Build
run: cargo build --release
- name: Run Benchmark
run: mountpoint-s3/scripts/fs_latency_bench.sh
- name: Save benchmark results in S3
if: inputs.s3_bench_results_prefix
run: .github/actions/scripts/save-benchmark-results.sh
env:
S3_BENCH_REGION: ${{ vars.S3_BENCH_REGION }}
S3_BENCH_BUCKET_NAME: ${{ vars.S3_BENCH_RESULTS_BUCKET_NAME }}
S3_BENCH_RESULTS_PREFIX: ${{ inputs.s3_bench_results_prefix }}/${{ github.job }}
COMMIT_ID: ${{ inputs.ref }}
- name: Check benchmark results
uses: benchmark-action/github-action-benchmark@v1
with:
name: Latency Benchmark (S3 Express One Zone)
tool: 'customSmallerIsBetter'
output-file-path: results/output.json
benchmark-data-dir-path: dev/s3-express/latency_bench
alert-threshold: "200%"
fail-on-alert: true
# GitHub API token to make a commit comment
github-token: ${{ secrets.GITHUB_TOKEN }}
# Make sure to add this chart to the step provisioning static content and pushing the changes
auto-push: false
comment-on-alert: false
max-items-in-chart: 20
summary-always: true
- name: Provision static content and push benchmark results
# Store the results and deploy GitHub pages if the results are from main branch
if: ${{ inputs.publish }}
run: |
.github/actions/scripts/copy-static-files.sh dev/s3-express/latency_bench
git push 'https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git' gh-pages:gh-pages