Coder Social home page Coder Social logo

microsoft / ntttcp-for-linux Goto Github PK

View Code? Open in Web Editor NEW
344.0 27.0 85.0 390 KB

A Linux network throughput multiple-thread benchmark tool.

Home Page: https://github.com/Microsoft/ntttcp-for-linux

License: MIT License

Makefile 0.79% C 87.92% CMake 0.26% Python 11.03%

ntttcp-for-linux's Introduction

NTTTCP-for-Linux

Summary

A multiple-threaded Linux network throughput benchmark tool.

Features

  • Multiple threads to send/receive data ('-P', '-n', and '-l'). By default, Receiver ('-r') uses 16 threads and Sender ('-s') uses 64 threads to exchange data.

  • Support cpu affinity ('-m').

  • Support running in background (daemon, '-D').

  • Support Sender and Receiver sync mode by default. Use "-N" (no_sync) to disable the sync.

  • Support testing with multiple clients mode (use '-M' on Receiver, and '-L' on the last Sender).

  • Support select() by default, and epoll() (use '-e' on Receiver).

  • Support both TCP (by default), and UDP ('-u') tests.

  • Support pin TCP server or client port (use '-p' on Receiver or '-f' on Sender).

  • Support test Warmup ('-W') and Cooldown ('-C').

  • Support reporting TCP retransmit ('--show-tcp-retrans').

  • Support reporting number of packets ('--show-nic-packets') and number of interrupts ('--show-dev-interrupts').

  • Support bandwidth limit ('-B' or '--fq-rate-limit').

  • Support capturing console log to file ('-O').

  • Support writing log into XML file ('-x').

  • Support writing log into JSON file ('-j').

Getting Started

Building NTTTCP-for-Linux

  • Using make:
	make; make install
  • Using CMake:
	cd src
	mkdir build && cd build
	cmake ..
	make && make install

Usage

ntttcp -h

Known issues

Example run

To measure the network performance between two multi-core serves running SLES 12, NODE1 (192.168.4.1) and NODE2 (192.168.4.2), connected via a 40 GigE connection.

On NODE1 (the receiver), run:

./ntttcp -r

(Translation: Run ntttcp as a receiver with default setting. The default setting includes: with 16 threads created and run across all CPUs, allocating 64K receiver buffer, and run for 60 seconds.)

And on NODE2 (the sender), run:

./ntttcp -s192.168.4.1

(Translation: Run ntttcp as a sender, with default setting. The default setting includes: with 64 threads created and run across all CPUs, allocating 128KB sender buffer, and run for 60 seconds.)

Using the above parameters, the program returns results on both the sender and receiver nodes, correlating network communication to CPU utilization.

Example receiver-side output from a given run (which showcases 37.66 Gbps throughput):

NODE1:/home/simonxiaoss/ntttcp-for-linux/src # ./ntttcp -s 10.0.0.1 -W 1 -t 10 -C 1
NTTTCP for Linux 1.3.4
---------------------------------------------------------
22:36:30 INFO: Network activity progressing...
22:36:30 INFO: 64 threads created
22:36:31 INFO: Test warmup completed.
22:36:42 INFO: Test run completed.
22:36:42 INFO: 64 connections tested
22:36:42 INFO: #####  Totals:  #####
22:36:42 INFO: test duration    :10.36 seconds
22:36:42 INFO: total bytes      :30629953536
22:36:42 INFO:   throughput     :23.65Gbps
22:36:42 INFO: cpu cores        :20
22:36:42 INFO:   cpu speed      :2394.455MHz
22:36:42 INFO:   user           :3.60%
22:36:42 INFO:   system         :3.44%
22:36:42 INFO:   idle           :91.57%
22:36:42 INFO:   iowait         :0.00%
22:36:42 INFO:   softirq        :1.38%
22:36:42 INFO:   cycles/byte    :1.37
22:36:42 INFO: cpu busy (all)   :159.81%
---------------------------------------------------------
22:40:52 INFO: Test cooldown is in progress...
22:40:52 INFO: Test cycle finished.

Related topics

  1. Windows ntttcp.exe

  2. Use ntttcp to test network throughput

  3. Linux Integration Services Automation, LISA

Terms of Use

By downloading and running this project, you agree to the license terms of the third party application software, Microsoft products, and components to be installed.

The third party software and products are provided to you by third parties. You are responsible for reading and accepting the relevant license terms for all software that will be installed. Microsoft grants you no rights to third party software.

License

The MIT License (MIT)

Copyright (c) 2015 Microsoft Corporation

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.