Skip to content

Commit

Permalink
enable uperf test suite
Browse files Browse the repository at this point in the history
Link: intel#205
Signed-off-by: Jie Zhou <[email protected]>
  • Loading branch information
zhoujie2022 committed Mar 27, 2023
1 parent c4ce886 commit 02a1c7a
Show file tree
Hide file tree
Showing 22 changed files with 218 additions and 1 deletion.
11 changes: 11 additions & 0 deletions daemon/uperf-server
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

. $LKP_SRC/lib/reproduce-log.sh

uperf_path=$BENCHMARK_ROOT/uperf/usr/local/bin/uperf
[ -f "$uperf_path" ] || die "can not find $uperf_path"

export PATH=$BENCHMARK_ROOT/uperf/usr/local/bin:$PATH

# start uperf server
log_eval "uperf -s &"
1 change: 1 addition & 0 deletions distro/adaptation-pkg/amazon_linux
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ ftq::
fwq::
fxmark::
hackbench::
uperf::
hwsim::
igt::
iozone::
Expand Down
1 change: 1 addition & 0 deletions distro/adaptation-pkg/centos
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ ftq::
fwq::
fxmark::
hackbench::
uperf::
hwsim::
iozone::
intel-ipsec-mb::
Expand Down
1 change: 1 addition & 0 deletions distro/adaptation-pkg/debian
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ ftq::
fwq::
fxmark::
hackbench::
uperf::
hwsim::
igt::
iozone::
Expand Down
1 change: 1 addition & 0 deletions distro/adaptation-pkg/exaleap-riscv-linux
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ ftq::
fwq::
fxmark::
hackbench::
uperf::
hwsim::
iozone::
kbuild::
Expand Down
1 change: 1 addition & 0 deletions distro/adaptation-pkg/fedora
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ ftq::
fwq::
fxmark::
hackbench::
uperf::
hwsim::
iozone::
kbuild::
Expand Down
1 change: 1 addition & 0 deletions distro/adaptation-pkg/ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ ftq::
fwq::
fxmark::
hackbench::
uperf::
hwsim::
iozone::
intel-ipsec-mb::
Expand Down
1 change: 1 addition & 0 deletions etc/index-perf-all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ fwq\.fwq\.min: 1
fxmark\..+\.works\/sec: 1
glbenchmark\.fps: 1
hackbench\.throughput: 1
uperf\..+bps: 1
hpcc\.HPL_Tflops: 1
hpcc\.PTRANS_GBs: 1
iostat\..+\.wkB\/s: 1
Expand Down
1 change: 1 addition & 0 deletions etc/index-perf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ ftrace-onoff\.ops: 1
fwq\.counts: 1
glbenchmark\.fps: 1
hackbench\.throughput: 1
uperf\..+bps: 1
iostat\..+\.wkB\/s: 1
iozone\.average_KBps: 1
iperf\..+\.bps: 1
Expand Down
31 changes: 31 additions & 0 deletions jobs/uperf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
suite: uperf
testcase: uperf
category: benchmark

# upto 90% CPU cycles may be used by latency stats
disable_latency_stats: 1

set_nic_irq_affinity: 1

runtime: 30s
nr_threads:
- 1

cluster: cs-localhost

if role server:
uperf-server:

if role client:
uperf:
test:
- uperf

