<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Threadnetperf on bramp.net</title>
    <link>https://blog.bramp.net/</link>
    <description>Recent content in Threadnetperf on bramp.net</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-GB</language>
    <lastBuildDate>Mon, 01 Jun 2009 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://blog.bramp.net/tags/threadnetperf/" rel="self" type="application/rss+xml" />
    
    <item>
      <title>Threadnetperf v1.0</title>
      <link>https://blog.bramp.net/post/2009/06/01/threadnetperf-v1.0/</link>
      <pubDate>Mon, 01 Jun 2009 00:00:00 +0000</pubDate>
      
      <guid>https://blog.bramp.net/post/2009/06/01/threadnetperf-v1.0/</guid>
      <description><p>Today I am proud to announce that I’m releasing a tool I’ve used privately for well over a year now. It is a multi-threaded network testing tool which gives the user great control over how many connections, threads and processes the tool uses, and which CPU cores the threads/processes are allowed to execute on.</p>
<p>Currently the tool runs on Linux, FreeBSD, and Windows, and has performance as good as (if not better) than other similar tools, such as netperf, iperf, but with the added flexibility. Additionally, Threadnetperf has been completely written from scratch in C, using modern programming techniques and APIs (such as ePoll on Linux) which ensures the program runs as far as possible with minimal overheads.</p>
<p>You can <a href="https://github.com/bramp/threadnetperf">download the source from GitHub</a>, which contains instructions on how to build it.</p>
<p>So that you get an extra idea of it’s features here is the README.txt</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">****** Threadnetperf ******
</span></span><span class="line"><span class="cl">A multi-threaded network benchmark tool
</span></span><span class="line"><span class="cl"> by  Andrew Brampton (2007-2009)
</span></span><span class="line"><span class="cl"> and Mathew Faulkner (2007-2009)
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">Threadnetperf is a highly customisable high performance network benchmarking
</span></span><span class="line"><span class="cl">tool. The key difference from previous tools is that the user is able to control
</span></span><span class="line"><span class="cl">how many threads threadnetperf uses, as well as which cores these threads are
</span></span><span class="line"><span class="cl">pinned to. This tool was useful in our research for measuring the effect of
</span></span><span class="line"><span class="cl">sending or receiving from one core, and having the OS network stack run on
</span></span><span class="line"><span class="cl">another core. Additionally the tool can be configured to use an unlimited number
</span></span><span class="line"><span class="cl">of connections, threads or processes, which scale considerably well due to the
</span></span><span class="line"><span class="cl">use of the epoll API.
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">Threadnetperf has previously worked on Windows, Linux, and FreeBSD, however, we
</span></span><span class="line"><span class="cl">do not test it very rigorously so one of these platforms may be broken. All
</span></span><span class="line"><span class="cl">patches are welcome.
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">To build on a *nix style system just use the simple &#34;Makefile&#34; by executing the
</span></span><span class="line"><span class="cl">command &#34;make&#34; or &#34;gmake&#34;. To build on Windows just use the provided
</span></span><span class="line"><span class="cl">threadnetperf.2008.sln file.
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">All the commands of Threadnetperf are documented within the application, but a
</span></span><span class="line"><span class="cl">quick overview is here:
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">Usage: threadnetperf [options] tests
</span></span><span class="line"><span class="cl">Usage: threadnetperf -D [options]
</span></span><span class="line"><span class="cl">       -c level,interval   Confidence level, must be 95 or 99
</span></span><span class="line"><span class="cl">       -D         Use daemon mode (wait for incoming tests)
</span></span><span class="line"><span class="cl">       -d time    Set duration to run the test for
</span></span><span class="line"><span class="cl">       -e         Eat the data (i.e. dirty it)
</span></span><span class="line"><span class="cl">       -H host    Set the remote host(and port) to connect to
</span></span><span class="line"><span class="cl">       -h         Display this help
</span></span><span class="line"><span class="cl">       -i min,max Set the minimum and maximum iterations
</span></span><span class="line"><span class="cl">       -m [t,p]   What programming model to use, [thread or process]
</span></span><span class="line"><span class="cl">       -n         Disable Nagle&#39;s algorithm (e.g no delay)
</span></span><span class="line"><span class="cl">       -p port    Set the port number for the first server thread to use
</span></span><span class="line"><span class="cl">       -s size    Set the send/recv size
</span></span><span class="line"><span class="cl">       -T         Timestamp packets, and measure latency (only on *nix)
</span></span><span class="line"><span class="cl">       -t         Use TCP
</span></span><span class="line"><span class="cl">       -r         Packets per second rate (default: ~0)
</span></span><span class="line"><span class="cl">       -u         Use UDP
</span></span><span class="line"><span class="cl">       -v         Verbose
</span></span><span class="line"><span class="cl">       -V         Display version only
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">       tests      Combination of cores and clients
</span></span><span class="line"><span class="cl">       tests      Core numbers are masks, for example 1 is core 0, 3 is core 0
</span></span><span class="line"><span class="cl">and core 1
</span></span><span class="line"><span class="cl">               N{c-s}   N connections
</span></span><span class="line"><span class="cl">                        c client cores mask
</span></span><span class="line"><span class="cl">                        s server cores mask
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">You can run tests locally, or across two machines. Here are some examples:
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">    threadnetperf -n -s 10000 1{1-1}
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">Will run a local TCP test, with Nagle&#39;s algorithm disabled, a send size of
</span></span><span class="line"><span class="cl">10,000, and 1 TCP connection between cores 0 and 0.
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">    threadnetperf 10{1-1} 10{2-2} 10{4-4}
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">Will again run a local TCP test, however this time 10 connection from core 0 to
</span></span><span class="line"><span class="cl">core 0, 10 connections from core 1 to core 1, and 10 connections from core 2 to
</span></span><span class="line"><span class="cl">core 2
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">To run across a network just start the threadnetperf daemon on one of the
</span></span><span class="line"><span class="cl">machines like so:
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">     threadnetperf -D
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">and on the other machine execute:
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">     threadnetperf -H serverIP 1{1-2}
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">which will conduct a TCP test from the client to the server, with one thread
</span></span><span class="line"><span class="cl">executing on client&#39;s core 0, and the server&#39;s core 1.
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">There is no need to give the threadnetperf daemon any options, as the options
</span></span><span class="line"><span class="cl">configured on the server will be passed over the network. This make running many
</span></span><span class="line"><span class="cl">tests very easy as the daemon will continue to wait for new tests until it is
</span></span><span class="line"><span class="cl">told otherwise.
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">If you find this tool useful, or you have any suggestions for improvements then
</span></span><span class="line"><span class="cl">please contact us.
</span></span></code></pre></div></description>
    </item>
    
  </channel>
</rss>
