Bandwidth output from run-iperf action is not calculated properly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
charm-magpie |
Fix Committed
|
Undecided
|
DUFOUR Olivier |
Bug Description
Magpie charm is using iperf with an option called "--reportstyle" to ease the retrieval of the values from its output.
An example of the output from iperf is the following :
$ iperf -c 192.168.2.1 -t 10 -P 4 --reportstyle C
19700101000000,
19700101000000,
19700101000000,
19700101000000,
However compared to a normal iperf output (see below), it doesn't provide any summarised output regarding the total Bandwidth used during the test.
$ iperf -c 192.168.2.1 -t 10 -P 4
-------
Client connecting to 192.168.2.1, TCP port 5001
TCP window size: 16.0 KByte (default)
-------
[ 3] local 192.168.2.2 port 54486 connected with 192.168.2.1 port 5001 (icwnd/
[ 2] local 192.168.2.2 port 54488 connected with 192.168.2.1 port 5001 (icwnd/
[ 4] local 192.168.2.2 port 54514 connected with 192.168.2.1 port 5001 (icwnd/
[ 1] local 192.168.2.2 port 54504 connected with 192.168.2.1 port 5001 (icwnd/
[ ID] Interval Transfer Bandwidth
[ 2] 0.0000-10.0702 sec 385 MBytes 321 Mbits/sec
[ 4] 0.0000-10.0862 sec 46.5 MBytes 38.7 Mbits/sec
[ 3] 0.0000-10.1029 sec 45.1 MBytes 37.5 Mbits/sec
[ 1] 0.0000-10.1513 sec 214 MBytes 177 Mbits/sec
[SUM] 0.0000-10.0685 sec 691 MBytes 576 Mbits/sec
When running iperf with a concurrency-
Magpie will only consider the output of the first line from iperf instead of aggregating the values properly and will display only a subset of the real usage of the network card.
(see https:/
For example with a concurrency-
Changed in charm-magpie: | |
assignee: | nobody → DUFOUR Olivier (odufourc) |
status: | New → In Progress |
To give more details, this is how magpie is currently outputting the informations from run-iperf per test on each destination unit.
{ bytes": "8232370236",
"timestamp": "19700101000000",
"src_ip": "192.168.29.10",
"src_port": "57832",
"dest_ip": "192.168.29.6",
"dest_port": "5001",
"unknown1": "4",
"time_interval": "0.0-20.0",
"transferred_
"bits_per_second": "3291429922"
}
Multiple changes were done :
* unknown1 has been properly named to session, which correspond to the number of the session when running iperf with parallel mode with -P option
* src_port, will properly reference all the source ports being used
* dest_port is unchanged since the destination is always the same iperf server (5001)
* GBytes_transferred is added to ease the reading of the value if an operator happens to run the command manually
* Mbits_per_second is added to ease the reading of the value if an operator happens to run the command manually
The new output will look as below : pxe-space_ 14", bytes": 113723834608, transferred" : 105.914, per_second" : 14455,
{
"src_port": [48188, 48206, 48172, 48198],
"dest_port": "5001",
"dest_node": "magpie-
"session": [2, 3, 1, 4],
"transferred_
"bits_per_second": 15158166805,
"src_ip": "192.168.24.57",
"dest_ip": "192.168.24.54",
"time_interval": "0.0-60.0",
"concurrency": 4,
"GBytes_
"Mbits_
}