care and feeding of netperf (Re: Mainline kernel OLTP performanceupdate)

From: Rick Jones
Date: Fri Jan 23 2009 - 13:41:11 EST

3) ./ 8 #Assume your machine has 8 logical cpus.

Some comments on the script:


date=`date +%H%M%N`


killall netserver
sleep 2

Any particular reason for killing-off the netserver daemon?

if [ ! -d result ]; then
mkdir result

for i in `seq 1 ${client_num}`; do
if [ "${pin_cpu}" == "pin" ]; then
pin_param="-T ${i} ${i}"

The -T option takes arguments of the form:

N - bind both netperf and netserver to core N
N, - bind only netperf to core N, float netserver
,M - float netperf, bind only netserver to core M
N,M - bind netperf to core N and netserver to core M

Without a comma between N and M knuth only knows what the command line parser will do :)

#./netperf -t UDP_STREAM -l 60 -H -- -P 15895 12391 -s 32768 -S 32768 -m 4096
#./netperf -t UDP_STREAM -l 60 -H -i 50 3 -I 99 5 -- -P 12384 12888 -s 32768 -S 32768 -m 4096
#${PROG_DIR}/netperf -p ${port_num} -t TCP_RR -l 60 -H ${pin_param} -- -r 1,1 >${result_file} &
${PROG_DIR}/netperf -t UDP_STREAM -l 60 -H ${pin_param} -- -P ${start_port_client} ${start_port_server} -s 32768 -S 32768 -m 4096 >${result_file} &

Same thing here for the -P option - there needs to be a comma between the two port numbers otherwise, the best case is that the second port number is ignored. Worst case is that netperf starts doing knuth only knows what.

To get quick profiles, that form of aggregate netperf is OK - just the one iteration with background processes using a moderatly long run time. However, for result reporting, it is best to (ab)use the confidence intervals functionality to try to avoid skew errors. I tend to add-in a global -i 30 option to get each netperf to repeat its measurments 30 times. That way one is reasonably confident that skew issues are minimized.

And I would probably add the -c and -C options to have netperf report service demands.

sub_pid="${sub_pid} `echo $!`"
all_result_files="${all_result_files} ${result_file}"

wait ${sub_pid}
killall netserver

for i in `echo ${all_result_files}`; do
sub_result=`awk '/Throughput/ {getline; getline; getline; print " "$6}' ${i}`
result=`echo "${result}+${sub_result}"|bc`

The documented-only-in-source :( "omni" tests in top-of-trunk netperf:

./configure --enable-omni

allow one to specify which result values one wants, in which order, either as more or less traditional netperf output (test-specific -O), CSV (test-specific -o) or keyval (test-specific -k). All three take an optional filename as an argument with the file containing a list of desired output values. You can give a "filename" of '?' to get the list of output values known to that version of netperf.

Might help simplify parsing and whatnot.

happy benchmarking,

rick jones

echo $result

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at