Skip to content

Commit abf7241

Browse files
add: perftest-hw-runner
1 parent 15e50f6 commit abf7241

File tree

2 files changed

+124
-1
lines changed

2 files changed

+124
-1
lines changed

.github/tools/fio.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
set -e
3+
set -ex
44

55
OBJECT_URI=$1
66
BS=$2

.github/workflows/perftest.yml

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,3 +147,126 @@ jobs:
147147
./librawstor/.github/tools/git-commit-and-push.sh \
148148
./rawstor_bench \
149149
"add: perftest ${{ matrix.without-liburing }} ${{ matrix.scheme }} benchmarks"
150+
151+
152+
perftest-hw-runner:
153+
needs: perftest
154+
155+
runs-on: hw-runner
156+
157+
strategy:
158+
matrix:
159+
without-liburing:
160+
-
161+
- --without-liburing
162+
scheme:
163+
- file
164+
- ost
165+
bs:
166+
- 4k
167+
iodepth:
168+
- 1
169+
- 2
170+
numjobs:
171+
- 1
172+
include:
173+
- packages: liburing-dev
174+
without-liburing:
175+
- packages: liburing-dev
176+
scheme: ost
177+
without-liburing: --without-liburing
178+
- uri: file:///tmp/objects
179+
scheme: file
180+
- uri: ost://127.0.0.1:8080
181+
scheme: ost
182+
183+
184+
steps:
185+
- name: install dependencies
186+
run: |
187+
sudo apt-get update
188+
sudo apt-get install -y libxxhash-dev libtool pkg-config ${{ matrix.packages }}
189+
- uses: actions/checkout@v4
190+
with:
191+
path: librawstor
192+
- name: cleanup local
193+
run: rm -rf ./local
194+
- name: install librawstor
195+
run: |
196+
pushd .
197+
cd ./librawstor
198+
./autogen.sh
199+
./configure --prefix=${GITHUB_WORKSPACE}/local --disable-shared ${{ matrix.without-liburing }}
200+
make
201+
make install
202+
popd
203+
- uses: actions/checkout@v4
204+
if: "${{ matrix.scheme == 'ost' }}"
205+
with:
206+
repository: rawstor/rawstor_ost
207+
path: rawstor_ost
208+
ref: refs/heads/main
209+
ssh-key: ${{ secrets.RAWSTOR_OST_TOKEN }}
210+
- name: (ost) install rawstor_ost
211+
if: "${{ matrix.scheme == 'ost' }}"
212+
run: |
213+
pushd .
214+
cd ./rawstor_ost
215+
./autogen.sh
216+
./configure --prefix=${GITHUB_WORKSPACE}/local --disable-shared
217+
make
218+
make install
219+
popd
220+
- uses: actions/checkout@v4
221+
with:
222+
repository: rawstor/fio
223+
path: fio
224+
ref: refs/heads/rawstor
225+
- name: install fio
226+
run: |
227+
pushd .
228+
cd ./fio
229+
PKG_CONFIG_PATH=${GITHUB_WORKSPACE}/local/lib/pkgconfig ./configure --prefix=${GITHUB_WORKSPACE}/local
230+
make -j$(nproc)
231+
make install
232+
popd
233+
- name: (ost) start rawstor_ost
234+
if: "${{ matrix.scheme == 'ost' }}"
235+
run: |
236+
mkdir -p ${GITHUB_WORKSPACE}/objects
237+
truncate -s 2G ${GITHUB_WORKSPACE}/objects/01988675-e1e5-7788-9ed4-2f2d30910d23
238+
./local/bin/ost 8080 ${GITHUB_WORKSPACE}/objects/ &
239+
sleep 10
240+
- name: (file) create object
241+
if: "${{ matrix.scheme == 'file' }}"
242+
run: |
243+
object_uri=$(./local/bin/rawstor-cli create --uri=${{ matrix.uri }} --size=1)
244+
echo "OBJECT_URI=${object_uri}" >> $GITHUB_ENV
245+
- name: (ost) create object
246+
if: "${{ matrix.scheme == 'ost' }}"
247+
run: |
248+
object_uri=${{ matrix.uri }}/01988675-e1e5-7788-9ed4-2f2d30910d23
249+
echo "OBJECT_URI=${object_uri}" >> $GITHUB_ENV
250+
- name: fio
251+
run: |
252+
echo "# perftest-hw-runner" >> $GITHUB_STEP_SUMMARY
253+
echo "## fio ${{ matrix.without-liburing }} ${{ matrix.scheme }}" >> $GITHUB_STEP_SUMMARY
254+
echo "### bs=${{ matrix.bs }}, iodepth=${{ matrix.iodepth }}, numjobs=${{ matrix.numjobs }}" >> $GITHUB_STEP_SUMMARY
255+
PATH=${GITHUB_WORKSPACE}/local/bin:${PATH} ./librawstor/.github/tools/fio.sh \
256+
${OBJECT_URI} \
257+
${{ matrix.bs }} \
258+
${{ matrix.iodepth }} \
259+
${{ matrix.numjobs }} \
260+
fio.txt \
261+
fio.json
262+
echo \`\`\` >> $GITHUB_STEP_SUMMARY
263+
cat fio.txt >> $GITHUB_STEP_SUMMARY
264+
echo \`\`\` >> $GITHUB_STEP_SUMMARY
265+
- name: (file) remove object
266+
if: "${{ matrix.scheme == 'file' }}"
267+
run: ./local/bin/rawstor-cli remove --object-uri=${OBJECT_URI}
268+
- name: (ost) stop rawstor_ost
269+
if: "${{ matrix.scheme == 'ost' }}"
270+
run: |
271+
killall ost
272+
rm -rf ${GITHUB_WORKSPACE}/objects

0 commit comments

Comments
 (0)