NTTTCP

安装NTTTCP

Windows安装NTTTCP

下载Windows版NTTTCP ntttcp.exe

Linux安装NTTTCP

安装必备软件

1sudo yum install gcc git make -y
1sudo apt-get -y install build-essential git
1sudo zypper in -y git-core gcc make

编译安装NTTTCP-for-Linux

1git clone https://github.com/Microsoft/ntttcp-for-linux
2cd ntttcp-for-linux/src
3sudo make && sudo make install

ntttcp帮助说明

 1➜  ~ ntttcp -h
 2NTTTCP for Linux 1.4.0
 3---------------------------------------------------------
 4Author: Shihua (Simon) Xiao, [email protected]
 5ntttcp: [-r|-s|-D|-M|-L|-e|-H|-P|-n|-l|-6|-u|-p|-f|-b|-B|-W|-t|-C|-N|-O|-x|-j|-Q|-V|-h|-m <mapping>]
 6        [--show-tcp-retrans|--show-nic-packets|--show-dev-interrupts|--fq-rate-limit]
 7
 8        -r   Run as a receiver
 9        -s   Run as a sender
10        -D   Run as daemon
11        -M   [receiver only] multi-clients mode
12        -L   [sender only] indicates this is the last client when receiver is running with multi-clients mode
13        -e   [receiver only] use epoll() instead of select()
14        -H   [receiver only] hold receiver always running even after one test finished
15        -P   Number of ports listening on receiver side [default: 16] [max: 512]
16        -n   [sender only] number of threads per each receiver port     [default: 4] [max: 25600]
17        -l   [sender only] number of connections per each sender thread [default: 1] [max: 1000]
18        -6   IPv6 mode    [default: IPv4]
19        -u   UDP mode     [default: TCP]
20        -p   Destination port number, or starting port number    [default: 5001]
21        -f   Fixed source port number, or starting port number    [default: 25001]
22        -b   <buffer size in n[KMG] Bytes>    [default: 65536 (receiver); 131072 (sender)]
23        -B   <bandwidth limit in n[KMG] bits/sec> set limit to the bandwidth
24        -W   Warm-up time in seconds          [default: 0]
25        -t   Time of test duration in seconds [default: 60]
26        -C   Cool-down time in seconds        [default: 0]
27        -N   No sync, senders will start sending as soon as possible
28             Otherwise, will use 'destination port - 1' as sync port    [default: 5000]
29        -O   Save console log to file, by default saves to ntttcp-for-linux-log.log
30        -x   Save output to XML file, by default saves to ntttcp-for-linux-log.xml
31        -j   Save output to JSON file, by default saves to ntttcp-for-linux-log.json
32        -Q   Quiet mode
33        -V   Verbose mode
34        -h   Help, tool usage
35        -m   <mapping>  for the purpose of compatible with Windows ntttcp usage
36             Where a mapping is a 3-tuple of NumberOfReceiverPorts, Processor, ReceiverAddress:
37             NumberOfReceiverPorts:    [default: 16]  [max: 512]
38             Processor:         *, or cpuid such as 0, 1, etc
39             e.g. -m 8,*,192.168.1.1
40                    If for receiver role: 8 threads listening on 8 ports (one port per thread) on the network 192.168.1.1;
41                        and those threads will run on all processors.
42                    If for sender role: receiver has 8 ports listening on the network 192.168.1.1;
43                        sender will create 8 threads to talk to all of those receiver ports
44                        (1 sender thread to one receiver port; this can be overridden by '-n');
45                        and all sender threads will run on all processors.
46
47        --show-tcp-retrans      Show system TCP retransmit counters in log from /proc
48        --show-nic-packets <network interface name>
49                                Show number of packets transferred (tx and rx) through this network interface
50        --show-dev-interrupts <device differentiator>
51                                Show number of interrupts for the devices specified by the differentiator
52                                Examples for differentiator: Hyper-V PCIe MSI, mlx4, Hypervisor callback interrupts, ...
53        --fq-rate-limit         Limit socket rate by Fair Queue (FQ) traffic policing
54
55Example:
56        receiver:
57        1) ./ntttcp -r
58        2) ./ntttcp -r 192.168.1.1
59        3) ./ntttcp -r -m 8,*,192.168.1.1 -6
60        4) ./ntttcp -r -m 8,0,192.168.1.1 -6 --show-tcp-retrans --show-nic-packets eth0 --show-dev-interrupts mlx4 -V
61        sender:
62        1) ./ntttcp -s
63        2) ./ntttcp -s 192.168.1.1
64        3) ./ntttcp -s -m 8,*,192.168.1.1 -n 16 -6
65        4) ./ntttcp -s 192.168.1.1 -P 64 -n 16 -l 10 -f25001 -6 -V
66        3) ./ntttcp -s 192.168.1.1 --fq-rate-limit 10G
67        4) ./ntttcp -s 192.168.1.1 -B 10G
68        4) ./ntttcp -s 192.168.1.1 --show-tcp-retrans --show-nic-packets eth0 --show-dev-interrupts mlx4 -V

NTTTCP主页 NTTTCP for Linux主页

#安装ntttcp #tcp #吞吐量 #吞吐量测试 #ntttcp使用

通过电邮回复 ↪