protocol:
- TCP
- UDP
- SCTP
winsize:
- 32k
datasize:
- 64
2 changes: 1 addition & 1 deletion lib/stats.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class LinuxTestcasesTableSet
LINUX_PERF_TESTCASES =
%w[aim7 aim9 angrybirds blogbench dbench
dd-write ebizzy fileio fishtank fsmark glbenchmark
hackbench hpcc idle iozone iperf jsbenchmark kbuild
hackbench uperf hpcc idle iozone iperf jsbenchmark kbuild
ku-latency linpack mlc nepim netperf netpipe
nuttcp octane oltp openarena pbzip2 rcurefscale
perf-bench-numa-mem perf-bench-sched-pipe pft
Expand Down
24 changes: 24 additions & 0 deletions programs/uperf/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
short_description: >
uperf is a network performance tool that supports modelling and replay of various networking patterns.
description: |
uperf represents a new kind of benchmarking tool (like filebench) where instead of
running a fixed benchmark or workload, a description (or model) of the workload is
provided and the tool generates the load according to the model. By distilling the
benchmark or workload into a model, you can now do various things like change the
scale of the workload, change different parameters, change protocols, etc and
analyse the effect of these changes on your model. You can also study the effect
of interleaving CPU activity, or think times or the use of SSL instead of TCP
among many other things.
homepage: https://github.com/uperf/uperf

parameters:
nr_threads: number of threads
protocol: transport protocol and can be "tcp", "udp" or "sctp"
winsize: window size
runtime: duration of the run
datasize: read/write message size

results:
uperf.throughput: unit-Mb/s
29 changes: 29 additions & 0 deletions programs/uperf/parse
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env ruby

LKP_SRC = ENV['LKP_SRC'] || File.dirname(File.dirname(File.realpath($PROGRAM_NAME)))

while (line = $stdin.gets)
case line
when /Netstat statistics for this run/
@runtest = 'Netstat'
when /Run Statistics/
@runtest = 'Runstat'
when /(\S+)\s+\d+\s+\d+\s+(.+)([KM][Bb]\/s)\s+(.+)([KM][Bb]\/s)/
# ens1 2 2 4.65Kb/s 1.21Kb/s
netcard = $1
outstat = $2
outunit = $3.to_s.strip.tr('/', 'p')
instat = $4
inunit = $5.to_s.strip.tr('/', 'p')
if @runtest =~ /Netstat/
puts "Netstat_#{netcard}_out_#{outunit}: #{outstat}"
puts "Netstat_#{netcard}_in_#{inunit}: #{instat}"
end
when /(\S+)\s+\S+\s+\S+\s+(.+)([KM][Bb]\/s)\s+\d+\s+\d+/
# master 32.34s 259.89MB 67.42Mb/s 3027910 0.00
hostname = $1
outstat = $2
outunit = $3.to_s.strip.tr('/', 'p')
puts "Runstat_#{hostname}_#{outunit}: #{outstat}" unless @runtest !~ /Runstat/
end
end
18 changes: 18 additions & 0 deletions programs/uperf/pkg/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
pkgname=uperf
pkgver=git
pkgrel=1
arch=('i386' 'x86_64' 'aarch64')
license=('GPL')
source=("https://github.com/uperf/uperf.git")
sha256sums=('SKIP')

build() {
cd "$srcdir/$pkgname" || return
autoreconf --install && ./configure && make
}

package() {
mkdir -p "${pkgdir}/lkp/benchmarks/${pkgname}"
cd "$srcdir/$pkgname" || return
make install DESTDIR="${pkgdir}/lkp/benchmarks/${pkgname}"
}
1 change: 1 addition & 0 deletions programs/uperf/pkg/depends
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
libsctp1
2 changes: 2 additions & 0 deletions programs/uperf/pkg/depends-dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
autoconf
libsctp-dev
16 changes: 16 additions & 0 deletions programs/uperf/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh
# - nr_threads
# - protocol
# - winsize
# - runtime
# - datasize

run_uperf()
{
local uperf_path
uperf_path=/lkp/benchmarks/uperf/usr/local/bin/uperf
[ -f "$uperf_path" ] || die "can not find $uperf_path"
log_cmd $uperf_path -m $LKP_SRC/programs/uperf/uperf_web.xml
}

run_uperf
16 changes: 16 additions & 0 deletions programs/uperf/uperf_web.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0"?>
<profile name="netperf">
<group nthreads="$nr_threads">
<transaction iterations="1">
<flowop type="accept" options="remotehost=127.0.0.1 protocol=$protocol
wndsz=$winsize tcp_nodelay"/>
</transaction>
<transaction duration="$runtime">
<flowop type="write" options="size=$datasize"/>
<flowop type="read" options="size=$datasize"/>
</transaction>
<transaction iterations="1">
<flowop type="disconnect" />
</transaction>
</group>
</profile>
21 changes: 21 additions & 0 deletions spec/stats/uperf/01
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Starting 1 threads running profile:netperf ... 0.00 seconds
Txn1 0 / 1.00(s) = 0 1op/s
Txn2 259.89M / 30.23(s) = 72.11Mb/s 100153op/s
Txn3 0 / 0.00(s) = 0 0op/s
---------------------------------------------------------------------------------------------------------------------
Total 259.89M / 32.34(s) = 67.42Mb/s 93638op/s

Netstat statistics for this run
---------------------------------------------------------------------------------------------------------------------
Nic opkts/s ipkts/s obits/s ibits/s
lo 93638 93638 106.37Mb/s 106.37Mb/s
ens1 2 2 4.65Kb/s 1.21Kb/s
---------------------------------------------------------------------------------------------------------------------

Run Statistics
Hostname Time Data Throughput Operations Errors
---------------------------------------------------------------------------------------------------------------------
127.0.0.1 32.34s 259.89MB 67.42Mb/s 3027910 0.00
master 32.34s 259.89MB 67.42Mb/s 3027910 0.00
---------------------------------------------------------------------------------------------------------------------
Difference(%) -0.00% 0.00% 0.00% 0.00% 0.00%
6 changes: 6 additions & 0 deletions spec/stats/uperf/01.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Netstat_lo_out_Mbps: 106.37
Netstat_lo_in_Mbps: 106.37
Netstat_ens1_out_Kbps: 4.65
Netstat_ens1_in_Kbps: 1.21
Runstat_127.0.0.1_Mbps: 67.42
Runstat_master_Mbps: 67.42
28 changes: 28 additions & 0 deletions spec/stats/uperf/02
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Starting 1 threads running profile:netperf ... 0.00 seconds
Txn1 0 / 1.00(s) = 0 1op/s
Txn2 197.80M / 30.23(s) = 54.89Mb/s 107204op/s
Txn3 0 / 0.00(s) = 0 0op/s
---------------------------------------------------------------------------------------------------------------------
Total 197.80M / 32.33(s) = 51.32Mb/s 100228op/s
** Warning: Send buffer: 64.00KB (Requested:32.00KB)
** Warning: Recv buffer: 64.00KB (Requested:32.00KB)

Netstat statistics for this run
---------------------------------------------------------------------------------------------------------------------
Nic opkts/s ipkts/s obits/s ibits/s
lo 100228 100228 93.01Mb/s 93.01Mb/s
ens1 2 3 8.10Kb/s 1.60Kb/s
---------------------------------------------------------------------------------------------------------------------

Run Statistics
Hostname Time Data Throughput Operations Errors
---------------------------------------------------------------------------------------------------------------------
127.0.0.1 32.33s 197.80MB 51.32Mb/s 3240816 0.00
master 32.33s 197.80MB 51.32Mb/s 3240816 0.00
---------------------------------------------------------------------------------------------------------------------
Difference(%) -0.00% 0.00% 0.00% 0.00% 0.00%

** Warning: Send buffer: 64.00KB (Requested:32.00KB)
** Warning: Recv buffer: 64.00KB (Requested:32.00KB)
** [127.0.0.1] Warning: Send buffer: 64.00KB (Requested:32.00KB)
Warning: Recv buffer: 64.00KB (Requested:32.00KB)
6 changes: 6 additions & 0 deletions spec/stats/uperf/02.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Netstat_lo_out_Mbps: 93.01
Netstat_lo_in_Mbps: 93.01
Netstat_ens1_out_Kbps: 8.10
Netstat_ens1_in_Kbps: 1.60
Runstat_127.0.0.1_Mbps: 51.32
Runstat_master_Mbps: 51.32

0 comments on commit 02a1c7a

Please sign in to comment.