-
Notifications
You must be signed in to change notification settings - Fork 290
Open
Labels
Description
Describe the bug
I try to replay a 5GB pcap file for application tests. It contains about 22 million packets. I want to use specific speed, -M 10 or -M 30 for a slow pace.
Since Debian Trixie (tcpreplay 4.5.1) at the end of the file the tcpreplay speeds up. This didn't happen on bookworm (tcpreplay 4.4.3). I've build master branch today with the same result
To Reproduce
Steps to reproduce the behavior:
- I tested only with one PCAP file. It might be broken but worked before with different tcpreplay. It was cut and prepared (macs changed) using tcprewrite.
- I use local dummy type interface for sending packets.
- I tested with: tcpreplay -d 3 -M 30 -T nano --stats=1 --no-flow-stats somelarge.pcap. But originally without -T, -d and --stats behaves the same.
- ifstat and application see the rise of speed.
Expected behavior
Tcpreplay should sleep between packets until the end to keep the pace.
I observe instead:
inter eth0 eth1
KB/s in KB/s out KB/s in KB/s out KB/s in KB/s out
0.00 3661.93 0.70 1.55 0.00 0.00
0.00 3662.15 1.11 2.58 0.00 0.00
0.00 3661.99 1.82 3.46 0.00 0.00
0.00 3662.17 1.02 3.77 0.00 0.00
0.00 3662.15 0.86 4.28 0.00 0.00
0.00 3662.16 1.04 2.82 0.00 0.00
0.00 80680.24 7.22 14.66 0.00 0.00
0.00 83083.16 7.49 12.36 0.00 0.00
0.00 83659.08 8.91 24.20 0.00 0.00
0.00 80100.35 11.37 32.20 0.00 0.00
0.00 80349.06 8.90 26.05 0.00 0.00
0.00 77820.65 7.50 28.72 0.00 0.00
0.00 76222.75 1.68 15.24 0.00 0.00
0.00 78465.22 0.47 11.27 0.00 0.00
0.00 78210.75 0.06 2.27 0.00 0.00
0.00 81536.45 0.06 0.46 0.00 0.00
0.00 81650.00 0.13 0.58 0.00 0.00
0.00 78374.31 1.99 2.56 0.00 0.00
0.00 75183.51 0.00 0.00 0.00 0.00
0.00 80901.15 0.32 4.88 0.00 0.00
0.00 77221.99 0.00 0.00 0.00 0.00
0.00 75452.95 0.06 0.17 0.00 0.00
0.00 75474.68 6.78 12.86 0.00 0.00
0.00 71521.27 0.29 0.29 0.00 0.00
0.00 80867.65 1.42 12.61 0.00 0.00
0.00 81216.17 0.06 0.91 0.00 0.00
0.00 78079.23 0.40 0.79 0.00 0.00
0.00 85597.87 0.06 0.36 0.00 0.00
0.00 84288.10 11.01 16.59 0.00 0.00
0.00 79981.52 8.38 12.90 0.00 0.00
0.00 78126.55 11.10 38.87 0.00 0.00
0.00 83119.79 8.06 24.77 0.00 0.00
0.00 82222.70 6.39 26.32 0.00 0.00
0.00 78328.55 0.26 14.29 0.00 0.00
Aug 07 10:20:03 DEBUG1 in sendpacket.c:sendpacket_open_pf() line 998: sendpacket: using PF_PACKET
Aug 07 10:20:04 DEBUG2 in send_packets.c:send_packets() line 419: packet 1 caplen 134
Aug 07 10:20:04 DEBUG2 in send_packets.c:send_packets() line 545: Sending packet #1
Aug 07 10:20:04 DEBUG2 in send_packets.c:send_packets() line 419: packet 2 caplen 134
Aug 07 10:20:04 DEBUG3 in send_packets.c:calc_sleep_time() line 1103: packet size=134 nap=0s 12576nsec
Aug 07 10:20:04 DEBUG2 in send_packets.c:tcpr_sleep() line 1198: Sleeping: 0s 12576nsec
(since beginning it does sleep)
(...)
Aug 07 10:20:05 Test start: 1970-01-02 20:54:09.248116281 ...
Aug 07 10:20:05 Actual: 18062 packets (3750059 bytes) sent in 1.00 seconds
Aug 07 10:20:05 Rated: 3749744.0 Bps, 29.99 Mbps, 18060.48 pps
(...)
Aug 07 10:30:18 Actual: 11462618 packets (2302609947 bytes) sent in 614.02 seconds
Aug 07 10:30:18 Rated: 3750001.9 Bps, 30.00 Mbps, 18667.87 pps
(...)
Aug 07 10:30:18 DEBUG2 in send_packets.c:send_packets() line 419: packet 11478539 caplen 214
Aug 07 10:30:18 DEBUG3 in send_packets.c:calc_sleep_time() line 1103: packet size=214 nap=0s 0nsec
Aug 07 10:30:18 DEBUG2 in send_packets.c:send_packets() line 545: Sending packet #11478539
Aug 07 10:30:18 DEBUG2 in send_packets.c:send_packets() line 419: packet 11478540 caplen 214
Aug 07 10:30:18 DEBUG3 in send_packets.c:calc_sleep_time() line 1103: packet size=214 nap=0s 40546nsec
Aug 07 10:30:18 DEBUG2 in send_packets.c:tcpr_sleep() line 1198: Sleeping: 0s 40546nsec
Aug 07 10:30:18 DEBUG2 in send_packets.c:send_packets() line 545: Sending packet #11478540
Aug 07 10:30:18 DEBUG2 in send_packets.c:send_packets() line 419: packet 11478541 caplen 214
Aug 07 10:30:18 DEBUG3 in send_packets.c:calc_sleep_time() line 1103: packet size=214 nap=0s 0nsec
Aug 07 10:30:18 DEBUG2 in send_packets.c:send_packets() line 545: Sending packet #11478541
Aug 07 10:30:18 DEBUG2 in send_packets.c:send_packets() line 419: packet 11478542 caplen 214
Aug 07 10:30:18 DEBUG3 in send_packets.c:calc_sleep_time() line 1103: packet size=214 nap=0s 43100nsec
Aug 07 10:30:18 DEBUG2 in send_packets.c:tcpr_sleep() line 1198: Sleeping: 0s 43100nsec
Aug 07 10:30:18 DEBUG2 in send_packets.c:send_packets() line 545: Sending packet #11478542
Aug 07 10:30:18 DEBUG2 in send_packets.c:send_packets() line 419: packet 11478543 caplen 214
Aug 07 10:30:18 DEBUG3 in send_packets.c:calc_sleep_time() line 1103: packet size=214 nap=0s 0nsec
Aug 07 10:30:18 DEBUG2 in send_packets.c:send_packets() line 545: Sending packet #11478543
Aug 07 10:30:18 DEBUG2 in send_packets.c:send_packets() line 419: packet 11478544 caplen 214
Aug 07 10:30:18 DEBUG3 in send_packets.c:calc_sleep_time() line 1103: packet size=214 nap=0s 0nsec
(since this point until end of log it doesn't)
Aug 07 10:30:18 DEBUG2 in send_packets.c:send_packets() line 545: Sending packet #11478544
Aug 07 10:30:18 DEBUG2 in send_packets.c:send_packets() line 419: packet 11478545 caplen 214
Aug 07 10:30:18 DEBUG2 in send_packets.c:send_packets() line 545: Sending packet #11478545
Aug 07 10:30:18 DEBUG2 in send_packets.c:send_packets() line 419: packet 11478546 caplen 214
Aug 07 10:30:18 DEBUG2 in send_packets.c:send_packets() line 545: Sending packet #11478546
Aug 07 10:30:18 DEBUG2 in send_packets.c:send_packets() line 419: packet 11478547 caplen 214
Aug 07 10:30:18 DEBUG2 in send_packets.c:send_packets() line 545: Sending packet #11478547
Aug 07 10:30:18 DEBUG2 in send_packets.c:send_packets() line 419: packet 11478548 caplen 91
Aug 07 10:30:18 DEBUG2 in send_packets.c:send_packets() line 545: Sending packet #11478548
Aug 07 10:30:18 DEBUG2 in send_packets.c:send_packets() line 419: packet 11478549 caplen 214
Aug 07 10:30:18 DEBUG2 in send_packets.c:send_packets() line 545: Sending packet #11478549
Aug 07 10:30:18 DEBUG2 in send_packets.c:send_packets() line 419: packet 11478550 caplen 91
Aug 07 10:30:18 DEBUG2 in send_packets.c:send_packets() line 545: Sending packet #11478550
Aug 07 10:30:18 DEBUG2 in send_packets.c:send_packets() line 419: packet 11478551 caplen 214
Aug 07 10:30:18 DEBUG2 in send_packets.c:send_packets() line 545: Sending packet #11478551
Aug 07 10:30:18 DEBUG2 in send_packets.c:send_packets() line 419: packet 11478552 caplen 91
Aug 07 10:30:18 DEBUG2 in send_packets.c:send_packets() line 545: Sending packet #11478552
Aug 07 10:30:18 DEBUG2 in send_packets.c:send_packets() line 419: packet 11478553 caplen 214
Aug 07 10:30:18 DEBUG2 in send_packets.c:send_packets() line 545: Sending packet #11478553
Aug 07 10:30:18 DEBUG2 in send_packets.c:send_packets() line 419: packet 11478554 caplen 294
Aug 07 10:30:18 DEBUG2 in send_packets.c:send_packets() line 545: Sending packet #11478554
Aug 07 10:30:18 DEBUG2 in send_packets.c:send_packets() line 419: packet 11478555 caplen 214
Aug 07 10:30:18 DEBUG2 in send_packets.c:send_packets() line 545: Sending packet #11478555
Aug 07 10:30:18 DEBUG2 in send_packets.c:send_packets() line 419: packet 11478556 caplen 214
Aug 07 10:30:18 DEBUG2 in send_packets.c:send_packets() line 545: Sending packet #11478556
(...)
Aug 07 10:30:47 Statistics for network device: inter
Aug 07 10:30:47 Successful packets: 22649944
Aug 07 10:30:47 Failed packets: 0
Aug 07 10:30:47 Truncated packets: 0
Aug 07 10:30:47 Retried packets (ENOBUFS): 0
Aug 07 10:30:47 Retried packets (EAGAIN): 0
System (please complete the following information):
- Debian bookworm fine (tcpreplay 4.4.3-1)
- Debian trixie (4.5.1) or master 6fcbf03 - problem.