Add Redis benchmark CI

This commit is contained in:
Yuke Peng
2024-10-27 15:31:05 +08:00
committed by Tate, Hongliang Tian
parent b5610f3034
commit 88939f2a4c
19 changed files with 214 additions and 1 deletions

View File

@ -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:

View File

@ -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"

View 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"
}

View 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

View File

@ -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"
}
]

View 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

View 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 ping_inline",
"title": "Redis PING INLINE performance with 20 concurrency and 100000 requests in total",
"benchmark_type": "host_guest"
}

View 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

View File

@ -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"
}
]

View 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

View 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 ping_mbulk",
"title": "Redis PING MBULK performance with 20 concurrency and 100000 requests in total",
"benchmark_type": "host_guest"
}

View 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

View File

@ -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"
}
]

View 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

View 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"
}

View 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

View File

@ -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"
}
]

View 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

View File

@ -0,0 +1,8 @@
{
"benchmarks": [
"ping_inline_100k_conc20_rps",
"ping_mbulk_100k_conc20_rps",
"get_100k_conc20_rps",
"set_100k_conc20_rps"
]
}