-
Notifications
You must be signed in to change notification settings - Fork 238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
trafgen: not sending all the packets specified by num #75
Comments
Thanks for reporting Jon! How does configs/64.cfg look ? Could you copy its content here ? Is the same issue when you specify -t0 ? What if you leave out --cpus option ? |
The config I'm using is generated by gencfg with the -G rfc2544 option. $ cat 64.cfg I have tried leaving out --cpus while keeping --kernel-pull 5 but I don't remember what my results were. I think the same but I will test again tonight. I have not tried messing with the gap, is the default not 0? I'll try tonight. |
My results were better today. * indicate the number of runs I did for each test. # PPS is the rough packet rate.eth5 - e1000 $ trafgen --in configs/64.cfg --out eth5 --verbose --kernel-pull 5 --cpus 1 --num 15000000 174401 PPS 3 * 15000000 (Send and Recv) $ trafgen --in configs/64.cfg --out eth2 --verbose --num 15000000 229,000 PPS 2 * 15000000 (Send and Recv) $ trafgen --in configs/64.cfg --out eth5 --verbose --kernel-pull 5 --num 15000000 10 PPS rx: 0.000 MiB/t 0 pkts/t 0 drops/t 0 errors/t trafgen --in configs/64.cfg --out eth5 --verbose --kernel-pull 5 --num 15000000 TX,V2: 238.41 MiB, 122064 Frames, each 2048 Byte allocated $ trafgen --in configs/65.cfg --out eth5 --verbose --kernel-pull 5 --cpus 1 -t 0 --num 15000000 3 * 15000000 (Send and Recv) 468689 PPS $ trafgen --in configs/64.cfg --out eth5 --verbose -t 0 --num 15000000 3 * 15000000 (Send and Recv) 177012 PPS $ trafgen --in configs/64.cfg --out eth2 --verbose --kernel-pull 5 -t 0 --num 15000000 3 * 15000000 (Send and Recv) 176821 PPS === eth2 - tg3 $ trafgen --in configs/64.cfg --out eth2 --verbose --kernel-pull 5 --cpus 1 --num 3 * 15000000 (Send and Recv) 196817 PPS $ trafgen --in configs/64.cfg --out eth2 --verbose --num 15000000 1 * 14978089 (Send and Recv) 223788 PPS $ trafgen --in configs/64.cfg --out eth2 --verbose --kernel-pull 5 --num 15000000 rx: 0.000 MiB/t 0 pkts/t 0 drops/t 0 errors/t $ trafgen --in configs/64.cfg --out eth2 --verbose --kernel-pull 5 --cpus 1 -t 0 --num 15000000 3 * 15000000 (Send and Recv) 335313 PPS $ trafgen --in configs/64.cfg --out eth2 --verbose -t 0 --num 15000000 3 * 15000000 (Send and Recv) 151974 PPS $ trafgen --in configs/64.cfg --out eth2 --verbose --kernel-pull 5 -t 0 --num 15000000 3 * 15000000 150403 PPS |
On two beefier machines, running base install of Debian, trafgen still has the same issue when specifying --num if it's called from a shell script or at job doesn't generate all the packets. Though, on the command-line, for these systems, I don't need to use the kernel pull option and I get my best PPS rate when using -t 0 and binding to a single cpu just like on the older machines. I'll test the examples from my last post on the system soon. |
Tests on new system, Dell Poweredge 1950. $ uname -a [ 3100.362602] bnx2 0000:07:00.0: eth1: Broadcom NetXtreme II BCM5708 1000Base-T (B2) PCI-X 64-bit 133MHz found at mem f4000000, IRQ 16, node addr 00:1e:c9:b2:d5:41 $ ethtool -i eth1 $ lscpu $ trafgen --in configs/64.cfg --out eth1 --verbose --num 15000000 $ trafgen --in configs/64.cfg --out eth1 --verbose --kernel-pull 5 --num 15000000 $ trafgen --in configs/64.cfg --out eth1 --verbose --kernel-pull 5 -t 0 --num 15000000 $ trafgen --in configs/64.cfg --out eth1 --verbose -t 0 --num 15000000 |
FYI: I installed the latest mainline/vanilla kernel, 3.11.0, and noticed that trafgen sends more packets than requested by --num. This is the first time I've seen this. With this came a new module, the driver version is now 2.2.3 instead of 2.1.11. I don't know if this could be related or not. $ ethtool -i eth1 $ trafgen --in configs/64.cfg --out eth1 --verbose --cpus 1 -t 0 --num 15000000 1 * 15000009 |
FYI: I'm using pktgen in the same way without problems so I don't think it can be a network driver issue |
trafgen -v
trafgen 0.5.8-rc2+ (Ziggomatic), Git id: v0.5.8-rc2-26-gc2887b3
I'm having two separate issues.
I'm having an issue with trafgen where the only way I can get it to generate the exact number of packets specified by --num is if I do this AND by issuing it to the shell in contrast from using the same command multiple times in script:
$ trafgen --in configs/64.cfg --out eth2 --verbose --kernel-pull 5 --cpus 1 --num 15000000
--kernel-pull 6 works as well.
I've tried various kernel pulls, CPU, and ring size combinations and found that the
above is the only one where my system will generate all 15000000 packets.
I'm reporting no tx loss on the sending host. I've been watching /proc/net/dev and ethtool and do not see any tx discards or drops.
If I launch trafgen with the same arguments and options from a shell script or atd job
the number of packets actually sent vary greatly. For my tests I'm running trafgen
every 3 minutes. The script is executed via crond on the sending host every hour.
!/bin/bash
sleep 10
for i in {0..29..3}
do
echo "trafgen --in configs/64.cfg --out eth2 --verbose --kernel-pull 5 --cpus 1 --num 15000000" | at now +${i}min
done
The receiving and sending machine's /proc/net/dev packet column
show the following values. 1 for each of 10 runs per tool is listed.
I'm not sure why the first trafgen instance for each tool sends the full
15000000 packets and the rest slack off.
root@recv:~/64# grep ^eth2: *.stat | awk '{ print $1, $3 }'
daemonlogger.stat:eth2: 15000000
daemonlogger.stat:eth2: 13691387
daemonlogger.stat:eth2: 13441450
daemonlogger.stat:eth2: 13884259
daemonlogger.stat:eth2: 13757665
daemonlogger.stat:eth2: 13714474
daemonlogger.stat:eth2: 13581056
daemonlogger.stat:eth2: 13530621
daemonlogger.stat:eth2: 13562485
daemonlogger.stat:eth2: 13460224
dumpcap.stat:eth2: 15000000
dumpcap.stat:eth2: 13984965
dumpcap.stat:eth2: 13974693
dumpcap.stat:eth2: 13772195
dumpcap.stat:eth2: 13914422
dumpcap.stat:eth2: 14044146
dumpcap.stat:eth2: 13782769
dumpcap.stat:eth2: 13813973
dumpcap.stat:eth2: 13869773
dumpcap.stat:eth2: 13756627
...
Here's two tests to demonstrate the difference between the # packets sent on my machine and the the trafgen options used. The /proc/net/dev output below is on the sending machine from which trafgen is running.
$ trafgen --in configs/64.cfg --out eth2 --verbose --kernel-pull 5 --cpus 1 --num 15000000
eth2: 0 0 0 0 0 0 0 0 1020000000 15000000 0 0 0 0 0 0
$ trafgen --in configs/64.cfg --out eth2 --verbose --num 15000000
eth2: 0 0 0 0 0 0 0 0 1016840720 14953540 0 0 0 0 0 0
Here's a diff between the ethtool output of each:
$ diff good.ethtool.txt bad.ethtool.txt
28c28
< tx_octets: 1020000000
The text was updated successfully, but these errors were encountered: