Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Netperf reporting zero throughput

I've installed netperf 2.6 in two sites and trying to run the netperf benchmark, but All I'm getting is zero Throughput... Does anyone knows how to use netperf properly? (I was following the official documentation)

I run this at a server:

 ./netserver -p xxxxx

the output is:

Starting netserver with host 'IN(6)ADDR_ANY' port 'xxxxx' and family AF_UNSPEC

In the other side I run:

./netperf -s 5 -H a.b.c.d -p xxxxx

The output is:

  MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to a.b.c.d () port 0 AF_INET : demo
  Recv   Send    Send
  Socket Socket  Message  Elapsed
  Size   Size    Size     Time     Throughput
  bytes  bytes   bytes    secs.    10^6bits/sec

  87380  16384  16384    10.00       0.00

any ideas?

like image 787
Daivid Avatar asked Aug 14 '26 10:08

Daivid


1 Answers

A netperf test has two "connections." The first is the "control connection" over which information about the test setup and result is exchanged. For the benchmarking itself a "data connection" is used. The control connection will use the control port you've specified with the global "-p" option. The data connection will by default use a port number chosen by the networking stack where the netserver runs.

Both have to be open through firewalls for a test to be successful.

If only the control port is open, you will see the test banners get displayed because the control connection is established. Since the data connection cannot be established, that will report zero.

You can specify an explicit port number for the data connection with a test-specific "-P" option. So, if you opened a second port number, 9992, you would start the netserver as before, and then your netperf command would become:

./netperf -s 5 -H a.b.c.d -p xxxxx -- -P ,9992

That comma is important. The test-specific -P option allows specifying both the local and remote port numbers for the data connection. The remote port number follows a comma.

like image 145
Rick Jones Avatar answered Aug 17 '26 00:08

Rick Jones



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!