forked from juicedata/juicefs
-
Notifications
You must be signed in to change notification settings - Fork 0
162 lines (143 loc) · 4.97 KB
/
sysbench.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
name: "sysbench"
on:
schedule:
- cron: '30 20 * * *'
workflow_dispatch:
jobs:
sysbench:
strategy:
fail-fast: false
matrix:
meta: [ 'sqlite3', 'redis', 'mysql', 'tikv', 'tidb', 'postgres', 'mariadb', 'badger', 'fdb']
# meta: ['redis']
compress: [ 'lz4']
include:
- meta: 'redis'
compress: 'zstd'
- meta: 'redis'
compress: 'none'
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Set Variable
id: vars
run: |
if [ "${{matrix.meta}}" == "fdb" ]; then
echo "target=juicefs.fdb" >> $GITHUB_OUTPUT
else
echo "target=juicefs" >> $GITHUB_OUTPUT
fi
- name: Build
uses: ./.github/actions/build
with:
target: ${{steps.vars.outputs.target}}
- name: Prepare meta db
run: |
chmod +x .github/scripts/start_meta_engine.sh
source .github/scripts/start_meta_engine.sh
start_meta_engine ${{matrix.meta}}
meta_url=$(get_meta_url ${{matrix.meta}})
create_database $meta_url
- name: Setup minio
run: |
docker run -d -p 19000:9000 --name minio \
-e "MINIO_ACCESS_KEY=minioadmin" \
-e "MINIO_SECRET_KEY=minioadmin" \
-v /tmp/data:/data \
-v /tmp/config:/root/.minio \
minio/minio server /data
sleep 5
- name: Juicefs Format
run: |
source .github/scripts/start_meta_engine.sh
meta_url=$(get_meta_url ${{matrix.meta}})
sudo ./juicefs format --trash-days 0 --compress ${{matrix.compress}} --storage minio --bucket http://127.0.0.1:19000/mypics \
--access-key minioadmin \
--secret-key minioadmin \
$meta_url pics
- name: Juicefs Mount
run: |
source .github/scripts/start_meta_engine.sh
meta_url=$(get_meta_url ${{matrix.meta}})
sudo ./juicefs mount -d $meta_url /jfs --no-usage-report &
- name: Install Sysbench
run: |
curl -s https://packagecloud.io/install/repositories/akopytov/sysbench/script.deb.sh | sudo bash
sudo .github/scripts/apt_install.sh sysbench
sudo pip install mysqlclient
date +%Y_%m_%d_%H_%M_%S > /tmp/datetime
- name: seq read 1M
uses: ./.github/actions/sysbench
with:
mysql_password: ${{secrets.MYSQL_PASSWORD_FOR_JUICEDATA}}
file_num: 1000
file_total_size: '1G'
file_test_mode: 'seqrd'
meta: ${{matrix.meta}}
storage: 'minio'
name: 'sysbench_seq_read_1m'
compress: ${{matrix.compress}}
- name: seq write 1M
uses: ./.github/actions/sysbench
with:
mysql_password: ${{secrets.MYSQL_PASSWORD_FOR_JUICEDATA}}
file_num: 1000
file_total_size: '1G'
file_test_mode: 'seqwr'
meta: ${{matrix.meta}}
storage: 'minio'
name: 'sysbench_seq_write_1m'
compress: ${{matrix.compress}}
- name: seq read 100K
uses: ./.github/actions/sysbench
with:
mysql_password: ${{secrets.MYSQL_PASSWORD_FOR_JUICEDATA}}
file_num: 10000
file_total_size: '1G'
file_test_mode: 'seqrd'
meta: ${{matrix.meta}}
storage: 'minio'
name: 'sysbench_seq_read_100k'
compress: ${{matrix.compress}}
- name: seq write 100K
uses: ./.github/actions/sysbench
with:
mysql_password: ${{secrets.MYSQL_PASSWORD_FOR_JUICEDATA}}
file_num: 10000
file_total_size: '1G'
file_test_mode: 'seqwr'
meta: ${{matrix.meta}}
storage: 'minio'
name: 'sysbench_seq_write_100k'
compress: ${{matrix.compress}}
- name: random readwrite 1M
uses: ./.github/actions/sysbench
with:
mysql_password: ${{secrets.MYSQL_PASSWORD_FOR_JUICEDATA}}
file_num: 1000
file_total_size: '1G'
file_test_mode: 'rndrw'
meta: ${{matrix.meta}}
storage: 'minio'
name: 'sysbench_rand_rw_1m'
compress: ${{matrix.compress}}
- name: random readwrite 100K
uses: ./.github/actions/sysbench
with:
mysql_password: ${{secrets.MYSQL_PASSWORD_FOR_JUICEDATA}}
file_num: 10000
file_total_size: '1G'
file_test_mode: 'rndrw'
meta: ${{matrix.meta}}
storage: 'minio'
name: 'sysbench_rand_rw_100k'
compress: ${{matrix.compress}}
- name: Send Slack Notification
if: ${{ failure() }}
uses: juicedata/slack-notify-action@main
with:
channel-id: "${{ secrets.SLACK_CHANNEL_ID_FOR_PR_CHECK_NOTIFY }}"
slack_bot_token: "${{ secrets.SLACK_BOT_TOKEN }}"