2012年8月2日 星期四

NTttcp

It is essentially a Winsock-based port of the ttcp tool that measures networking performance in terms of bytes transferred per second and CPU cycles per byte.
NTttcp can be configured in a variety of ways, including:

  • Software affinity for threads can be set to a specified processor index.
  • Asynchronous or synchronous data transfers.
  • Data verification at the application level for a pre-determined pattern in the application buffers.
  • Send and receive traffic from multiple IP addresses with single command.
  • Support IPv6 performance testing.
  • Support UDP performance testing.
  • Support time-driven testing.


Usage:
NTttcp [-s|-r] -m mapping
-s work as a sender
-r work as a receiver
-m mappping, Sessions,Processor,target ip address
-t runtime in seconds
Example:
NTttcp -s -m 4,0,192.168.10.11 -t 60
Sends 4 sessions on CPU 0 to host with ip address of 192.168.1.10 for 60 seconds.



Configuration:
Setup one system for receive and one system for send. Run the receive system first.
Example:
System A has an ip address of 192.168.10.10 and setup for Receive.
System B has an ip address of 192.168.10.11 and setup for Send.
Run NTttcp on System A:
NTttcp -R -m 4,0,192.168.10.11 -t 60
Note: the ip address is the expected sender’s ip.
Run NTttcp on System A:
NTttcp -R -m 4,0,192.168.10.10 -t 60
Note: the ip address is the receiver’s ip.
Monitor it with Windows Task Manager, Networking tab.
More options:
NTttcp: [-s|-r|-l|-n|-p|-a|-x|-rb|-sb|-i|-f|-u|-w|-d|-t|-cd|-wu|-nic] -m <mapping> [mapping]
-s work as a sender
-r work as a receiver
-l <Length of buffer> [default TCP: 64K, UDP: 128]
-n <Number of buffers> [default: 20K]
-p <port base> [default: 5001]
-sp synchronize data ports, if used -p should be same on every instance
-a <outstanding I/O>  [default: 2]
-x <PacketArray size> [default: 1]
-rb <Receive buffer size> [default: 64K]
-sb <Send buffer size>[default: 8K]
-u UDP send/recv
-w WSARecv/WSASend
-d Verify Flag
-t <Runtime> in seconds.
-cd <Cool-down> in seconds
-wu <Warm-up> in seconds
-nic <NIC IP> Use NIC with for sending data (sender only).
-m <mapping> [mapping]
where a mapping is a session(s),processor,StartReceiver IP set
e.g. -m 4,0,1.2.3.4 sets up:
4 sessions on processor 0 to test a network on 1.2.3.4

How to Use NTttcp
·         To use NTttcp as a receiver, change the name to NTttcpr.exe.
·         To use NTttcp as a sender, change the name to NTttcps.exe.
If you use NTttcp without changing the name, it functions as a receiver by default.

By default, NTttcp uses synchronous data transfer. Data transfer is controlled by the -a option. If you do not set the ‑a option, then the data transfer is synchronous.

We recommend that you increase the number of posted overlapped buffers for the receiver to ensure that the application has enough posted buffers for incoming data
For example:
ntttcpr.exe -m 1,0,10.11.12.1 -a 16 -fr
ntttcps.exe -m 1,0,10.11.12.1 -a 2

Single-Threaded Operation
Sender Syntax for Single-Threaded Operation
The following command line: NTttcps -m 1,0,10.1.2.3 -a 2

Receiver Syntax for Single-Threaded Operation
The following command line: NTttcpr -m 1,0,10.1.2.3 -a 6 -fr

Multi-Threaded Operation
Sender Syntax for Multi-Threaded Operation
The following command line: NTttcps -m 2,0,10.1.2.3 2,1,11.4.5.6 -a 2

Receiver Syntax for Multi-Threaded Operation
The following command line: NTttcpr -m 2,0,10.1.2.3 -a 6 -fr

NTttcp Best Practices
Tip: The following are good practices for the appropriate number of receive buffers:
  •  For 1‑gigabit links, use 6 receive outstanding buffers. 
  •  For 10‑gigabit links, use 16 receive outstanding buffers.
A single thread is usually sufficient to achieve line rate on a 1‑gigabit link, but multiple threads might be required to achieve line rate on a 10‑gigabit link.
To avoid tracking short receives, use the ‑fr (full receive) option on the receiver.


Reference:
http://msdn.microsoft.com
http://www.confignotes.com/2011/06/ntttcp/

沒有留言:

張貼留言