Set LOAD_PROFILE for netperf

8 views
Skip to first unread message

Michael Wehrmeister

unread,
Sep 7, 2016, 6:56:58 PM9/7/16
to cbtool-users
Hi,

I am wanting to set some parameters for a netperf application instance, like UDP_STREAM vs TCP_STREAM.

In cb_netperf.sh I see the following:


source $(echo $0 | sed -e "s/\(.*\/\)*.*/\1.\//g")/cb_common.sh

LOAD_PROFILE=$1
LOAD_LEVEL=$2
LOAD_DURATION=$3
LOAD_ID=$4
SLA_RUNTIME_TARGETS=$5

if [[ -z "$LOAD_PROFILE" || -z "$LOAD_LEVEL" || -z "$LOAD_DURATION" || -z "$LOAD_ID" ]]
then
    syslog_netcat "Usage: cb_netperf.sh <load profile> <load level> <load duration> <load_id>"
    exit 1
fi

LOAD_GENERATOR_IP=$(get_my_ai_attribute load_generator_ip)
LOAD_GENERATOR_TARGET_IP=$(get_my_ai_attribute load_generator_target_ip)

netperf=$(which netperf)

LOAD_PROFILE=$(echo ${LOAD_PROFILE} | tr '[:upper:]' '[:lower:]')


and

declare -A CMDLINE_START

CMDLINE_START["tcp_stream"]="-t TCP_STREAM" 
CMDLINE_START["tcp_maerts"]="-t TCP_MAERTS"
CMDLINE_START["udp_stream"]="-t UDP_STREAM"
CMDLINE_START["tcp_rr"]="-t TCP_RR"
CMDLINE_START["tcp_cc"]="-t TCP_CC"
CMDLINE_START["tcp_crr"]="-t TCP_CRR"
CMDLINE_START["udp_rr"]="-t UDP_RR"

It seems to me that I need a file somewhere to set some parameters that is then passed in to this script. I have also seen an example of a configuration folder with the following:

LOAD_PROFILE = default

Is there a way for me to look at the default LOAD_PROFILE, or a specific syntax to specify a file to use for it? Or am I going about this completely wrong?

Thanks,
-Michael Wehrmeister

Michael R. Hines

unread,
Sep 7, 2016, 7:02:05 PM9/7/16
to Michael Wehrmeister, cbtool-users

Hi Michael,

Thanks for dropping in. You have two options:

1. Drop this into your configuration file:

[AI_TEMPLATES : NETPERF]
LOAD_PROFILE = FOO # such as tcp_stream

Or set this on the command line during runtime:

2. cbtool> cldalter ai_templates netperf_load_profile=tcp_stream

For a list of runtime configurables, either use the GUI or show the current settings:

3. cbtool> cldshow all

/*
 * Michael R. Hines
 * Senior Engineer, DigitalOcean.
 */

Michael Wehrmeister

unread,
Sep 8, 2016, 2:13:50 PM9/8/16
to cbtool-users, michaelwe...@gmail.com
Thanks for the quick reply!

If I want to change the recv_buffer_size or send_buffer_size, is there a specific format to do that? Can I do cldalter ai_templates netperf_recv_buffer_size 1k or should I do cldalter ai_templates netperf_recv_buffer_size 1024?

Also, load_duration is showing load_duration: uniformIXIXI70I90. Can this attribute be changed to time in seconds?

Thanks,
-Michael Wehrmeister

Michael R. Hines

unread,
Sep 8, 2016, 2:23:58 PM9/8/16
to Michael Wehrmeister, cbtool-users

On 09/08/2016 01:13 PM, Michael Wehrmeister wrote:
If I want to change the recv_buffer_size or send_buffer_size, is there a specific format to do that? Can I do cldalter ai_templates netperf_recv_buffer_size 1k or should I do cldalter ai_templates netperf_recv_buffer_size 1024?


The value is passed directly to netperf. cbtool is just relaying it for you (and recording performance, etc, etc), so if 1k is what netperf expects, then that's what you'll want to use.


Also, load_duration is showing load_duration: uniformIXIXI70I90. Can this attribute be changed to time in seconds?

Yes, that's correctly. Just replace the entire string "uniform...blah...blah" with X, such as load_duration=100, for example.

We will then use the fixed time instead of the random distribution.

- Michael
Reply all
Reply to author
Forward
0 new messages