Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Perf yaml added #324

Merged
merged 10 commits into from
Jun 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/perf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: perf-CI
on:
schedule:
# Runs "At 13:00 UTC every day-of-week"
- cron: '0 14 * * *'
workflow_dispatch:
inputs:
testName:
description: 'Test Run-Name'
required: true
default: 'perf-single-node'
threads:
description: 'No. of threads for iperf & netperf'
required: true
default: '50'
duration:
description: 'Test Run duration'
required: true
default: '10'
jobs:
build:
name: perf-single-node
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions/setup-python@v2
- uses: actions/setup-go@v3
with:
go-version: '>=1.18.0'
- run: sudo apt-get update
- run: if [[ ${{ matrix.os }} == 'ubuntu-22.04' ]]; then sudo apt -y install clang-13 lksctp-tools; else sudo apt -y install clang-10; fi
- run: sudo apt -y install llvm libelf-dev gcc-multilib libpcap-dev linux-tools-$(uname -r) elfutils dwarves git libbsd-dev bridge-utils unzip build-essential bison flex iperf iproute2 nodejs socat iperf3
- run: |
git clone https://github.com/loxilb-io/iproute2 iproute2-main
cd iproute2-main/libbpf/src/
sudo make install
mkdir build
DESTDIR=build make install
cd -
cd iproute2-main/
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:`pwd`/libbpf/src/ && LIBBPF_FORCE=on LIBBPF_DIR=`pwd`/libbpf/src/build ./configure && make && sudo cp -f tc/tc /usr/local/sbin/ntc && cd -
- run: loxilb-ebpf/utils/mkllb_bpffs.sh
- run: sudo -E env "PATH=$PATH" make
- run: docker pull ghcr.io/loxilb-io/loxilb:latest
- run: docker run -u root --cap-add SYS_ADMIN --restart unless-stopped --privileged -dit -v /dev/log:/dev/log --name loxilb ghcr.io/loxilb-io/loxilb:latest
- run: pwd && ls && sudo -E env "PATH=$PATH" make docker-cp
- run: id=`docker ps -f name=loxilb | cut -d " " -f 1 | grep -iv "CONTAINER"` && docker commit $id ghcr.io/loxilb-io/loxilb:latest
- run: docker stop loxilb && docker rm loxilb
- run: |
cd cicd/tcpsctpperf
./config.sh
./validation.sh ${{ github.event.inputs.threads }} ${{ github.event.inputs.duration }}
./rmconfig.sh
cd -
2 changes: 1 addition & 1 deletion cicd/tcpsctpperf/iperf.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
time=10
count=$1
time=$2

iperf -c 20.20.20.1 -t $time -p 12865 -P $count > iperf.log &
sleep $((time + 2))
Expand Down
2 changes: 1 addition & 1 deletion cicd/tcpsctpperf/netperf.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
count=$1
time=10
time=$2

# TCP Connections per second
for ((i=1,tport=12866;i<=count;i++,tport++))
Expand Down
20 changes: 16 additions & 4 deletions cicd/tcpsctpperf/validation.sh
Original file line number Diff line number Diff line change
@@ -1,23 +1,35 @@
#!/bin/bash
source ../common.sh
if [ -z "$1" ]; then
threads=50
else
threads=$1
fi

if [ -z "$2" ]; then
time=10
else
time=$2
fi

echo SCENARIO-tcpsctpperf

echo -e "\n\nIPERF Test"
echo -e "\n\nIPERF Test - Threads: $threads Duration: $time"
echo "*********************************************************************"
$hexec l3ep1 iperf -s -p 12865 2>&1 > /dev/null &
$hexec l3ep1 iperf3 -s -p 13866 --logfile iperf3s.log 2>&1> /dev/null &
sleep 2
$hexec l3h1 ./iperf.sh 50
$hexec l3h1 ./iperf.sh $threads $time
sudo pkill iperf 2>&1>/dev/null
sudo rm iperf3s.log
echo "*********************************************************************"
sleep 2

$hexec l3ep1 ./netserver -4 -p 12865
echo -e "\n\nNETPERF Test"
echo -e "\n\nNETPERF Test - Threads: $threads Duration: $time"
echo "*********************************************************************"
sleep 2
$hexec l3h1 ./netperf.sh 50
$hexec l3h1 ./netperf.sh $threads $time
sudo pkill netserver

#netserver somehow corrupts /dev/null, so we have to create it again
Expand Down