<font size=2 face="Courier New">Hello and thank you for your enthusiasm.</font>
<br><font size=2 face="Courier New">This helps me a lot.</font>
<br><font size=2 face="Courier New">Forgive me for the lack of command
lines…</font>
<br>
<br><font size=2 face="Courier New">&gt;rick: Tests against lo are only
that - tests against lo. &nbsp;I never can recall </font>
<br><font size=2 face="Courier New">&gt;exactly where the looping-back
takes place, but I know it includes no </font>
<br><font size=2 face="Courier New">&gt;driver path. &nbsp;I would consider
it merely a measure of CPU performance. </font>
<br><font size=2 face="Courier New">&gt;I suppose if loopback didn't do
more than say 5 Gbit you wouldn't expect </font>
<br><font size=2 face="Courier New">&gt;to get &gt; 5 Gbit with a &quot;real&quot;
NIC, but seeing say 24 Gbit/s does not </font>
<br><font size=2 face="Courier New">&gt;guarantee one will get 10 Gbit/s
through a 10GbE NIC.</font>
<br><font size=2 face="Courier New">&gt;</font>
<br><font size=2 face="Courier New">&gt;hangbin: I think lo test only affects
the TCP/IP stack, no relation with NIC</font>
<br><font size=2 face="Courier New">&gt;drivers.</font>
<br>
<br><font size=2 face="Courier New">Ok, this consideration could be an
answer to my low performance with the NIC.</font>
<br><font size=2 face="Courier New">I perform ‘netperf –H 127.0.0.1’
in my host and in my client, here are the results:</font>
<br><font size=2 face="Courier New">Server: </font>
<br><font size=2 face="Courier New">TCP STREAM TEST from 0.0.0.0 (0.0.0.0)
port 0 AF_INET to 127.0.0.1 (127.0.0.1) port 0 AF_INET</font>
<br><font size=2 face="Courier New">Recv &nbsp; Send &nbsp; &nbsp;Send
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp;</font>
<br><font size=2 face="Courier New">Socket Socket &nbsp;Message &nbsp;Elapsed
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</font>
<br><font size=2 face="Courier New">Size &nbsp; Size &nbsp; &nbsp;Size
&nbsp; &nbsp; Time &nbsp; &nbsp; Throughput &nbsp;</font>
<br><font size=2 face="Courier New">bytes &nbsp;bytes &nbsp; bytes &nbsp;
&nbsp;secs. &nbsp; &nbsp;10^6bits/sec &nbsp;</font>
<br>
<br><font size=2 face="Courier New">&nbsp;87380 &nbsp;16384 &nbsp;16384
&nbsp; &nbsp;10.00 &nbsp; &nbsp;7040.84</font>
<br>
<br><font size=2 face="Courier New">Client:</font>
<br><font size=2 face="Courier New">TCP STREAM TEST from 0.0.0.0 (0.0.0.0)
port 0 AF_INET to 127.0.0.1 (127.0.0.1) port 0 AF_INET</font>
<br><font size=2 face="Courier New">Recv &nbsp; Send &nbsp; &nbsp;Send
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp;</font>
<br><font size=2 face="Courier New">Socket Socket &nbsp;Message &nbsp;Elapsed
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</font>
<br><font size=2 face="Courier New">Size &nbsp; Size &nbsp; &nbsp;Size
&nbsp; &nbsp; Time &nbsp; &nbsp; Throughput &nbsp;</font>
<br><font size=2 face="Courier New">bytes &nbsp;bytes &nbsp; bytes &nbsp;
&nbsp;secs. &nbsp; &nbsp;10^6bits/sec &nbsp;</font>
<br>
<br><font size=2 face="Courier New">&nbsp;87380 &nbsp;16384 &nbsp;16384
&nbsp; &nbsp;10.00 &nbsp; &nbsp;20641.52 &nbsp; </font>
<br>
<br><font size=2 face="Courier New">It seems that my server will be limiting
under your considerations.</font>
<br>
<br><font size=2 face="Courier New">&gt;rick: I'm not sure that UDP sockets
get autotuned. &nbsp;They are what they are, </font>
<br><font size=2 face="Courier New">&gt;and what netperf reports will be
what they are. &nbsp;What message size are </font>
<br><font size=2 face="Courier New">&gt;you sending?</font>
<br><font size=2 face="Courier New">&gt;</font>
<br><font size=2 face="Courier New">&gt;You should look at per-CPU utilization,
and the udp statistics in </font>
<br><font size=2 face="Courier New">&gt;netstat -s output - particularly
on the receiver. &nbsp;For completeness you </font>
<br><font size=2 face="Courier New">&gt;should also look at the ethtool
-S statistics for the interfaces on </font>
<br><font size=2 face="Courier New">&gt;either side.</font>
<br>
<br><font size=2 face="Courier New">&gt;hangbin: Our TCP_STREAM and UDP_STREAM
test could reach &gt; 9.5G/s on local &gt;lab with 10G switch and NICs.
you can try to enable gro or something else.</font>
<br><font size=2 face="Courier New">&gt;And please paste your command lines
and NIC drivers.</font>
<br>
<br><font size=2 face="Courier New">Ok for the nestat and ethtool stat.
This is a good alternative to CPU utilization provided by Netperf. I will
watch in this direction.</font>
<br><font size=2 face="Courier New">I use packet size from 18 bytes to
8900 with a MTU of 9000. Here are the results of a basic Netperf without
changing packet size:</font>
<br>
<br><font size=2 face="Courier New">netperf –H ip_addr –t UDP_STREAM</font>
<br>
<br><font size=2 face="Courier New">From client to server:</font>
<br><font size=2 face="Courier New">UDP UNIDIRECTIONAL SEND TEST from 0.0.0.0
(0.0.0.0) port 0 AF_INET to 10.0.17.200 (10.0.17.200) port 0 AF_INET</font>
<br><font size=2 face="Courier New">Socket &nbsp;Message &nbsp;Elapsed
&nbsp; &nbsp; &nbsp;Messages &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp;</font>
<br><font size=2 face="Courier New">Size &nbsp; &nbsp;Size &nbsp; &nbsp;
Time &nbsp; &nbsp; &nbsp; &nbsp; Okay Errors &nbsp; Throughput</font>
<br><font size=2 face="Courier New">bytes &nbsp; bytes &nbsp; &nbsp;secs
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# &nbsp; &nbsp; &nbsp;# &nbsp;
10^6bits/sec</font>
<br>
<br><font size=2 face="Courier New">112640 &nbsp; 65507 &nbsp; 10.00 &nbsp;
&nbsp; &nbsp; 82227 &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp;4309.12</font>
<br><font size=2 face="Courier New">108544 &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; 10.00 &nbsp; &nbsp; &nbsp; 40416 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
2118.01</font>
<br>
<br><font size=2 face="Courier New">From server to client:</font>
<br><font size=2 face="Courier New">UDP UNIDIRECTIONAL SEND TEST from 0.0.0.0
(0.0.0.0) port 0 AF_INET to 10.0.17.11 (10.0.17.200) port 0 AF_INET</font>
<br><font size=2 face="Courier New">Socket &nbsp;Message &nbsp;Elapsed
&nbsp; &nbsp; &nbsp;Messages &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp;</font>
<br><font size=2 face="Courier New">Size &nbsp; &nbsp;Size &nbsp; &nbsp;
Time &nbsp; &nbsp; &nbsp; &nbsp; Okay Errors &nbsp; Throughput</font>
<br><font size=2 face="Courier New">bytes &nbsp; bytes &nbsp; &nbsp;secs
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# &nbsp; &nbsp; &nbsp;# &nbsp;
10^6bits/sec</font>
<br>
<br><font size=2 face="Courier New">108544 &nbsp; 65507 &nbsp; 10.00 &nbsp;
&nbsp; &nbsp; 89012 &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp;4664.69</font>
<br><font size=2 face="Courier New">112640 &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; 10.00 &nbsp; &nbsp; &nbsp; 79607 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
4171.82</font>
<br>
<br><font size=2 face="Courier New">&gt;&gt; In TCP STREAM test, I also
run two tests: a standard TCP STREAM and a</font>
<br><font size=2 face="Courier New">&gt;&gt; standard TCP MAERTS and the
results are very different with a 10x ratio</font>
<br><font size=2 face="Courier New">&gt;&gt; for the TCP MAERTS. How is
it possible?</font>
<br>
<br><font size=2 face="Courier New">&gt;rick: In addition to repeating
the things to check from above, Please provide the specific command lines
being used.</font>
<br>
<br><font size=2 face="Courier New">Here are the results of a basic Netperf
test:</font>
<br>
<br><font size=2 face="Courier New">Netperf –H ip_addr –t TCP_STREAM
(or –t TCP_MAERTS)</font>
<br>
<br><font size=2 face="Courier New">From client to server</font>
<br><font size=2 face="Courier New">TCP STREAM TEST from 0.0.0.0 (0.0.0.0)
port 0 AF_INET to 10.0.17.200 (10.0.17.200) port 0 AF_INET</font>
<br><font size=2 face="Courier New">Recv &nbsp; Send &nbsp; &nbsp;Send
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp;</font>
<br><font size=2 face="Courier New">Socket Socket &nbsp;Message &nbsp;Elapsed
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</font>
<br><font size=2 face="Courier New">Size &nbsp; Size &nbsp; &nbsp;Size
&nbsp; &nbsp; Time &nbsp; &nbsp; Throughput &nbsp;</font>
<br><font size=2 face="Courier New">bytes &nbsp;bytes &nbsp; bytes &nbsp;
&nbsp;secs. &nbsp; &nbsp;10^6bits/sec &nbsp;</font>
<br>
<br><font size=2 face="Courier New">&nbsp;87380 &nbsp;16384 &nbsp;16384
&nbsp; &nbsp;10.19 &nbsp; &nbsp; 738.73 &nbsp; </font>
<br>
<br><font size=2 face="Courier New">From server to client:</font>
<br><font size=2 face="Courier New">TCP MAERTS TEST from 0.0.0.0 (0.0.0.0)
port 0 AF_INET to 10.0.17.200 (10.0.17.200) port 0 AF_INET</font>
<br><font size=2 face="Courier New">Recv &nbsp; Send &nbsp; &nbsp;Send
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp;</font>
<br><font size=2 face="Courier New">Socket Socket &nbsp;Message &nbsp;Elapsed
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</font>
<br><font size=2 face="Courier New">Size &nbsp; Size &nbsp; &nbsp;Size
&nbsp; &nbsp; Time &nbsp; &nbsp; Throughput &nbsp;</font>
<br><font size=2 face="Courier New">bytes &nbsp;bytes &nbsp; bytes &nbsp;
&nbsp;secs. &nbsp; &nbsp;10^6bits/sec &nbsp;</font>
<br>
<br><font size=2 face="Courier New">&nbsp;87380 &nbsp;16384 &nbsp;16384
&nbsp; &nbsp;10.00 &nbsp; &nbsp;4449.95 &nbsp;</font>
<br>
<br><font size=2 face="Courier New">How could it be faster in TCP than
in UDP... Does my server is so limiting?</font>
<br>
<br><font size=2 face="Courier New">&gt;rick: Based on how I interpret
your question, the TCP/IP stack is fully SMP. </font>
<br><font size=2 face="Courier New">&gt;However... &nbsp;a single &quot;flow&quot;
(eg TCP connection) will not make use of the </font>
<br><font size=2 face="Courier New">&gt;services of more than one or possibly
two CPUs on either end. &nbsp;One </font>
<br><font size=2 face="Courier New">&gt;unless one binds the netperf/netserver
to a CPU other than the one </font>
<br><font size=2 face="Courier New">&gt;taking interrupts from the NIC.</font>
<br>
<br><font size=2 face="Courier New">Ok for this, but I read that it is
better to get the TCP connection and the NIC interrupts on the same CPU
or group of CPU for memory access.</font>
<br><font size=2 face="Courier New">For my server, the interrupts are shared
out between my 8 cores due to architecture considerations.</font>
<br><font size=2 face="Courier New">For my client, the interrupts are located
on a single CPU.</font>
<br><font size=2 face="Courier New">Is it the spinlock which determines
which core processes TCP/IP stack? </font>
<br><font size=2 face="Courier New">A last question concerning TCP/IP stack:
TCP/IP input and TCP/IP output are distinct, could and should they run
in a separate core?</font>
<br>
<br><font size=2 face="Courier New">&gt;happy benchmarking,</font>
<br>
<br><font size=2 face="Courier New">&gt;rick jones</font>
<br>
<br><font size=2 face="Courier New">I hope this is clearer than my first
message.</font>
<br>
<br><font size=2 face="Courier New">Thank you in advance and have a nice
day.</font>
<br>
<br><font size=2 face="Courier New">Simon Duboué</font>
<br>