= TTCP
image:docs/img/ttcp-logo.png[]
TTCP(Test TCP) is an utility to measure TCP throughput through an IP path, test tcp connection, transfers fabricated buffers or data copied from stdin.
TTCP has long history, original created in 18 Dec 84 under 4.2BSD, since then the TTCP improved or modified by several professor/students/engineers/architects, what in this branch there has 3 key improvements:
- Add more options and a conf file /etc/ttcp.conf to adjust Linux Kernel TCP/IP profile in a fine-grained way
- recv side multiple processes ability, which the server side support multi-threads, no exit once a transaction finished
- cloud-native support, both recv and trans can run on K8S and Docker
To use TTCP, start the receiver on one side of the path, then start the transmitter on the other side. The transmitting side sends a specified number of TCP packets to the receiving side. At the end of the test, the two sides display the number of bytes transmitted and the time elapsed for the packets to pass from one end to the other.
[source, bash]
.Install TTCP
rpm -ivh ttcp-1.14-2.x86_64.rpm
[source, bash]
.Install TTCP(Docker)
docker pull cloudadc/ttcp:1.14-2
Either edit the options in /etc/ttcp.conf
prior to TTCP starting, or pass options as arguments while TTCP starting
[source, bash]
.Run TTCP
ttcp -t [-options] host [ < in ]
ttcp -r [-options] [multicast-group][ > out]
[source, bash]
.Run TTCP(Docker)
// recv side
docker run -it --rm --name ttcp-r cloudadc/ttcp:1.14-2
// trans side
docker run --rm --link ttcp-r cloudadc/ttcp:1.14-2-cli ttcp -t ttcp-r
Dockerhub link: https://hub.docker.com/r/cloudadc/ttcp.
Refer to link:docs/USERGUIDE.adoc[User Guide] for usage reference, and link:docs/DEVGUIDE.adoc[Developer Guide] for development reference.
== TTCP for K8S performance benchmark
=== Native Networking Performance
image:docs/img/k8s-native-net-performance.png[]
link:docs/k8s-native-net-performance.csv[origin test statistics.]
- Pods on same hosts have more than 1.6 times TPS of pods across hosts in East-West traffic transmit.
- Pods on same hosts can approach half of NIC throughput in East-West traffic transmit.
- Pods on same hosts are faster than host to host East-West traffic transmit.
- Hostnetwork are the fastest way for North-South traffic transmit.
- Hostnetwork has the same performance as host to host, can approach half of NIC in North-South traffic transmit.
- NodePort node local mode have around 1.6 times TPS of NodePort node on cluster mode North-South traffic transmit.
- HostPort has same performance as NodePort node local in North-South traffic transmit.
- NodePort node on cluster North-South has worst performance, than ClusterIP pod across hosts East-West.
== How to Contribute
git clone git@github.com:/ttcp.git
2. Do some coding and submit a PR2. Do some coding and submit a PR