= 16. Wimax Measurement Experiment: oml2-iperf with variable link attenuation values = == Description == This experiment runs oml2-iperf on two nodes and collects bandwidth measurements along with the controlled attenuator values. The RSSI seen by the wimax node interface is varied by controlling this attenuator value. At different attenuator values we can measure the down link throughput for the wimax interface. This experiment script is geared towards nodes on sand box 4 which has nodes with wireless interfaces connected the base station via an rf attenuator matrix. Using this experiment we also measure the throughout at different modulation-coding schemes (MCS) which is set prior to running the experiment script.[[BR]] == Hardware utilized == 1. ''Sandbox 4 node1-4'': runs oml2-iperf as server. The wimax interface card is used for measurements.[[BR]] 2. ''Sandbox 4 node1-9'': runs oml2-iperf as client.[[BR]] 3. ''RF-attenuator matrix'': this used by the script to attenuate the air interface between the wimax base station and node.[[BR]] == Software / scripts requirements worth mentioning == 1. ''baseline-iperf.ndz'': disk image that's loaded onto the nodes. This image is loaded with oml2-iperf.[[BR]] 2. ''oml2-server'': server running on sandbox 4 which collects measurement data from oml2-iperf and stores in a database file.[[BR]] 3. ''sqlite3'': command line interface for accessing the contents in a database file.[[BR]] 4. ''wimax-iperf-attn.rb'': the experiment script. [http://wimax.orbit-lab.org/attachment/wiki/WiMAX/30/05/wimax-iperf-attn.rb Click here to view file.][[BR]] 5. ''R'': a statistic analysis tool. == Set up == Getting started, ssh into the console of sandbox 4.[[BR]] * '''ssh sb4.orbit-lab.org''' * Verify the oml2-server is running: * '''$ ps -elf | grep oml2-server''' {{{ nilanjan@console.sb4:~/exp/dl-iperf/5.2$ ps -elf | grep oml2-server 4 S oml2 948 1 0 80 0 - 2471 poll_s Feb02 ? 00:00:16 /usr/bin/oml2-server -l 3003 --logfile=/var/log/oml2-server.log --user=oml2 --group=oml2 0 S nilanjan 1259 27360 0 80 0 - 1002 pipe_w 10:59 pts/1 00:00:00 grep oml2-server }}} Before the experiment, the BS parameters can be changed. The following are a few examples commands to control the MCS:[[BR]] * To set the BS parameters back to defaults: * '''$ wget -O status http://cons-wm-01:5052/wimaxrf/defaults''' * To get the current MCS: * '''$ wget -O status http://cons-wm-01:5052/wimaxrf/mcsProfile''' * Change downlink MCS to single profile: * '''$ wget -O status http://cons-wm-01:5052/wimaxrf/mcsProfile?dl=15 ''' * Change downlink MCS with profile list: * '''$ wget -O status http://cons-wm-01:5052/wimaxrf/mcsProfile?dl=15,17,18''' * Change uplink MCS to single profile: * '''$ wget -O status http://cons-wm-01:5052/wimaxrf/mcsProfile?ul=15''' * Change uplink MCS with profile list: * '''$ wget -O status http://cons-wm-01:5052/wimaxrf/mcsProfile?ul=15,17,18''' * To restart the base station: * '''$ wget http://cons-wm-01:5052/wimaxrf/restart''' Please note: After issuing a restart the BS will need 2 minutes before accepting connection requests. [[BR]] For other details on changing BS parameters please refer to ''Basic Support Services'' under http://wimax.orbit-lab.org/wiki [[BR]] Although the experiment script can vary the attenuator values, the details on manually changing attenuator values can be found in ''RF Matrix Control Services'' under http://wimax.orbit-lab.org/wiki [[BR]] == Usage == * Start clean, turn off all the nodes: * '''$ omf-5.2 tell offh all''' {{{ nilanjan@console.sb4:~/exp/dl-iperf/5.2$ omf-5.2 tell offh all INFO NodeHandler: init OMF Experiment Controller 5.2.408 INFO Topology: Loading topology 'system:topo:all'. --------------------------------------------------- Testbed : sb4.orbit-lab.org - Command: offHard Node n_1_2 - Ok Node n_1_7 - Ok Node n_1_1 - Ok Node n_1_6 - Ok Node n_1_5 - Ok Node n_1_9 - Ok Node n_1_4 - Ok Node n_1_8 - Ok Node n_1_3 - Ok --------------------------------------------------- }}} * Query the status of the nodes. Wait until all nodes are in ''POWEROFF'' state. * '''$ omf-5.2 stat'''. {{{ nilanjan@console.sb4:~/exp/dl-iperf/5.2$ omf-5.2 stat INFO NodeHandler: init OMF Experiment Controller 5.2.408 ----------------------------------------------- INFO Topology: Loading topology 'system:topo:all'. Testbed : sb4.orbit-lab.org Node n_1_1 - State: POWEROFF Node n_1_2 - State: POWEROFF Node n_1_3 - State: POWEROFF Node n_1_4 - State: POWEROFF Node n_1_5 - State: POWEROFF Node n_1_6 - State: POWEROFF Node n_1_7 - State: POWEROFF Node n_1_8 - State: POWEROFF Node n_1_9 - State: POWEROFF ----------------------------------------------- }}} * Load image onto node1-4 and node1-9: * '''$ omf-5.2 load [[1,4],[1,9]] baseline-iperf.ndz''' {{{ nilanjan@console.sb4:~/exp/dl-iperf/5.2$ omf-5.2 load [[1,4],[1,9]] baseline-iperf.ndz ; sleep 360 ; omf-5.2 tell on [[1,4],[1,9]] ; sleep 360 ; omf-5.2 exec dl-iperf.rb Imaging nodes: '[[1,4],[1,9]]' with image 'baseline-iperf.ndz' (Domain: default from hostname) (Timeout: 800 sec.) INFO NodeHandler: init OMF Experiment Controller 5.2.408 INFO NodeHandler: init Experiment ID: sb4.orbit-lab.org_2012_02_09_10_22_14 INFO NodeHandler: Web interface available at: http://10.14.0.10:4000 INFO Experiment: load system:exp:stdlib INFO property.resetDelay: value = 100 (Fixnum) INFO property.resetTries: value = 1 (Fixnum) INFO Experiment: load system:exp:imageNode INFO property.nodes: value = [[1, 4], [1, 9]] (Array) INFO property.image: value = "baseline-iperf.ndz" (String) INFO property.domain: value = nil (NilClass) INFO property.outpath: value = "/tmp" (String) INFO property.timeout: value = 800 (Fixnum) INFO stdlib: Waiting for nodes (Up/Down/Total): 0/2/2 - (still down: n_1_9,n_1_4) INFO stdlib: Waiting for nodes (Up/Down/Total): 0/2/2 - (still down: n_1_9,n_1_4) INFO stdlib: Waiting for nodes (Up/Down/Total): 0/2/2 - (still down: n_1_9,n_1_4) INFO stdlib: Waiting for nodes (Up/Down/Total): 0/2/2 - (still down: n_1_9,n_1_4) INFO exp: Progress(0/0/2): 0/0/0 min(n_1_9)/avg/max (46) - Timeout: 750 sec. INFO whenAll: *: 'status[@value='UP']' fires INFO exp: Progress(0/0/2): 20/20/20 min(n_1_9)/avg/max (46) - Timeout: 740 sec. INFO exp: Progress(0/0/2): 40/40/40 min(n_1_9)/avg/max (46) - Timeout: 730 sec. INFO exp: Progress(0/0/2): 60/60/60 min(n_1_9)/avg/max (46) - Timeout: 720 sec. INFO exp: Progress(0/0/2): 70/75/80 min(n_1_9)/avg/max (46) - Timeout: 710 sec. INFO exp: Progress(0/0/2): 90/90/90 min(n_1_9)/avg/max (46) - Timeout: 700 sec. INFO exp: Progress(2/0/2): 100/100/100 min()/avg/max (46) - Timeout: 690 sec. INFO exp: ----------------------------- INFO exp: Imaging Process Done INFO exp: - 2 node(s) successfully imaged - See the topology file: '/tmp/sb4.orbit-lab.org_2012_02_09_10_22_14_topo_active.rb' INFO exp: ----------------------------- INFO Experiment: DONE! INFO NodeHandler: Shutting down experiment, please wait... INFO NodeHandler: Shutdown flag is set - Turning Off the resources INFO run: Experiment sb4.orbit-lab.org_2012_02_09_10_22_14 finished after 1:51 }}} * After loading the image, node1-4 & node1-9 are turned off. Turn these nodes back on: * '''$ omf-5.2 tell on [[1,4],[1,9]]''' {{{ nilanjan@console.sb4:~/exp/dl-iperf/5.2$ omf-5.2 tell on [[1,4],[1,9]] INFO NodeHandler: init OMF Experiment Controller 5.2.408 --------------------------------------------------- Testbed : sb4.orbit-lab.org - Command: on Node n_1_9 - Ok Node n_1_4 - Ok --------------------------------------------------- }}} * Query the status of the nodes until node1-4 & node1-9 are in ''POWERON'' state: '''> omf-5.2 stat''' * Now run the experiment script: * '''$ omf-5.2 exec wimax-iperf-attn.rb''' {{{ nilanjan@console.sb4:~/exp/dl-iperf/5.2$ omf-5.2 tell on [[1,4],[1,9]] INFO NodeHandler: init OMF Experiment Controller 5.2.408 --------------------------------------------------- Testbed : sb4.orbit-lab.org - Command: on Node n_1_9 - Ok Node n_1_4 - Ok --------------------------------------------------- nilanjan@console.sb4:~/exp/dl-iperf/5.2$ omf-5.2 exec wimax-iperf-attn.rb INFO NodeHandler: init OMF Experiment Controller 5.2.408 INFO NodeHandler: init Experiment ID: sb4.orbit-lab.org_2012_02_10_11_01_53 INFO NodeHandler: Web interface available at: http://10.14.0.10:4000 INFO Experiment: load system:exp:stdlib INFO property.resetDelay: value = 100 (Fixnum) INFO property.resetTries: value = 1 (Fixnum) INFO Experiment: load wimax-iperf-attn.rb INFO whenAll: *: 'apps/app/status/@value' fires INFO exp: Give machines some time to warm up INFO exp: Request from Experiment Script: Wait for 10s.... INFO exp: Connect to base station HW and SW Radios are ON. Current Preferred Profile is: ID : 51 Name: GENI 4G Connecting to GENI 4G Network... Connection successful INFO exp: Request from Experiment Script: Wait for 5s.... INFO exp: Setting attenuator level --2012-02-10 11:02:21-- http://internal2dmz.orbit-lab.org:5052/instr/set?portA=4&portB=9&att=0 Resolving internal2dmz.orbit-lab.org... 10.50.0.13 Connecting to internal2dmz.orbit-lab.org|10.50.0.13|:5052... connected. HTTP request sent, awaiting response... 200 OK Length: 15 Saving to: `status' 100%[=================================================================================>] 15 --.-K/s in 0s 2012-02-10 11:02:21 (2.79 MB/s) - `status' saved [15/15] INFO exp: Request from Experiment Script: Wait for 1s.... INFO exp: Start iperf server INFO exp: Request from Experiment Script: Wait for 3s.... INFO exp: Start iperf client INFO exp: Collect measurements for 10 seconds INFO exp: Request from Experiment Script: Wait for 10s.... INFO exp: Stop applications INFO exp: Request from Experiment Script: Wait for 5s.... Size: 11141120 Time: 10.2238909900188 b: 8513.39280563279 INFO exp: Request from Experiment Script: Wait for 1s.... Error: table t1 already exists --2012-02-10 11:02:41-- http://internal2dmz.orbit-lab.org:5052/instr/set?portA=4&portB=9&att=5 Resolving internal2dmz.orbit-lab.org... 10.50.0.13 Connecting to internal2dmz.orbit-lab.org|10.50.0.13|:5052... connected. HTTP request sent, awaiting response... 200 OK Length: 15 Saving to: `status' 100%[=================================================================================>] 15 --.-K/s in 0s 2012-02-10 11:02:41 (2.83 MB/s) - `status' saved [15/15] INFO exp: Request from Experiment Script: Wait for 1s.... INFO exp: Start iperf server INFO exp: Request from Experiment Script: Wait for 3s.... INFO exp: Start iperf client INFO exp: Collect measurements for 10 seconds INFO exp: Request from Experiment Script: Wait for 10s.... INFO exp: Stop applications INFO exp: Request from Experiment Script: Wait for 5s.... Size: 10878976 Time: 10.0240639895201 b: 8478.79663266884 INFO exp: Request from Experiment Script: Wait for 1s.... Error: table t1 already exists Network Disconnected. SW Radio is turned off INFO exp: Finish it. INFO Experiment: DONE! INFO NodeHandler: Shutting down experiment, please wait... INFO run: Experiment sb4.orbit-lab.org_2012_02_10_11_01_53 finished after 2:13 }}} == Post processing data == After the experiment successfully executes a database file ''(values.db)'' is created. This file is populated with the following parameters for each iperf run:[[BR]] 1. atten -----> rf matrix attenuation value 2. nBytes ----> number of '''bytes''' transferred from iperf client to server. 3. time ------> total time taken for iperf connection. 4. kBperS ----> throughput in kilobytes per second 5. freqkhz ---> frequency in kHz 6. rssi_dbm --> received signal strength indicator as seen client in dBm 7. cinr_db ---> carrier noise ration as seen by client in dB 8. txpw_dbm --> tx power from client in dBm To view the contents of the database file: '''sqlite3 -header -column values.db "select * from t1" ''' {{{ nilanjan@console.sb4:~/exp/dl-iperf/5.2$ sqlite3 -header -column values.db "select * from t1" t1key atten nBytes time kBperS freqkhz rssi_dbm cinr_db txpw_dbm ---------- ---------- ---------- ---------------- ---------------- ---------- ---------- ---------- ---------- 1 0 10878976 10.0256849974394 8477.42573417251 2590000 -53 28 -51 2 5 11010048 10.1007899940014 8515.76956367598 2590000 -58 28 -52 3 10 10878976 10.1007009893656 8414.46549991756 2590000 -63 27 -44 4 15 11010048 10.0756449997425 8537.0216995734 2590000 -68 24 -36 5 20 1703936 10.3204459995031 1289.86673644152 2590000 -73 19 -33 }}} In this ''simple'' example we can use R (statistical analysis tool) to analyze the data. This tool can be easily installed: '''apt-get install r-base''' [[BR]] So first dump the contents out to a file: '''sqlite3 -header values.db "select * from t1" > data.tmp''' {{{ nilanjan@console.sb4:~/exp/dl-iperf/5.2$ sqlite3 -header values.db "select * from t1" > data.tmp nilanjan@console.sb4:~/exp/dl-iperf/5.2$ more data.tmp t1key|atten|nBytes|time|kBperS|freqkhz|rssi_dbm|cinr_db|txpw_dbm 1|0|10878976|10.0256849974394|8477.42573417251|2590000|-53|28|-51 2|5|11010048|10.1007899940014|8515.76956367598|2590000|-58|28|-52 3|10|10878976|10.1007009893656|8414.46549991756|2590000|-63|27|-44 4|15|11010048|10.0756449997425|8537.0216995734|2590000|-68|24|-36 5|20|1703936|10.3204459995031|1289.86673644152|2590000|-73|19|-33 }}} Next in another window run R from the prompt. From inside the R command prompt, read ''data.tmp'' file: {{{ R> data<-read.table("data.tmp",header=TRUE,sep="|") }}} Check the data that was read: {{{ > data<-read.table("data.tmp",header=TRUE,sep="|") > data t1key atten nBytes time kBperS freqkhz rssi_dbm cinr_db txpw_dbm 1 1 0 10878976 10.02568 8477.426 2590000 -53 28 -51 2 2 5 11010048 10.10079 8515.770 2590000 -58 28 -52 3 3 10 10878976 10.10070 8414.465 2590000 -63 27 -44 4 4 15 11010048 10.07564 8537.022 2590000 -68 24 -36 5 5 20 1703936 10.32045 1289.867 2590000 -73 19 -33 }}} Now parse the columns into separate variables: {{{ R> tp<-data[,5] R> at<-data[,2] }}} View both variables: {{{ > tp [1] 8477.426 8515.770 8414.465 8537.022 1289.867 > at [1] 0 5 10 15 20 }}} Now plot throughput against attenuation. See below for example plot. {{{ R> d <- bw ~ at R> plot(d) }}} == Trouble shooting & miscellaneous info == After running the experiment, if the dependent variables (ie. kBperS) are all 0, then it's most likely the Wimax BS needs to be configured properly. Please try the following: * Set the BS back to default configuration. Please refer to setup section above. [[BR]] * Set the RF attenuator matrix to 0 dB attenuation. Please refer to ''RF Matrix Control Services'' under http://wimax.orbit-lab.org/wiki for more details on changing attenuator values. Many times the attenuator values is set to the maximum (63 dB) in which case the nodes will not be able to with the BS.