Chris's Wiki :: blog/tech/NetworkPerfBasicStep Commentshttps://utcc.utoronto.ca/~cks/space/blog/tech/NetworkPerfBasicStep?atomcommentsDWiki2012-05-15T03:05:37ZRecent comments in Chris's Wiki :: blog/tech/NetworkPerfBasicStep.By Chris Siebenmann on /blog/tech/NetworkPerfBasicSteptag:CSpace:blog/tech/NetworkPerfBasicStep:dcb8f40f7fb21845b975b240d7a5a7c7f3efb687Chris Siebenmann<div class="wikitext"><p>My experience is that plain TCP on ordinary machines (especially Linux)
can saturate gigabit Ethernet with no special tuning needed. Ttcp itself
generally needs an increased buffer count (<code>-n</code> parameter) in order for
a test to run long enough to give you a real feel for the bandwidth, but
that's it.</p>
<p>(My qualification is 'on the same subnet'; once you get into multi-hop
setups things get much more tangled. This also assumes no other traffic
going on at the same time.)</p>
<p>My personal view is that any modern OS that is not autotuned for gigabit
networking in terms of OS level buffering and so on is broken, but I
suppose that this is a bias (based on not using such systems).</p>
</div>2012-05-15T03:05:37ZFrom 72.10.119.241 on /blog/tech/NetworkPerfBasicSteptag:CSpace:blog/tech/NetworkPerfBasicStep:38354ddf49b73e7fb9e7d6698fe35cc3d3aa4478From 72.10.119.241<div class="wikitext"><p>As someone who's tried to saturate a gig network recently, it isn't always as easy as you make it sound. If you're using a pair of machines for send/receive, they should have their buffer sizes increased to make sure they can source/sink the volume of traffic (especially if you have a large RTT). Additionally, you should set the packet size to something large so you're sending as few (big) packets as possible.</p>
<p>A modern machine with big buffers and a large packet size can indeed flood a gig network without breaking a sweat. But if you use small packets (64 bytes, for example), you'd need to send 2 million per second to saturate a gig link, and most software network stacks can't generate this kind of traffic.</p>
<p>Using your recommendation of TTCP, you'd want to say:</p>
<pre>
ttcp -t -s -l 1440 -b 2097152 -n 2000000 targethost.example.com
</pre>
<p>That sets the packet size to 1440 (default is 8192, which is fine for TCP but too big for UDP on standard 1500-byte ethernet), and increases the buffer size to 2MB instead of the system default (which might be only 32kB!). We spent a while one time blaming our network gear when it turned out the endpoints weren't tuned properly to send/receive the volume of traffic we wanted to test...</p>
<p>Jason</p>
</div>2012-05-15T01:46:46Z