mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-26 19:03:27 +00:00
Add Redis benchmark CI
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
b5610f3034
commit
88939f2a4c
5
.github/workflows/benchmark_asterinas.yml
vendored
5
.github/workflows/benchmark_asterinas.yml
vendored
@ -65,6 +65,11 @@ jobs:
|
|||||||
- lmbench/udp_loopback_lat
|
- lmbench/udp_loopback_lat
|
||||||
- iperf3/tcp_virtio_bw
|
- iperf3/tcp_virtio_bw
|
||||||
- nginx/http_req10k_conc1_bw
|
- nginx/http_req10k_conc1_bw
|
||||||
|
# Redis benchmarks
|
||||||
|
- redis/ping_inline_100k_conc20_rps
|
||||||
|
- redis/ping_mbulk_100k_conc20_rps
|
||||||
|
- redis/get_100k_conc20_rps
|
||||||
|
- redis/set_100k_conc20_rps
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
container:
|
container:
|
||||||
|
@ -70,7 +70,7 @@ run_benchmark() {
|
|||||||
-drive if=none,format=raw,id=x0,file=${BENCHMARK_DIR}/../build/ext2.img \
|
-drive if=none,format=raw,id=x0,file=${BENCHMARK_DIR}/../build/ext2.img \
|
||||||
-device virtio-blk-pci,bus=pcie.0,addr=0x6,drive=x0,serial=vext2,disable-legacy=on,disable-modern=off,queue-size=64,num-queues=1,config-wce=off,request-merging=off,write-cache=off,backend_defaults=off,discard=off,event_idx=off,indirect_desc=off,ioeventfd=off,queue_reset=off \
|
-device virtio-blk-pci,bus=pcie.0,addr=0x6,drive=x0,serial=vext2,disable-legacy=on,disable-modern=off,queue-size=64,num-queues=1,config-wce=off,request-merging=off,write-cache=off,backend_defaults=off,discard=off,event_idx=off,indirect_desc=off,ioeventfd=off,queue_reset=off \
|
||||||
-append 'console=ttyS0 rdinit=/benchmark/common/bench_runner.sh ${benchmark} linux mitigations=off hugepages=0 transparent_hugepage=never quiet' \
|
-append 'console=ttyS0 rdinit=/benchmark/common/bench_runner.sh ${benchmark} linux mitigations=off hugepages=0 transparent_hugepage=never quiet' \
|
||||||
-netdev user,id=net01,hostfwd=tcp::5201-:5201,hostfwd=tcp::8080-:8080,hostfwd=tcp::31234-:31234 \
|
-netdev user,id=net01,hostfwd=tcp::5201-:5201,hostfwd=tcp::6379-:6379,hostfwd=tcp::8080-:8080,hostfwd=tcp::31234-:31234 \
|
||||||
-device virtio-net-pci,netdev=net01,disable-legacy=on,disable-modern=off,mrg_rxbuf=off,ctrl_rx=off,ctrl_rx_extra=off,ctrl_vlan=off,ctrl_vq=off,ctrl_guest_offloads=off,ctrl_mac_addr=off,event_idx=off,queue_reset=off,guest_announce=off,indirect_desc=off \
|
-device virtio-net-pci,netdev=net01,disable-legacy=on,disable-modern=off,mrg_rxbuf=off,ctrl_rx=off,ctrl_rx_extra=off,ctrl_vlan=off,ctrl_vq=off,ctrl_guest_offloads=off,ctrl_mac_addr=off,event_idx=off,queue_reset=off,guest_announce=off,indirect_desc=off \
|
||||||
-nographic \
|
-nographic \
|
||||||
2>&1"
|
2>&1"
|
||||||
|
9
test/benchmark/redis/get_100k_conc20_rps/config.json
Normal file
9
test/benchmark/redis/get_100k_conc20_rps/config.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"alert_threshold": "125%",
|
||||||
|
"alert_tool": "customBiggerIsBetter",
|
||||||
|
"search_pattern": "throughput summary:",
|
||||||
|
"result_index": "3",
|
||||||
|
"description": "redis-benchmark -n 100000 -c 20 -t get",
|
||||||
|
"title": "Redis GET performance with 20 concurrency and 100000 requests in total",
|
||||||
|
"benchmark_type": "host_guest"
|
||||||
|
}
|
19
test/benchmark/redis/get_100k_conc20_rps/host.sh
Executable file
19
test/benchmark/redis/get_100k_conc20_rps/host.sh
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Function to stop the guest VM
|
||||||
|
stop_guest() {
|
||||||
|
echo "Stopping guest VM..."
|
||||||
|
pgrep qemu | xargs kill
|
||||||
|
}
|
||||||
|
|
||||||
|
# Trap EXIT signal to ensure guest VM is stopped on script exit
|
||||||
|
trap stop_guest EXIT
|
||||||
|
|
||||||
|
# Run apache bench
|
||||||
|
/usr/local/redis/bin/redis-benchmark -n 100000 -c 20 -t get
|
||||||
|
|
||||||
|
# The trap will automatically stop the guest VM when the script exits
|
@ -0,0 +1,14 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "Average RPS of GET over virtio-net between Host Linux and Guest Linux",
|
||||||
|
"unit": "request per second",
|
||||||
|
"value": 0,
|
||||||
|
"extra": "linux_result"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Average RPS of GET over virtio-net between Host Linux and Guest Asterinas",
|
||||||
|
"unit": "request per second",
|
||||||
|
"value": 0,
|
||||||
|
"extra": "aster_result"
|
||||||
|
}
|
||||||
|
]
|
8
test/benchmark/redis/get_100k_conc20_rps/run.sh
Normal file
8
test/benchmark/redis/get_100k_conc20_rps/run.sh
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo "Running redis server"
|
||||||
|
/usr/local/redis/bin/redis-server /etc/redis.conf
|
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"alert_threshold": "125%",
|
||||||
|
"alert_tool": "customBiggerIsBetter",
|
||||||
|
"search_pattern": "throughput summary:",
|
||||||
|
"result_index": "3",
|
||||||
|
"description": "redis-benchmark -n 100000 -c 20 -t ping_inline",
|
||||||
|
"title": "Redis PING INLINE performance with 20 concurrency and 100000 requests in total",
|
||||||
|
"benchmark_type": "host_guest"
|
||||||
|
}
|
19
test/benchmark/redis/ping_inline_100k_conc20_rps/host.sh
Executable file
19
test/benchmark/redis/ping_inline_100k_conc20_rps/host.sh
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Function to stop the guest VM
|
||||||
|
stop_guest() {
|
||||||
|
echo "Stopping guest VM..."
|
||||||
|
pgrep qemu | xargs kill
|
||||||
|
}
|
||||||
|
|
||||||
|
# Trap EXIT signal to ensure guest VM is stopped on script exit
|
||||||
|
trap stop_guest EXIT
|
||||||
|
|
||||||
|
# Run apache bench
|
||||||
|
/usr/local/redis/bin/redis-benchmark -n 100000 -c 20 -t ping_inline
|
||||||
|
|
||||||
|
# The trap will automatically stop the guest VM when the script exits
|
@ -0,0 +1,14 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "Average RPS of PING_INLINE over virtio-net between Host Linux and Guest Linux",
|
||||||
|
"unit": "request per second",
|
||||||
|
"value": 0,
|
||||||
|
"extra": "linux_result"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Average RPS of PING_INLINE over virtio-net between Host Linux and Guest Asterinas",
|
||||||
|
"unit": "request per second",
|
||||||
|
"value": 0,
|
||||||
|
"extra": "aster_result"
|
||||||
|
}
|
||||||
|
]
|
8
test/benchmark/redis/ping_inline_100k_conc20_rps/run.sh
Normal file
8
test/benchmark/redis/ping_inline_100k_conc20_rps/run.sh
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo "Running redis server"
|
||||||
|
/usr/local/redis/bin/redis-server /etc/redis.conf
|
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"alert_threshold": "125%",
|
||||||
|
"alert_tool": "customBiggerIsBetter",
|
||||||
|
"search_pattern": "throughput summary:",
|
||||||
|
"result_index": "3",
|
||||||
|
"description": "redis-benchmark -n 100000 -c 20 -t ping_mbulk",
|
||||||
|
"title": "Redis PING MBULK performance with 20 concurrency and 100000 requests in total",
|
||||||
|
"benchmark_type": "host_guest"
|
||||||
|
}
|
19
test/benchmark/redis/ping_mbulk_100k_conc20_rps/host.sh
Executable file
19
test/benchmark/redis/ping_mbulk_100k_conc20_rps/host.sh
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Function to stop the guest VM
|
||||||
|
stop_guest() {
|
||||||
|
echo "Stopping guest VM..."
|
||||||
|
pgrep qemu | xargs kill
|
||||||
|
}
|
||||||
|
|
||||||
|
# Trap EXIT signal to ensure guest VM is stopped on script exit
|
||||||
|
trap stop_guest EXIT
|
||||||
|
|
||||||
|
# Run apache bench
|
||||||
|
/usr/local/redis/bin/redis-benchmark -n 100000 -c 20 -t ping_mbulk
|
||||||
|
|
||||||
|
# The trap will automatically stop the guest VM when the script exits
|
@ -0,0 +1,14 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "Average RPS of PING_MBULK over virtio-net between Host Linux and Guest Linux",
|
||||||
|
"unit": "request per second",
|
||||||
|
"value": 0,
|
||||||
|
"extra": "linux_result"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Average RPS of PING_MBULK over virtio-net between Host Linux and Guest Asterinas",
|
||||||
|
"unit": "request per second",
|
||||||
|
"value": 0,
|
||||||
|
"extra": "aster_result"
|
||||||
|
}
|
||||||
|
]
|
8
test/benchmark/redis/ping_mbulk_100k_conc20_rps/run.sh
Normal file
8
test/benchmark/redis/ping_mbulk_100k_conc20_rps/run.sh
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo "Running redis server"
|
||||||
|
/usr/local/redis/bin/redis-server /etc/redis.conf
|
9
test/benchmark/redis/set_100k_conc20_rps/config.json
Normal file
9
test/benchmark/redis/set_100k_conc20_rps/config.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"alert_threshold": "125%",
|
||||||
|
"alert_tool": "customBiggerIsBetter",
|
||||||
|
"search_pattern": "throughput summary:",
|
||||||
|
"result_index": "3",
|
||||||
|
"description": "redis-benchmark -n 100000 -c 20 -t set",
|
||||||
|
"title": "Redis SET performance with 20 concurrency and 100000 requests in total",
|
||||||
|
"benchmark_type": "host_guest"
|
||||||
|
}
|
19
test/benchmark/redis/set_100k_conc20_rps/host.sh
Executable file
19
test/benchmark/redis/set_100k_conc20_rps/host.sh
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Function to stop the guest VM
|
||||||
|
stop_guest() {
|
||||||
|
echo "Stopping guest VM..."
|
||||||
|
pgrep qemu | xargs kill
|
||||||
|
}
|
||||||
|
|
||||||
|
# Trap EXIT signal to ensure guest VM is stopped on script exit
|
||||||
|
trap stop_guest EXIT
|
||||||
|
|
||||||
|
# Run apache bench
|
||||||
|
/usr/local/redis/bin/redis-benchmark -n 100000 -c 20 -t set
|
||||||
|
|
||||||
|
# The trap will automatically stop the guest VM when the script exits
|
@ -0,0 +1,14 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "Average RPS of SET over virtio-net between Host Linux and Guest Linux",
|
||||||
|
"unit": "request per second",
|
||||||
|
"value": 0,
|
||||||
|
"extra": "linux_result"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Average RPS of SET over virtio-net between Host Linux and Guest Asterinas",
|
||||||
|
"unit": "request per second",
|
||||||
|
"value": 0,
|
||||||
|
"extra": "aster_result"
|
||||||
|
}
|
||||||
|
]
|
8
test/benchmark/redis/set_100k_conc20_rps/run.sh
Normal file
8
test/benchmark/redis/set_100k_conc20_rps/run.sh
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo "Running redis server"
|
||||||
|
/usr/local/redis/bin/redis-server /etc/redis.conf
|
8
test/benchmark/redis/summary.json
Normal file
8
test/benchmark/redis/summary.json
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"benchmarks": [
|
||||||
|
"ping_inline_100k_conc20_rps",
|
||||||
|
"ping_mbulk_100k_conc20_rps",
|
||||||
|
"get_100k_conc20_rps",
|
||||||
|
"set_100k_conc20_rps"
|
||||||
|
]
|
||||||
|
}
|
Reference in New Issue
Block a user