116 lines
4.0 KiB
Diff
116 lines
4.0 KiB
Diff
From 59c7b5e334940fff29ea49aa722d1c43c88a436b Mon Sep 17 00:00:00 2001
|
|
From: John Kacur <jkacur@redhat.com>
|
|
Date: Tue, 7 May 2019 15:26:38 +0200
|
|
Subject: [PATCH 1/2] queuelat: Assume queuelat and queuelat scripts are in the
|
|
path
|
|
|
|
Assume queuelat and queuelat scripts are in the path. Don't hardcode
|
|
their location.
|
|
|
|
Write the temporary data to /usr/tmp/outfile
|
|
|
|
Signed-off-by: John Kacur <jkacur@redhat.com>
|
|
---
|
|
src/queuelat/determine_maximum_mpps.sh | 35 +++++++++++++-------------
|
|
1 file changed, 17 insertions(+), 18 deletions(-)
|
|
|
|
diff --git a/src/queuelat/determine_maximum_mpps.sh b/src/queuelat/determine_maximum_mpps.sh
|
|
index cf7a8cab9cc4..cd45454720f7 100755
|
|
--- a/src/queuelat/determine_maximum_mpps.sh
|
|
+++ b/src/queuelat/determine_maximum_mpps.sh
|
|
@@ -8,6 +8,7 @@
|
|
PREAMBLE="taskset -c 2 chrt -f 1"
|
|
MAXLAT="20000"
|
|
CYCLES_PER_PACKET="300"
|
|
+OUTFILE=/usr/tmp/outfile
|
|
|
|
echo "Determining maximum mpps the machine can handle"
|
|
echo "Will take a few minutes to determine mpps value"
|
|
@@ -16,10 +17,10 @@ echo "And 10 minutes run to confirm the final mpps value is stable"
|
|
for mpps in `seq 3 3 50`; do
|
|
echo testing $mpps Mpps
|
|
|
|
- outfile=`mktemp`
|
|
- $PREAMBLE ./queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `sh ./get_cpuinfo_mhz.sh` -p $mpps -t 30 > $outfile
|
|
+ OUTFILE=`mktemp`
|
|
+ $PREAMBLE queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `sh get_cpuinfo_mhz.sh` -p $mpps -t 30 > $OUTFILE
|
|
|
|
- exceeded=`grep exceeded $outfile`
|
|
+ exceeded=`grep exceeded $OUTFILE`
|
|
if [ ! -z "$exceeded" ]; then
|
|
echo mpps failed: $mpps
|
|
break;
|
|
@@ -32,10 +33,10 @@ first_mpps=$(($mpps - 1))
|
|
for mpps in `seq $first_mpps -1 3`; do
|
|
echo testing $mpps Mpps
|
|
|
|
- outfile=`mktemp`
|
|
- $PREAMBLE ./queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `sh ./get_cpuinfo_mhz.sh` -p $mpps -t 30 > $outfile
|
|
+ OUTFILE=`mktemp`
|
|
+ $PREAMBLE queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `sh get_cpuinfo_mhz.sh` -p $mpps -t 30 > $OUTFILE
|
|
|
|
- exceeded=`grep exceeded $outfile`
|
|
+ exceeded=`grep exceeded $OUTFILE`
|
|
if [ -z "$exceeded" ]; then
|
|
echo mpps success $mpps
|
|
break;
|
|
@@ -49,10 +50,10 @@ echo second loop mpps: $mpps
|
|
for mpps in `seq $second_mpps 0.3 $first_mpps`; do
|
|
echo testing $mpps Mpps
|
|
|
|
- outfile=`mktemp`
|
|
- $PREAMBLE ./queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `sh ./get_cpuinfo_mhz.sh` -p $mpps -t 30 > $outfile
|
|
+ OUTFILE=`mktemp`
|
|
+ $PREAMBLE queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `sh get_cpuinfo_mhz.sh` -p $mpps -t 30 > $OUTFILE
|
|
|
|
- exceeded=`grep exceeded $outfile`
|
|
+ exceeded=`grep exceeded $OUTFILE`
|
|
if [ ! -z "$exceeded" ]; then
|
|
echo mpps failure $mpps
|
|
break;
|
|
@@ -66,10 +67,10 @@ third_mpps=`echo "$mpps -0.1" | bc`
|
|
for mpps in `seq $third_mpps -0.1 3`; do
|
|
echo testing $mpps Mpps
|
|
|
|
- outfile=`mktemp`
|
|
- $PREAMBLE ./queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `sh ./get_cpuinfo_mhz.sh` -p $mpps -t 30 > $outfile
|
|
+ OUTFILE=`mktemp`
|
|
+ $PREAMBLE queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `sh get_cpuinfo_mhz.sh` -p $mpps -t 30 > $OUTFILE
|
|
|
|
- exceeded=`grep exceeded $outfile`
|
|
+ exceeded=`grep exceeded $OUTFILE`
|
|
if [ -z "$exceeded" ]; then
|
|
echo mpps success $mpps
|
|
break;
|
|
@@ -86,8 +87,8 @@ while [ $queuelat_failure == 1 ]; do
|
|
echo "$mpps Mpps"
|
|
|
|
for i in `seq 1 10`; do
|
|
- $PREAMBLE ./queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `./get_cpuinfo_mhz.sh` -p $mpps -t 30 > $outfile
|
|
- exceeded=`grep exceeded $outfile`
|
|
+ $PREAMBLE ./queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `get_cpuinfo_mhz.sh` -p $mpps -t 30 > $OUTFILE
|
|
+ exceeded=`grep exceeded $OUTFILE`
|
|
|
|
if [ ! -z "$exceeded" ]; then
|
|
echo "mpps failure (run $i) $mpps"
|
|
@@ -108,8 +109,8 @@ while [ $queuelat_failure == 1 ]; do
|
|
echo -n "Starting 10 minutes run with "
|
|
echo "$mpps Mpps"
|
|
|
|
- $PREAMBLE ./queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `./get_cpuinfo_mhz.sh` -p $mpps -t 600 > $outfile
|
|
- exceeded=`grep exceeded $outfile`
|
|
+ $PREAMBLE queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `get_cpuinfo_mhz.sh` -p $mpps -t 600 > $OUTFILE
|
|
+ exceeded=`grep exceeded $OUTFILE`
|
|
|
|
if [ ! -z "$exceeded" ]; then
|
|
echo "mpps failure (run $i) $mpps"
|
|
@@ -124,5 +125,3 @@ echo Final mpps is: $mpps
|
|
|
|
unset queuelat_failure
|
|
unset mpps
|
|
-
|
|
-
|
|
--
|
|
2.20.1
|
|
|