Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932185AbZAWSlK (ORCPT ); Fri, 23 Jan 2009 13:41:10 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753397AbZAWSkt (ORCPT ); Fri, 23 Jan 2009 13:40:49 -0500 Received: from g5t0009.atlanta.hp.com ([15.192.0.46]:38077 "EHLO g5t0009.atlanta.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753234AbZAWSkr (ORCPT ); Fri, 23 Jan 2009 13:40:47 -0500 Message-ID: <497A0F27.3030801@hp.com> Date: Fri, 23 Jan 2009 10:40:39 -0800 From: Rick Jones User-Agent: Mozilla/5.0 (X11; U; HP-UX 9000/785; en-US; rv:1.7.13) Gecko/20060601 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Zhang, Yanmin" CC: Nick Piggin , Pekka Enberg , Christoph Lameter , Andi Kleen , Matthew Wilcox , Andrew Morton , netdev@vger.kernel.org, sfr@canb.auug.org.au, matthew.r.wilcox@intel.com, chinang.ma@intel.com, linux-kernel@vger.kernel.org, sharad.c.tripathi@intel.com, arjan@linux.intel.com, suresh.b.siddha@intel.com, harita.chilukuri@intel.com, douglas.w.styner@intel.com, peter.xihong.wang@intel.com, hubert.nueckel@intel.com, chris.mason@oracle.com, srostedt@redhat.com, linux-scsi@vger.kernel.org, andrew.vasquez@qlogic.com, anirban.chakraborty@qlogic.com Subject: care and feeding of netperf (Re: Mainline kernel OLTP performance update) References: <1232617672.14549.25.camel@penberg-laptop> <1232679773.11429.155.camel@ymzhang> <200901231933.10101.nickpiggin@yahoo.com.au> <1232701348.11429.170.camel@ymzhang> In-Reply-To: <1232701348.11429.170.camel@ymzhang> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3816 Lines: 110 > 3) ./start_netperf_udp_v4.sh 8 #Assume your machine has 8 logical cpus. Some comments on the script: > #!/bin/sh > > PROG_DIR=/home/ymzhang/test/netperf/src > date=`date +%H%M%N` > #PROG_DIR=/root/netperf/netperf/src > client_num=$1 > pin_cpu=$2 > > start_port_server=12384 > start_port_client=15888 > > killall netserver > ${PROG_DIR}/netserver > sleep 2 Any particular reason for killing-off the netserver daemon? > if [ ! -d result ]; then > mkdir result > fi > > all_result_files="" > 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 :) > fi > result_file=result/netperf_${start_port_client}.${date} > #./netperf -t UDP_STREAM -l 60 -H 127.0.0.1 -- -P 15895 12391 -s 32768 -S 32768 -m 4096 > #./netperf -t UDP_STREAM -l 60 -H 127.0.0.1 -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 127.0.0.1 ${pin_param} -- -r 1,1 >${result_file} & > ${PROG_DIR}/netperf -t UDP_STREAM -l 60 -H 127.0.0.1 ${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. http://www.netperf.org/svn/netperf2/trunk/doc/netperf.html#Using-Netperf-to-Measure-Aggregate-Performance And I would probably add the -c and -C options to have netperf report service demands. > sub_pid="${sub_pid} `echo $!`" > port_num=$((${port_num}+1)) > all_result_files="${all_result_files} ${result_file}" > start_port_server=$((${start_port_server}+1)) > start_port_client=$((${start_port_client}+1)) > done; > > wait ${sub_pid} > killall netserver > > result="0" > for i in `echo ${all_result_files}`; do > sub_result=`awk '/Throughput/ {getline; getline; getline; print " "$6}' ${i}` > result=`echo "${result}+${sub_result}"|bc` > done; The documented-only-in-source :( "omni" tests in top-of-trunk netperf: http://www.netperf.org/svn/netperf2/trunk ./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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/