OpenShift 4 Network Performance Throughput Testing

Solution Verified - Updated

Environment

  • OpenShift Container Platform 4

Issue

  • How do I do performance testing to test the network bewteen nodes and pods?
  • What tool does RedHat use to test network performance?

Resolution

Content from github.com is not included.k8s-netperf is an upstream tool used by RedHat to test OpenShift releases. This tool is not supported by RedHat commercial support.

Download: Content from github.com is not included.k8s-netperf_Linux_v0.1.27_x86_64.tar.gz

Image: This content is not included.quay.io/rjhowe/oc-k8s-netperf:latest

Label nodes

Apply a label to the nodes you want to use as client and server for performance test.

$ oc label nodes node-name netperf=client
$ oc label nodes node-name netperf=server

Run k8s-netperf from an image

  • Run from any host where oc cli is present.
  • Provide a netperf.yml, example below, for custom configuration or leave out -v ./netperf.yml:/netperf.yml:z for default configuration.
  • For v ~/.kube/config:/config:z point to a cluster admin kubeconfig file. Can test with oc whoami --kubeconfig ~/.kube/config
$ podman run -it --rm --entrypoint /bin/k8s-netperf -v ./netperf.yml:/netperf.yml:z -v ~/.kube/config:/config:z -e KUBECONFIG=/config quay.io/rjhowe/oc-k8s-netperf:latest --all  --iperf --netperf --config ./netperf.yml 

Run test locally if binary is installed.

  • Run from any host where oc cli is present.
  • Make sure you are logged into OpenShift Cluster as a cluster admin before running.
$ k8s-netperf --config ./netperf.yml  --all  --iperf --netperf 

Sample test configuration, if configuration is not specified default will be used.

$ cat ./netperf.yml

tests :
  - TCPStream1:
    parallelism: 1
    profile: "TCP_STREAM"
    duration: 10
    samples: 3
    messagesize: 1024
    burst: 1
    service: false
  - TCPStream2:
    parallelism: 1
    profile: "TCP_STREAM"
    duration: 10
    samples: 3
    messagesize: 4096
    burst: 3
    service: false
SBR

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.