X

Jeff Taylor's Weblog

  • Sun
    October 12, 2014

netperf on Solaris 11



I wanted to use netperf 2.6.0 on Solaris 11. See http://www.netperf.org/netperf/ for
details.


I had this error when I tried to build:

$ make
make  all-recursive
Making all in src
Making all in missing
Making all in m4
gcc -DHAVE_CONFIG_H -I. -I..       -MT netlib.o -MD -MP -MF .deps/netlib.Tpo -c -o netlib.o netlib.c
In file included from netlib.c:2245:0:
/usr/include/sys/processor.h: In function ‘bind_to_specific_processor’:
/usr/include/sys/processor.h:128:12: error: ‘processor_affinity’ redeclared as different kind of symbol
netlib.c:2222:32: note: previous definition of ‘processor_affinity’ was here



This was with gcc version 4.5.2.


Made the following changes in src/netlib.c:

$ diff netlib.c.ORIG netlib.c
2222c2222
< bind_to_specific_processor(int processor_affinity, int use_cpu_map)
---
> bind_to_specific_processor(int j_processor_affinity, int use_cpu_map)


2233c2233

<     mapped_affinity = lib_cpu_map[processor_affinity];
---
>     mapped_affinity = lib_cpu_map[j_processor_affinity];


2236c2236

<     mapped_affinity = processor_affinity;
---
>     mapped_affinity = j_processor_affinity;


And all was good.


FYI, I added these settings to increase performance on the 10-Gb network:

/usr/sbin/ndd -set /dev/tcp
tcp_conn_req_max_q 16384

/usr/sbin/ndd -set /dev/tcp tcp_conn_req_max_q0 16384

/usr/sbin/ndd -set /dev/tcp tcp_max_buf 2097152

/usr/sbin/ndd -set /dev/tcp tcp_xmit_hiwat 524288

/usr/sbin/ndd -set /dev/tcp tcp_recv_hiwat 524288

/usr/sbin/ndd -set /dev/tcp tcp_cwnd_max 2097152



The performance on the 10-Gb network is about 30% faster with the
tunables in place. The 1-Gb networks is not faster than it had
been.


See "ndd on Solaris 10" - https://blogs.oracle.com/taylor22/entry/ndd_on_solaris_10


Performance now looks good:

$ / usr/local/bin/netperf -fg -H my-server
MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0
AF_INET to my-server () port 0 AF_INET

Recv   Send    Send                         
Socket Socket  Message  Elapsed             
Size   Size    Size     Time     Throughput 
bytes  bytes   bytes    secs.    10^9bits/sec 

524288  65536  65536    10.00       9.90

References:
  1. My blog about ndd settings on Solaris
  2. How to Measure the Network Bandwidth Between Solaris Nodes?
  3. 2009 article about Netperf 2.4.5 on Solaris


Hope this helps.

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.