Skip to content

Commit

Permalink
Added vdbench consistency check and result check (#4431)
Browse files Browse the repository at this point in the history
  • Loading branch information
YunhuiChen authored Feb 29, 2024
1 parent 83b2ba2 commit 97c42f4
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/resources/vdbench_big_file.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
data_errors=1
fsd=fsd1,anchor=/tmp/vdbench/vdbench-big,depth=1,width=1,files=4,size=1g,openflags=o_direct

fwd=fwd1,fsd=fsd1,operation=write,xfersize=1m,fileio=sequential,fileselect=sequential,threads=4
fwd=fwd2,fsd=fsd1,operation=read,xfersize=1m,fileio=sequential,fileselect=sequential,threads=4

rd=rd1,fwd=fwd1,fwdrate=max,format=restart,elapsed=10,interval=1
rd=rd2,fwd=fwd2,fwdrate=max,format=restart,elapsed=10,interval=1
rd=rd2,fwd=fwd2,fwdrate=max,format=restart,elapsed=10,interval=1
4 changes: 4 additions & 0 deletions .github/workflows/resources/vdbench_long_run.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
data_errors=1
fsd=fsd1,anchor=/tmp/vdbench/long-run,depth=1,width=10,files=5,sizes=(100m,0),shared=yes,openflags=o_direct
fwd=fwd1,fsd=fsd1,threads=10,xfersize=(512,20,4k,20,64k,20,512k,20,1024k,20),fileio=random,fileselect=random,rdpct=50
rd=rd1,fwd=fwd*,fwdrate=max,format=restart,elapsed=2000,interval=1
3 changes: 2 additions & 1 deletion .github/workflows/resources/vdbench_small_file.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
data_errors=1
fsd=fsd1,anchor=/tmp/vdbench/vdbench-small,depth=3,width=10,files=10,size=128k,openflags=o_direct

fwd=fwd1,fsd=fsd1,operation=write,xfersize=128k,fileio=random,fileselect=random,threads=4
Expand All @@ -6,4 +7,4 @@ fwd=fwd3,fsd=fsd1,rdpct=70,xfersize=128k,fileio=random,fileselect=random,threads

rd=rd1,fwd=fwd1,fwdrate=max,format=restart,elapsed=60,interval=1
rd=rd2,fwd=fwd2,fwdrate=max,format=restart,elapsed=60,interval=1
rd=rd3,fwd=fwd3,fwdrate=max,format=restart,elapsed=60,interval=1
rd=rd3,fwd=fwd3,fwdrate=max,format=restart,elapsed=60,interval=1
63 changes: 60 additions & 3 deletions .github/workflows/vdbench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,22 @@ jobs:
meta_url=$(get_meta_url ${{matrix.meta}})
./juicefs format $meta_url vdbench-big --storage minio --bucket http://127.0.0.1:19000/mypics --access-key minioadmin --secret-key minioadmin
./juicefs mount -d $meta_url /tmp/vdbench --no-usage-report
vdbench/vdbench -f .github/workflows/resources/vdbench_big_file.conf
vdbench/vdbench -f .github/workflows/resources/vdbench_big_file.conf -jn
- uses: actions/upload-artifact@v3
with:
name: output-big
path: output

- name: check vdbench log
if: always()
shell: bash
run: |
grep -i "java.lang.RuntimeException" output/errorlog.html && exit 1 || true
if ! grep -q "Vdbench execution completed successfully" output/logfile.html; then
echo "vdbench not completed succeed"
exit 1
fi
- name: Clean
run: |
Expand All @@ -93,20 +103,67 @@ jobs:
meta_url=$(get_meta_url ${{matrix.meta}})
./juicefs format $meta_url vdbench-small --storage minio --bucket http://127.0.0.1:19000/mypics --access-key minioadmin --secret-key minioadmin
./juicefs mount -d $meta_url /tmp/vdbench --no-usage-report
vdbench/vdbench -f .github/workflows/resources/vdbench_small_file.conf
vdbench/vdbench -f .github/workflows/resources/vdbench_small_file.conf -jn
- uses: actions/upload-artifact@v3
with:
name: output-small
path: output

- name: check vdbench log
if: always()
shell: bash
run: |
grep -i "java.lang.RuntimeException" output/errorlog.html && exit 1 || true
if ! grep -q "Vdbench execution completed successfully" output/logfile.html; then
echo "vdbench not completed succeed"
exit 1
fi
- name: Clean
run: |
source .github/scripts/start_meta_engine.sh
meta_url=$(get_meta_url ${{matrix.meta}})
rm /var/jfsCache/ -rf || true
if [ -d /tmp/vdbench ]; then
./juicefs umount /tmp/vdbench || true
fi
uuid=$(./juicefs status $meta_url | grep UUID | cut -d '"' -f 4) || true
if [ -n "$uuid" ];then
sudo ./juicefs destroy --yes $meta_url $uuid
fi
- name: vdbench-long-time
shell: bash
run: |
source .github/scripts/start_meta_engine.sh
meta_url=$(get_meta_url ${{matrix.meta}})
./juicefs format $meta_url vdbench-long-time --storage minio --bucket http://127.0.0.1:19000/mypics --access-key minioadmin --secret-key minioadmin
./juicefs mount -d $meta_url /tmp/vdbench --no-usage-report
vdbench/vdbench -f .github/workflows/resources/vdbench_long_time.conf -jn
- uses: actions/upload-artifact@v3
with:
name: output-big
path: output

- name: check vdbench log
if: always()
shell: bash
run: |
grep -i "java.lang.RuntimeException" output/errorlog.html && exit 1 || true
if ! grep -q "Vdbench execution completed successfully" output/logfile.html; then
echo "vdbench not completed succeed"
exit 1
fi
- name: log
if: always()
shell: bash
run: |
tail -300 ~/.juicefs/juicefs.log
grep "<FATAL>:" ~/.juicefs/juicefs.log && exit 1 || true
- name: Send Slack Notification
if: failure()
uses: juicedata/slack-notify-action@main
Expand Down

0 comments on commit 97c42f4

Please sign in to comment.