How to test network quality of server
Yesterday when I tried to solve the performance of Nextcloud, I learned how to test Internet quality for server. Finally it turned out that the limit is the transfer bandwidth instead of performance of Nextcloud. I should test internet quality at first then question about quality of synchronization software, which is the proper order and can save a lot of time. Now I would like to record useful tool to test internet quality.
Speedtest
Speedtest is used to test bandwidth of network for your machine.
Installation of speedtest
For Linux
Installation via apt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28## If migrating from prior bintray install instructions please first...
# sudo rm /etc/apt/sources.list.d/speedtest.list
# sudo apt-get update
# sudo apt-get remove speedtest
## Other non-official binaries will conflict with Speedtest CLI
# Example how to remove using apt-get
# sudo apt-get remove speedtest-cli
sudo apt-get install curl
curl -s https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.deb.sh | sudo bash
sudo apt-get install speedtest
2. Installation with binary
```bash
wget https://install.speedtest.net/app/cli/ookla-speedtest-1.2.0-linux-x86_64.tgz
tar -xvzf ookla-speedtest-1.2.0-linux-x86_64.tgz
# You do not need to give exectuable permission as it already has after extraction
### For macOS
```zsh
brew tap teamookla/speedtest
brew update
# Example how to remove conflicting or old versions using brew
# brew uninstall speedtest --force
# brew uninstall speedtest-cli --force
brew install speedtest --force
Usage of speedtest
1 | speedtest # or ./speedtest if you install with binary |
Iperf3
Iperf3 is used to test bandwidth or network speed between client and server.
Installation of iperf3
For Linux
Installation via apt
1
sudo apt-get install iperf3
For macOS
1 | brew install iperf3 |
Usage of iperf3
Server
1
iperf3 -s # Do not forget to open 5201 port in firewall
Client
1
2iperf3 -c domain_or_ip_of_server -i 1 -t 30 # Run a 30 second upload(data from client to server) tests, giving results every 1 second
iperf3 -c domain_or_ip_of_server -i 1 -t 30 -R # Run a 30 second download(data from server to client) tests, giving results every 1 second
NextTrace
NextTrace is an open source visual routing tool that pursues light weight, developed using Golang.
Installation of NextTrace
For Linux
One-click installation script
1
curl nxtrace.org/nt |bash
Installation with binary
1
2
3wget https://dl-na-lax1.nxtrace.org/dist/core/v1.3.7/nexttrace_linux_amd64
mv nexttrace_linux_amd64 nexttrace
chmod +x nexttrace
For macOS
1 | brew install nexttrace |
Usage of NextTrace
1 | nexttrace domain_or_ip # or nexttrace domain_or_ip if you install NextTrace with binary |
mtr
The mtr(my traceroute) command is a useful tool for testing package loss status.
From email content of CEO of RackNerd, Dustin Cisneros
MTR is indeed an invaluable tool for visualizing the path and performance of network traffic to a specific destination.
Installation of mtr
For Linux
I think most of Linux releases has mtr installed already. In case of not installed, just install as below.
1 | apt-get update |
For macOS
macOS also contains mtr in default if I do not remember wrong. In case of not installed, just install as below.
1 | brew install mtr |
Usage
1 | mtr -c 100 -r domain_or_ip # MTR with 100 report cycles. |
Reference
- https://www.speedtest.net/apps/cli
- https://iperf.fr/iperf-download.php
- https://github.com/esnet/iperf/releases
- https://fasterdata.es.net/performance-testing/network-troubleshooting-tools/iperf/
- https://serverfault.com/questions/985586/using-iperf3-to-test-upload-and-download
- https://cnboy.org/2588
- https://github.com/nxtrace/NTrace-core
- https://www.servermania.com/kb/articles/ubuntu-how-to-install-mtr
- https://support.cpanel.net/hc/en-us/articles/360062300093-How-to-use-MTR-on-MacOS