Regarding bottlenecks for high speed packet generation

2 messages, 2 authors, 2012-10-25 · open the first message on its own page

Regarding bottlenecks for high speed packet generation

From: Ajith Adapa <hidden>
Date: 2012-10-25 17:47:26

Hi,

I am trying out a sample application written based on packet_mmap to
generate packets at line rates. I am using 3.4.10 kernel and a gigabit
nic card.
I have found some strange issues as mentioned below.

When I am transmitting packets sized 1500 bytes the socket buffers are
easily filled up eventhough if I increase the value of wmem_default
and wmem_max.
The memory I have allotted can fit around 14k packets of 1500 bytes
size. Is the NIC card not able to transmit them ?? How can I check it
??
I have even increased the Hardware tx queue size of NIC card from 256
to 4096 using ethtool.

Does traffic control causing any issue as I read it wont allow traffic bursts ?

Is there any way to find the major bottlenecks that would really cause
problems in high-speed packet generation.

Regards,
Ajith

Re: Regarding bottlenecks for high speed packet generation

From: Daniel Borkmann <hidden>
Date: 2012-10-25 18:04:43

On Thu, Oct 25, 2012 at 7:46 PM, Ajith Adapa [off-list ref] wrote:
I am trying out a sample application written based on packet_mmap to
generate packets at line rates. I am using 3.4.10 kernel and a gigabit
nic card.
I have found some strange issues as mentioned below.

When I am transmitting packets sized 1500 bytes the socket buffers are
easily filled up eventhough if I increase the value of wmem_default
and wmem_max.
The memory I have allotted can fit around 14k packets of 1500 bytes
size. Is the NIC card not able to transmit them ?? How can I check it
??
I have even increased the Hardware tx queue size of NIC card from 256
to 4096 using ethtool.

Does traffic control causing any issue as I read it wont allow traffic bursts ?
Actually in my experience not. On Gigabit Ethernet (depending on your
machine) you should be able to generate about 80k pps with 1500 byte
(e.g. with netsniff-ng's trafgen) having the default tc discipline.
Is there any way to find the major bottlenecks that would really cause
problems in high-speed packet generation.
Have you looked how much pps the kernel space pktgen can generate on
your machine with 1500 byte packets?

What tool do you use to measure this reported rate? Do you analyze
driver statistics from e.g. procfs, or do you use a libpcap-based tool
to measure the stuff (which you shouldn't since it could falsify your
stats)? How was your measurement setup?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help