May 3, 2018
by Lindsay Hill
PerfSonar is a super handy toolkit for measuring network performance between any two points. Combine this with the Guest VM built into the Extreme SLX series of switches, and you can easily run performance tests between any two points on your network, measuring performance, latency, jitter, MTU, path taken, etc. Combine that with StackStorm, and you can easily run those tests from Slack. No need to even login to a switch.
Check out the video here. From Slack, we can trigger different tests between any two switches – performance, one-way latency measurement, or trace the path, showing the path MTU. The results are then shown in Slack:
Read on for more about how to set this up.
We’ve put together a few technologies here:
Plus of course StackStorm, which is the operational ‘glue’, stitching together these elements, co-ordinating inputs, actions and outputs across our environment.
Here’s the basics for how to set this up:
HUBOT_TOKEN. Edit the
/opt/stackstorm/chatops/st2chatops.envfile on your StackStorm server, and add that
HUBOT_ADAPTER=slack, and restart the st2chatops service. Invite the bot to your Slack channel, and it should start responding to
authorized_keyson the Guest VM. Add entries to DNS or your hosts file so that you can ssh from your StackStorm server to the switches and their guest VM. Use the format
switch_name-tpvmfor the guest VM DNS entries.Set an IP address on
eth1on each Guest VM.
Set a corresponding IP on the SLX side, and configure the Insight port. Set up routing such that each Guest VM can ping every other Guest VM’s eth1 interface, across the data plane, not via the management network.
Install the perfSonar toolkit using these commands:
cd /etc/apt/sources.list.d/ wget http://downloads.perfsonar.net/debian/perfsonar-wheezy-release.list wget -qO - http://downloads.perfsonar.net/debian/perfsonar-debian-official.gpg.key | apt-key add - apt-get install perfsonar-toolkit
Install the st2_demos pack with
st2 pack install https://github.com/StackStorm/st2_demos.
This contains the alias file
/opt/stackstorm/packs/st2_demos/aliases/bwctl.yaml, and the workflow metadata and definitions,
You can of course edit these files, and move them to other packs.
You should now be ready to test it out. From Slack, run
If this is responding, try running a test. Start with a simple
iperf test, e.g.:
bwctl iperf slx1 slx2.
This will run an iperf test using the default timeout (60s) and bandwidth (1Gb). After a little over a minute, you should see a response in Slack, showing the measured performance between SLX1 and SLX2. This should be 1Gbps.
You can try running it with unlimited bandwidth, i.e.
bandwidth=0. You should see maximum performance of ~8.3Gbps. This is around the maximum you can achieve with a Linux VM, using a 10GbE connection.
Try running some other tests:
bwctl owamp slx2 slx1This will measure the one-way latency and hops between slx2 and slx1 (recall that ping measures round-trip time). This can be useful in situations where asymmetric routing may be happening.
bwctl tracepath slx1 slx2– this will show you the path between slx1 and slx2. It will also show you the path MTU – this is very handy if you’re investigating possible MTU issues.
Try it out, let us know how it goes!
You’ll also note that you don’t need to use the SLX Guest VM for this. If you have access to existing servers, you can run those tests between those systems too. You just need to install the perfSonar toolkit.