[netperf-talk] Packet size

Rick Jones rick.jones2 at hp.com
Thu Mar 26 09:47:24 PDT 2009


Clive Barker wrote:
> Hello,
> 
> is there an option for me to send traffic and include a packet size, i 
> need to generate several instances of netperf and have 3 separate runs 
> starting from 512bytes, 256bytes then 128bytes.
> 
> is this possible?

Is this TCP or UDP?  For UDP, since each send is a UDP datagram, you have direct 
control over the UDP datagram size with the test-specific -m option:

netperf -H <remote> -t UDP_STREAM -- -m 128

will have a stream of UDP datagrams with 128 byte user payloads, added to that 
will be 8 bytes of UDP header, 20 bytes (typically) of IPv4 header (or N bytes of 
IPv6 header) and then M bytes of data-link header (14 for Ethernet).

If this is TCP, you have _indirect_ control over the quantity of data in each TCP 
segment with a combination of the -m and -D (TCP_NODELAY):

netperf -H <remote> -t TCP_STREAM -- -m 128 -D

will *ask* TCP to not bundle-up successive sends into larger TCP segments.  So, 
barring packet losses and retransmissions that will be 128 bytes of user payload 
per segment, with 32 bytes (I'm including TCP timestamp option, 20 without it) of 
TCP header, and then IP and data-link headers as with UDP.

Keep in mind that while 128, 256 and 512 bytes are usually smaller than a link 
MTU, they don't _have_ to be, and so you could have either IP fragmentation in 
the UDP case or TCP segmentation.

Now, if you mean you wanted a *mix* of packet sizes in the same 
stream/flow/connection, that is something else, and is presently addressed in 
netperf4, the egg-laying-woolly-milk-pig :) netperf.

rick jones


More information about the netperf-talk mailing list