How do you test the network speed between two boxes?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I have a gigabit network set up in my house and a few Ubuntu based boxes. Out of complete curiosity I would like to check the speed between the two boxes. I am not having any problems with speed or anything, it really is just the geek in me that is curious. Plus maybe the results will let me know if there is room for improvement, or that I have something configured wrongly.
So how do you properly test the network speed between Ubuntu boxes?
networking testing bandwidth
add a comment |
I have a gigabit network set up in my house and a few Ubuntu based boxes. Out of complete curiosity I would like to check the speed between the two boxes. I am not having any problems with speed or anything, it really is just the geek in me that is curious. Plus maybe the results will let me know if there is room for improvement, or that I have something configured wrongly.
So how do you properly test the network speed between Ubuntu boxes?
networking testing bandwidth
add a comment |
I have a gigabit network set up in my house and a few Ubuntu based boxes. Out of complete curiosity I would like to check the speed between the two boxes. I am not having any problems with speed or anything, it really is just the geek in me that is curious. Plus maybe the results will let me know if there is room for improvement, or that I have something configured wrongly.
So how do you properly test the network speed between Ubuntu boxes?
networking testing bandwidth
I have a gigabit network set up in my house and a few Ubuntu based boxes. Out of complete curiosity I would like to check the speed between the two boxes. I am not having any problems with speed or anything, it really is just the geek in me that is curious. Plus maybe the results will let me know if there is room for improvement, or that I have something configured wrongly.
So how do you properly test the network speed between Ubuntu boxes?
networking testing bandwidth
networking testing bandwidth
edited Dec 7 '17 at 9:19
Zanna
51.2k13139243
51.2k13139243
asked Oct 17 '10 at 17:04
Jacob SchoenJacob Schoen
2,11052229
2,11052229
add a comment |
add a comment |
7 Answers
7
active
oldest
votes
I use iperf
. It's a client server arrangement in that you run it in server mode at one end and connect to its from another computer on the other side of the network.
One both machines run:
sudo apt-get install iperf
We'll start an iperf
server on one of the machines:
iperf -s
And then on the other computer, tell iperf
to connect as a client:
iperf -c <address of other computer>
On the client machine, you'll see something like this:
oli@bert:~$ iperf -c tim
------------------------------------------------------------
Client connecting to tim, TCP port 5001
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[ 3] local 192.168.0.4 port 37248 connected with 192.168.0.5 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.0 sec 1.04 GBytes 893 Mbits/sec
Of course, if you're running a firewall on the server machine, you'll need to allow connections on port 5001 or change the port with the -p
flag.
You can do pretty much the same thing with plain old nc
(netcat) if you're that way inclined. On the server machine:
nc -vvlnp 12345 >/dev/null
And the client can pipe a gigabyte of zeros through dd
over the nc
tunnel.
dd if=/dev/zero bs=1M count=1K | nc -vvn 10.10.0.2 12345
As demod:
$ dd if=/dev/zero bs=1M count=1K | nc -vvn 10.10.0.2 12345
Connection to 10.10.0.2 12345 port [tcp/*] succeeded!
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 9.11995 s, 118 MB/s
The timing there is given by dd
but it should be accurate enough as it can only output as fast the pipe will take it. If you're unhappy with that you could wrap the whole thing up in a time
call.
Remember that the result is in megabytes so multiply it by 8 to get a megabits-per-second speed. The demo above is running at 944mbps.
Man you have all the answers to my questions! My network apparently is not set up as well as yours only transfer at 714 MBytes and bandwith of 598 Mbits/sec. Dunno may look into that in the future. Thanks.
– Jacob Schoen
Oct 17 '10 at 17:24
In fairness the other box is only one switch (and 20meters of cat5e) away and there's no congestion. 600mbps is still pretty fast.
– Oli♦
Oct 17 '10 at 17:33
This is great, but I don't have root access to the server.
– Geoff
Dec 30 '13 at 20:59
Try -P 10. My result with single connection is similar to jschoens, but with 3+ parallel connections, it consistently pushes 920Mbps.
– wujj123456
May 14 '14 at 7:38
1
@CMCDragonkai You probably shouldn't testing resources that aren't yours. Bandwidth heavy tests can have an impact on short-term stability.
– Oli♦
Feb 5 '16 at 16:37
|
show 4 more comments
Same as Oli's recommendation for iperf. Just want to add several points:
- There are also windows clients that enables testing across
platforms.
-t <seconds>
changes the test length.-P <n>
changes the number of simultaneous connections. For example,iperf -c [target IP] -P 10 -t 30
tests 10 connections together for 30 seconds and gives aggregated results along with 10 separate connection speeds.- You don't need sudo. You can simply download the binary at http://iperf.fr/. It should work. Download it with
wget
, make it executable withchmod
, and you can directly run the binary. It works perfectly.
I found that, using default settings, the single connection speed fluctuates quite a bit. However, with 3+ parallel connections, the results are more consistent on my gigabyte switch. (consistently @ 910-920Mbps)
add a comment |
Using this script you can easily test connection speed between your machine and some remote host.
Example of using:
$ scp-speed-test.sh user@remote_host 80000
user@remote_host
is your destination host (you must have ssh-access
to this host)
80000
is the approximate size of test file (in kbs), which will be
received to the remote host. It is not mandatory argument.
3
This seems to test the speed of the SCP application, which will be lower than a test at a lower layer. For example, nc uses L4. Of course, this is great if you care more about the speed of SCP.
– sudo
Jan 26 '17 at 22:55
Has problems: This script writes & reads a file to disk - that's slower than ram, so can be an artificial slowdown. Also only sends zeros, in case they're compressed that's a big artificial speedup. If you do want pseudorandom data, don't use/dev/random
(it can block) orurandom
(link comments suggested that) they can be very slow too, instead use a dm-crypt (See cryptsetup's FAQ 2.19 How can I wipe a device with crypto-grade randomness?) maybe with a file in ram.
– Xen2050
Feb 20 '18 at 23:20
add a comment |
If you want to test your Ethernet LAN at a lower level you can use Etherate which is a free Linux CLI Ethernet testing tool:
https://github.com/jwbensley/Etherate
Throwing it in the mix as tools like iPerf (which are very good!) operate over IP and TCP or UDP. Etherate tests directly over Ethernet / OSI layer 2.
add a comment |
There are also some other nice command-line tools for bandwidth benchmarking between two hosts:
nuttcp
server$ nuttcp -S
client$ nuttcp -v -v -i1 1.1.1.1 ;# 1.1.1.1 is server's address
nepim
server$ nepim
client$ nepim -d -c 1.1.1.1 ;# 1.1.1.1 is server's address
goben
server$ goben
client$ goben -hosts 1.1.1.1 ;# 1.1.1.1 is server's address
1
How are these different from each other, and from iperf? Do they work the same, what do they do? nuttcp is in Debian & apparently "nuttcp is based on nttcp, which in turn was an enhancement by someone at Silicon Graphics (SGI) on the original ttcp, which was written by Mike Muuss at BRL sometime before December 1984, to compare the performance of TCP stacks by U.C. Berkeley and BBN to help DARPA decide which version to place in the first BSD Unix release."
– Xen2050
Feb 20 '18 at 23:28
add a comment |
as I pointed out in my comment at best answer, that solution is not good enough be cause client/server is not optimized to ... squeeze every bit of speed
my solution:
make a ramdisk on both sides (therefore, you aren't limited by storage speed and I suggest you made them with ramfs not tmpfs, so they won't go in swap ... just be careful not to leave at least 512M free memory for system, this is REQUIRED if you have giga ethernet, at that speed even SSDs may slow things down)
install apache on server, then create a link to ramdisk, create few large files on ramdisk (100M-1G, you can create them with dd from /dev/random or copy if you have some at hand)
then go client side and download them (also on that side's ramdisk) with an advanced download program, I used lftp
oh well, difference was major, from 75mbps reported by iperf and 9.5M/s netcat
to 11.18M/s with my solution:
1591129421 bytes transferred in 136 seconds (11.18M/s)
add a comment |
It's easy plug your computer on the first box, plug the other box to the first box. Then from your computer ping the first box save the result, ping the other box and do the substraction.
10
That shows network latency which is only one part of speed. For example my phone's 3G connection has huge latency (100-300ms) but it can still manage a throughput of 5mbps.
– Oli♦
Oct 17 '10 at 17:18
Not my fault if he asked speed but wanted throughput.
– Nyamiou The Galeanthrope
Dec 7 '17 at 17:48
1
Latency is reaction-time, not speed.
– wullxz
Apr 25 '18 at 10:01
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f7976%2fhow-do-you-test-the-network-speed-between-two-boxes%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
7 Answers
7
active
oldest
votes
7 Answers
7
active
oldest
votes
active
oldest
votes
active
oldest
votes
I use iperf
. It's a client server arrangement in that you run it in server mode at one end and connect to its from another computer on the other side of the network.
One both machines run:
sudo apt-get install iperf
We'll start an iperf
server on one of the machines:
iperf -s
And then on the other computer, tell iperf
to connect as a client:
iperf -c <address of other computer>
On the client machine, you'll see something like this:
oli@bert:~$ iperf -c tim
------------------------------------------------------------
Client connecting to tim, TCP port 5001
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[ 3] local 192.168.0.4 port 37248 connected with 192.168.0.5 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.0 sec 1.04 GBytes 893 Mbits/sec
Of course, if you're running a firewall on the server machine, you'll need to allow connections on port 5001 or change the port with the -p
flag.
You can do pretty much the same thing with plain old nc
(netcat) if you're that way inclined. On the server machine:
nc -vvlnp 12345 >/dev/null
And the client can pipe a gigabyte of zeros through dd
over the nc
tunnel.
dd if=/dev/zero bs=1M count=1K | nc -vvn 10.10.0.2 12345
As demod:
$ dd if=/dev/zero bs=1M count=1K | nc -vvn 10.10.0.2 12345
Connection to 10.10.0.2 12345 port [tcp/*] succeeded!
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 9.11995 s, 118 MB/s
The timing there is given by dd
but it should be accurate enough as it can only output as fast the pipe will take it. If you're unhappy with that you could wrap the whole thing up in a time
call.
Remember that the result is in megabytes so multiply it by 8 to get a megabits-per-second speed. The demo above is running at 944mbps.
Man you have all the answers to my questions! My network apparently is not set up as well as yours only transfer at 714 MBytes and bandwith of 598 Mbits/sec. Dunno may look into that in the future. Thanks.
– Jacob Schoen
Oct 17 '10 at 17:24
In fairness the other box is only one switch (and 20meters of cat5e) away and there's no congestion. 600mbps is still pretty fast.
– Oli♦
Oct 17 '10 at 17:33
This is great, but I don't have root access to the server.
– Geoff
Dec 30 '13 at 20:59
Try -P 10. My result with single connection is similar to jschoens, but with 3+ parallel connections, it consistently pushes 920Mbps.
– wujj123456
May 14 '14 at 7:38
1
@CMCDragonkai You probably shouldn't testing resources that aren't yours. Bandwidth heavy tests can have an impact on short-term stability.
– Oli♦
Feb 5 '16 at 16:37
|
show 4 more comments
I use iperf
. It's a client server arrangement in that you run it in server mode at one end and connect to its from another computer on the other side of the network.
One both machines run:
sudo apt-get install iperf
We'll start an iperf
server on one of the machines:
iperf -s
And then on the other computer, tell iperf
to connect as a client:
iperf -c <address of other computer>
On the client machine, you'll see something like this:
oli@bert:~$ iperf -c tim
------------------------------------------------------------
Client connecting to tim, TCP port 5001
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[ 3] local 192.168.0.4 port 37248 connected with 192.168.0.5 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.0 sec 1.04 GBytes 893 Mbits/sec
Of course, if you're running a firewall on the server machine, you'll need to allow connections on port 5001 or change the port with the -p
flag.
You can do pretty much the same thing with plain old nc
(netcat) if you're that way inclined. On the server machine:
nc -vvlnp 12345 >/dev/null
And the client can pipe a gigabyte of zeros through dd
over the nc
tunnel.
dd if=/dev/zero bs=1M count=1K | nc -vvn 10.10.0.2 12345
As demod:
$ dd if=/dev/zero bs=1M count=1K | nc -vvn 10.10.0.2 12345
Connection to 10.10.0.2 12345 port [tcp/*] succeeded!
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 9.11995 s, 118 MB/s
The timing there is given by dd
but it should be accurate enough as it can only output as fast the pipe will take it. If you're unhappy with that you could wrap the whole thing up in a time
call.
Remember that the result is in megabytes so multiply it by 8 to get a megabits-per-second speed. The demo above is running at 944mbps.
Man you have all the answers to my questions! My network apparently is not set up as well as yours only transfer at 714 MBytes and bandwith of 598 Mbits/sec. Dunno may look into that in the future. Thanks.
– Jacob Schoen
Oct 17 '10 at 17:24
In fairness the other box is only one switch (and 20meters of cat5e) away and there's no congestion. 600mbps is still pretty fast.
– Oli♦
Oct 17 '10 at 17:33
This is great, but I don't have root access to the server.
– Geoff
Dec 30 '13 at 20:59
Try -P 10. My result with single connection is similar to jschoens, but with 3+ parallel connections, it consistently pushes 920Mbps.
– wujj123456
May 14 '14 at 7:38
1
@CMCDragonkai You probably shouldn't testing resources that aren't yours. Bandwidth heavy tests can have an impact on short-term stability.
– Oli♦
Feb 5 '16 at 16:37
|
show 4 more comments
I use iperf
. It's a client server arrangement in that you run it in server mode at one end and connect to its from another computer on the other side of the network.
One both machines run:
sudo apt-get install iperf
We'll start an iperf
server on one of the machines:
iperf -s
And then on the other computer, tell iperf
to connect as a client:
iperf -c <address of other computer>
On the client machine, you'll see something like this:
oli@bert:~$ iperf -c tim
------------------------------------------------------------
Client connecting to tim, TCP port 5001
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[ 3] local 192.168.0.4 port 37248 connected with 192.168.0.5 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.0 sec 1.04 GBytes 893 Mbits/sec
Of course, if you're running a firewall on the server machine, you'll need to allow connections on port 5001 or change the port with the -p
flag.
You can do pretty much the same thing with plain old nc
(netcat) if you're that way inclined. On the server machine:
nc -vvlnp 12345 >/dev/null
And the client can pipe a gigabyte of zeros through dd
over the nc
tunnel.
dd if=/dev/zero bs=1M count=1K | nc -vvn 10.10.0.2 12345
As demod:
$ dd if=/dev/zero bs=1M count=1K | nc -vvn 10.10.0.2 12345
Connection to 10.10.0.2 12345 port [tcp/*] succeeded!
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 9.11995 s, 118 MB/s
The timing there is given by dd
but it should be accurate enough as it can only output as fast the pipe will take it. If you're unhappy with that you could wrap the whole thing up in a time
call.
Remember that the result is in megabytes so multiply it by 8 to get a megabits-per-second speed. The demo above is running at 944mbps.
I use iperf
. It's a client server arrangement in that you run it in server mode at one end and connect to its from another computer on the other side of the network.
One both machines run:
sudo apt-get install iperf
We'll start an iperf
server on one of the machines:
iperf -s
And then on the other computer, tell iperf
to connect as a client:
iperf -c <address of other computer>
On the client machine, you'll see something like this:
oli@bert:~$ iperf -c tim
------------------------------------------------------------
Client connecting to tim, TCP port 5001
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[ 3] local 192.168.0.4 port 37248 connected with 192.168.0.5 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.0 sec 1.04 GBytes 893 Mbits/sec
Of course, if you're running a firewall on the server machine, you'll need to allow connections on port 5001 or change the port with the -p
flag.
You can do pretty much the same thing with plain old nc
(netcat) if you're that way inclined. On the server machine:
nc -vvlnp 12345 >/dev/null
And the client can pipe a gigabyte of zeros through dd
over the nc
tunnel.
dd if=/dev/zero bs=1M count=1K | nc -vvn 10.10.0.2 12345
As demod:
$ dd if=/dev/zero bs=1M count=1K | nc -vvn 10.10.0.2 12345
Connection to 10.10.0.2 12345 port [tcp/*] succeeded!
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 9.11995 s, 118 MB/s
The timing there is given by dd
but it should be accurate enough as it can only output as fast the pipe will take it. If you're unhappy with that you could wrap the whole thing up in a time
call.
Remember that the result is in megabytes so multiply it by 8 to get a megabits-per-second speed. The demo above is running at 944mbps.
edited Feb 28 '16 at 13:42
answered Oct 17 '10 at 17:15
Oli♦Oli
224k89567767
224k89567767
Man you have all the answers to my questions! My network apparently is not set up as well as yours only transfer at 714 MBytes and bandwith of 598 Mbits/sec. Dunno may look into that in the future. Thanks.
– Jacob Schoen
Oct 17 '10 at 17:24
In fairness the other box is only one switch (and 20meters of cat5e) away and there's no congestion. 600mbps is still pretty fast.
– Oli♦
Oct 17 '10 at 17:33
This is great, but I don't have root access to the server.
– Geoff
Dec 30 '13 at 20:59
Try -P 10. My result with single connection is similar to jschoens, but with 3+ parallel connections, it consistently pushes 920Mbps.
– wujj123456
May 14 '14 at 7:38
1
@CMCDragonkai You probably shouldn't testing resources that aren't yours. Bandwidth heavy tests can have an impact on short-term stability.
– Oli♦
Feb 5 '16 at 16:37
|
show 4 more comments
Man you have all the answers to my questions! My network apparently is not set up as well as yours only transfer at 714 MBytes and bandwith of 598 Mbits/sec. Dunno may look into that in the future. Thanks.
– Jacob Schoen
Oct 17 '10 at 17:24
In fairness the other box is only one switch (and 20meters of cat5e) away and there's no congestion. 600mbps is still pretty fast.
– Oli♦
Oct 17 '10 at 17:33
This is great, but I don't have root access to the server.
– Geoff
Dec 30 '13 at 20:59
Try -P 10. My result with single connection is similar to jschoens, but with 3+ parallel connections, it consistently pushes 920Mbps.
– wujj123456
May 14 '14 at 7:38
1
@CMCDragonkai You probably shouldn't testing resources that aren't yours. Bandwidth heavy tests can have an impact on short-term stability.
– Oli♦
Feb 5 '16 at 16:37
Man you have all the answers to my questions! My network apparently is not set up as well as yours only transfer at 714 MBytes and bandwith of 598 Mbits/sec. Dunno may look into that in the future. Thanks.
– Jacob Schoen
Oct 17 '10 at 17:24
Man you have all the answers to my questions! My network apparently is not set up as well as yours only transfer at 714 MBytes and bandwith of 598 Mbits/sec. Dunno may look into that in the future. Thanks.
– Jacob Schoen
Oct 17 '10 at 17:24
In fairness the other box is only one switch (and 20meters of cat5e) away and there's no congestion. 600mbps is still pretty fast.
– Oli♦
Oct 17 '10 at 17:33
In fairness the other box is only one switch (and 20meters of cat5e) away and there's no congestion. 600mbps is still pretty fast.
– Oli♦
Oct 17 '10 at 17:33
This is great, but I don't have root access to the server.
– Geoff
Dec 30 '13 at 20:59
This is great, but I don't have root access to the server.
– Geoff
Dec 30 '13 at 20:59
Try -P 10. My result with single connection is similar to jschoens, but with 3+ parallel connections, it consistently pushes 920Mbps.
– wujj123456
May 14 '14 at 7:38
Try -P 10. My result with single connection is similar to jschoens, but with 3+ parallel connections, it consistently pushes 920Mbps.
– wujj123456
May 14 '14 at 7:38
1
1
@CMCDragonkai You probably shouldn't testing resources that aren't yours. Bandwidth heavy tests can have an impact on short-term stability.
– Oli♦
Feb 5 '16 at 16:37
@CMCDragonkai You probably shouldn't testing resources that aren't yours. Bandwidth heavy tests can have an impact on short-term stability.
– Oli♦
Feb 5 '16 at 16:37
|
show 4 more comments
Same as Oli's recommendation for iperf. Just want to add several points:
- There are also windows clients that enables testing across
platforms.
-t <seconds>
changes the test length.-P <n>
changes the number of simultaneous connections. For example,iperf -c [target IP] -P 10 -t 30
tests 10 connections together for 30 seconds and gives aggregated results along with 10 separate connection speeds.- You don't need sudo. You can simply download the binary at http://iperf.fr/. It should work. Download it with
wget
, make it executable withchmod
, and you can directly run the binary. It works perfectly.
I found that, using default settings, the single connection speed fluctuates quite a bit. However, with 3+ parallel connections, the results are more consistent on my gigabyte switch. (consistently @ 910-920Mbps)
add a comment |
Same as Oli's recommendation for iperf. Just want to add several points:
- There are also windows clients that enables testing across
platforms.
-t <seconds>
changes the test length.-P <n>
changes the number of simultaneous connections. For example,iperf -c [target IP] -P 10 -t 30
tests 10 connections together for 30 seconds and gives aggregated results along with 10 separate connection speeds.- You don't need sudo. You can simply download the binary at http://iperf.fr/. It should work. Download it with
wget
, make it executable withchmod
, and you can directly run the binary. It works perfectly.
I found that, using default settings, the single connection speed fluctuates quite a bit. However, with 3+ parallel connections, the results are more consistent on my gigabyte switch. (consistently @ 910-920Mbps)
add a comment |
Same as Oli's recommendation for iperf. Just want to add several points:
- There are also windows clients that enables testing across
platforms.
-t <seconds>
changes the test length.-P <n>
changes the number of simultaneous connections. For example,iperf -c [target IP] -P 10 -t 30
tests 10 connections together for 30 seconds and gives aggregated results along with 10 separate connection speeds.- You don't need sudo. You can simply download the binary at http://iperf.fr/. It should work. Download it with
wget
, make it executable withchmod
, and you can directly run the binary. It works perfectly.
I found that, using default settings, the single connection speed fluctuates quite a bit. However, with 3+ parallel connections, the results are more consistent on my gigabyte switch. (consistently @ 910-920Mbps)
Same as Oli's recommendation for iperf. Just want to add several points:
- There are also windows clients that enables testing across
platforms.
-t <seconds>
changes the test length.-P <n>
changes the number of simultaneous connections. For example,iperf -c [target IP] -P 10 -t 30
tests 10 connections together for 30 seconds and gives aggregated results along with 10 separate connection speeds.- You don't need sudo. You can simply download the binary at http://iperf.fr/. It should work. Download it with
wget
, make it executable withchmod
, and you can directly run the binary. It works perfectly.
I found that, using default settings, the single connection speed fluctuates quite a bit. However, with 3+ parallel connections, the results are more consistent on my gigabyte switch. (consistently @ 910-920Mbps)
edited Dec 5 '17 at 19:20
Eliah Kagan
83.2k22229369
83.2k22229369
answered May 14 '14 at 7:33
wujj123456wujj123456
30123
30123
add a comment |
add a comment |
Using this script you can easily test connection speed between your machine and some remote host.
Example of using:
$ scp-speed-test.sh user@remote_host 80000
user@remote_host
is your destination host (you must have ssh-access
to this host)
80000
is the approximate size of test file (in kbs), which will be
received to the remote host. It is not mandatory argument.
3
This seems to test the speed of the SCP application, which will be lower than a test at a lower layer. For example, nc uses L4. Of course, this is great if you care more about the speed of SCP.
– sudo
Jan 26 '17 at 22:55
Has problems: This script writes & reads a file to disk - that's slower than ram, so can be an artificial slowdown. Also only sends zeros, in case they're compressed that's a big artificial speedup. If you do want pseudorandom data, don't use/dev/random
(it can block) orurandom
(link comments suggested that) they can be very slow too, instead use a dm-crypt (See cryptsetup's FAQ 2.19 How can I wipe a device with crypto-grade randomness?) maybe with a file in ram.
– Xen2050
Feb 20 '18 at 23:20
add a comment |
Using this script you can easily test connection speed between your machine and some remote host.
Example of using:
$ scp-speed-test.sh user@remote_host 80000
user@remote_host
is your destination host (you must have ssh-access
to this host)
80000
is the approximate size of test file (in kbs), which will be
received to the remote host. It is not mandatory argument.
3
This seems to test the speed of the SCP application, which will be lower than a test at a lower layer. For example, nc uses L4. Of course, this is great if you care more about the speed of SCP.
– sudo
Jan 26 '17 at 22:55
Has problems: This script writes & reads a file to disk - that's slower than ram, so can be an artificial slowdown. Also only sends zeros, in case they're compressed that's a big artificial speedup. If you do want pseudorandom data, don't use/dev/random
(it can block) orurandom
(link comments suggested that) they can be very slow too, instead use a dm-crypt (See cryptsetup's FAQ 2.19 How can I wipe a device with crypto-grade randomness?) maybe with a file in ram.
– Xen2050
Feb 20 '18 at 23:20
add a comment |
Using this script you can easily test connection speed between your machine and some remote host.
Example of using:
$ scp-speed-test.sh user@remote_host 80000
user@remote_host
is your destination host (you must have ssh-access
to this host)
80000
is the approximate size of test file (in kbs), which will be
received to the remote host. It is not mandatory argument.
Using this script you can easily test connection speed between your machine and some remote host.
Example of using:
$ scp-speed-test.sh user@remote_host 80000
user@remote_host
is your destination host (you must have ssh-access
to this host)
80000
is the approximate size of test file (in kbs), which will be
received to the remote host. It is not mandatory argument.
edited Aug 10 '15 at 7:23
answered Aug 6 '15 at 19:40
VeLKerrVeLKerr
1631515
1631515
3
This seems to test the speed of the SCP application, which will be lower than a test at a lower layer. For example, nc uses L4. Of course, this is great if you care more about the speed of SCP.
– sudo
Jan 26 '17 at 22:55
Has problems: This script writes & reads a file to disk - that's slower than ram, so can be an artificial slowdown. Also only sends zeros, in case they're compressed that's a big artificial speedup. If you do want pseudorandom data, don't use/dev/random
(it can block) orurandom
(link comments suggested that) they can be very slow too, instead use a dm-crypt (See cryptsetup's FAQ 2.19 How can I wipe a device with crypto-grade randomness?) maybe with a file in ram.
– Xen2050
Feb 20 '18 at 23:20
add a comment |
3
This seems to test the speed of the SCP application, which will be lower than a test at a lower layer. For example, nc uses L4. Of course, this is great if you care more about the speed of SCP.
– sudo
Jan 26 '17 at 22:55
Has problems: This script writes & reads a file to disk - that's slower than ram, so can be an artificial slowdown. Also only sends zeros, in case they're compressed that's a big artificial speedup. If you do want pseudorandom data, don't use/dev/random
(it can block) orurandom
(link comments suggested that) they can be very slow too, instead use a dm-crypt (See cryptsetup's FAQ 2.19 How can I wipe a device with crypto-grade randomness?) maybe with a file in ram.
– Xen2050
Feb 20 '18 at 23:20
3
3
This seems to test the speed of the SCP application, which will be lower than a test at a lower layer. For example, nc uses L4. Of course, this is great if you care more about the speed of SCP.
– sudo
Jan 26 '17 at 22:55
This seems to test the speed of the SCP application, which will be lower than a test at a lower layer. For example, nc uses L4. Of course, this is great if you care more about the speed of SCP.
– sudo
Jan 26 '17 at 22:55
Has problems: This script writes & reads a file to disk - that's slower than ram, so can be an artificial slowdown. Also only sends zeros, in case they're compressed that's a big artificial speedup. If you do want pseudorandom data, don't use
/dev/random
(it can block) or urandom
(link comments suggested that) they can be very slow too, instead use a dm-crypt (See cryptsetup's FAQ 2.19 How can I wipe a device with crypto-grade randomness?) maybe with a file in ram.– Xen2050
Feb 20 '18 at 23:20
Has problems: This script writes & reads a file to disk - that's slower than ram, so can be an artificial slowdown. Also only sends zeros, in case they're compressed that's a big artificial speedup. If you do want pseudorandom data, don't use
/dev/random
(it can block) or urandom
(link comments suggested that) they can be very slow too, instead use a dm-crypt (See cryptsetup's FAQ 2.19 How can I wipe a device with crypto-grade randomness?) maybe with a file in ram.– Xen2050
Feb 20 '18 at 23:20
add a comment |
If you want to test your Ethernet LAN at a lower level you can use Etherate which is a free Linux CLI Ethernet testing tool:
https://github.com/jwbensley/Etherate
Throwing it in the mix as tools like iPerf (which are very good!) operate over IP and TCP or UDP. Etherate tests directly over Ethernet / OSI layer 2.
add a comment |
If you want to test your Ethernet LAN at a lower level you can use Etherate which is a free Linux CLI Ethernet testing tool:
https://github.com/jwbensley/Etherate
Throwing it in the mix as tools like iPerf (which are very good!) operate over IP and TCP or UDP. Etherate tests directly over Ethernet / OSI layer 2.
add a comment |
If you want to test your Ethernet LAN at a lower level you can use Etherate which is a free Linux CLI Ethernet testing tool:
https://github.com/jwbensley/Etherate
Throwing it in the mix as tools like iPerf (which are very good!) operate over IP and TCP or UDP. Etherate tests directly over Ethernet / OSI layer 2.
If you want to test your Ethernet LAN at a lower level you can use Etherate which is a free Linux CLI Ethernet testing tool:
https://github.com/jwbensley/Etherate
Throwing it in the mix as tools like iPerf (which are very good!) operate over IP and TCP or UDP. Etherate tests directly over Ethernet / OSI layer 2.
answered Mar 26 '16 at 20:37
jwbensleyjwbensley
3604919
3604919
add a comment |
add a comment |
There are also some other nice command-line tools for bandwidth benchmarking between two hosts:
nuttcp
server$ nuttcp -S
client$ nuttcp -v -v -i1 1.1.1.1 ;# 1.1.1.1 is server's address
nepim
server$ nepim
client$ nepim -d -c 1.1.1.1 ;# 1.1.1.1 is server's address
goben
server$ goben
client$ goben -hosts 1.1.1.1 ;# 1.1.1.1 is server's address
1
How are these different from each other, and from iperf? Do they work the same, what do they do? nuttcp is in Debian & apparently "nuttcp is based on nttcp, which in turn was an enhancement by someone at Silicon Graphics (SGI) on the original ttcp, which was written by Mike Muuss at BRL sometime before December 1984, to compare the performance of TCP stacks by U.C. Berkeley and BBN to help DARPA decide which version to place in the first BSD Unix release."
– Xen2050
Feb 20 '18 at 23:28
add a comment |
There are also some other nice command-line tools for bandwidth benchmarking between two hosts:
nuttcp
server$ nuttcp -S
client$ nuttcp -v -v -i1 1.1.1.1 ;# 1.1.1.1 is server's address
nepim
server$ nepim
client$ nepim -d -c 1.1.1.1 ;# 1.1.1.1 is server's address
goben
server$ goben
client$ goben -hosts 1.1.1.1 ;# 1.1.1.1 is server's address
1
How are these different from each other, and from iperf? Do they work the same, what do they do? nuttcp is in Debian & apparently "nuttcp is based on nttcp, which in turn was an enhancement by someone at Silicon Graphics (SGI) on the original ttcp, which was written by Mike Muuss at BRL sometime before December 1984, to compare the performance of TCP stacks by U.C. Berkeley and BBN to help DARPA decide which version to place in the first BSD Unix release."
– Xen2050
Feb 20 '18 at 23:28
add a comment |
There are also some other nice command-line tools for bandwidth benchmarking between two hosts:
nuttcp
server$ nuttcp -S
client$ nuttcp -v -v -i1 1.1.1.1 ;# 1.1.1.1 is server's address
nepim
server$ nepim
client$ nepim -d -c 1.1.1.1 ;# 1.1.1.1 is server's address
goben
server$ goben
client$ goben -hosts 1.1.1.1 ;# 1.1.1.1 is server's address
There are also some other nice command-line tools for bandwidth benchmarking between two hosts:
nuttcp
server$ nuttcp -S
client$ nuttcp -v -v -i1 1.1.1.1 ;# 1.1.1.1 is server's address
nepim
server$ nepim
client$ nepim -d -c 1.1.1.1 ;# 1.1.1.1 is server's address
goben
server$ goben
client$ goben -hosts 1.1.1.1 ;# 1.1.1.1 is server's address
edited Feb 13 '18 at 7:53
user383919
answered Feb 12 '18 at 20:15
EvertonEverton
1413
1413
1
How are these different from each other, and from iperf? Do they work the same, what do they do? nuttcp is in Debian & apparently "nuttcp is based on nttcp, which in turn was an enhancement by someone at Silicon Graphics (SGI) on the original ttcp, which was written by Mike Muuss at BRL sometime before December 1984, to compare the performance of TCP stacks by U.C. Berkeley and BBN to help DARPA decide which version to place in the first BSD Unix release."
– Xen2050
Feb 20 '18 at 23:28
add a comment |
1
How are these different from each other, and from iperf? Do they work the same, what do they do? nuttcp is in Debian & apparently "nuttcp is based on nttcp, which in turn was an enhancement by someone at Silicon Graphics (SGI) on the original ttcp, which was written by Mike Muuss at BRL sometime before December 1984, to compare the performance of TCP stacks by U.C. Berkeley and BBN to help DARPA decide which version to place in the first BSD Unix release."
– Xen2050
Feb 20 '18 at 23:28
1
1
How are these different from each other, and from iperf? Do they work the same, what do they do? nuttcp is in Debian & apparently "nuttcp is based on nttcp, which in turn was an enhancement by someone at Silicon Graphics (SGI) on the original ttcp, which was written by Mike Muuss at BRL sometime before December 1984, to compare the performance of TCP stacks by U.C. Berkeley and BBN to help DARPA decide which version to place in the first BSD Unix release."
– Xen2050
Feb 20 '18 at 23:28
How are these different from each other, and from iperf? Do they work the same, what do they do? nuttcp is in Debian & apparently "nuttcp is based on nttcp, which in turn was an enhancement by someone at Silicon Graphics (SGI) on the original ttcp, which was written by Mike Muuss at BRL sometime before December 1984, to compare the performance of TCP stacks by U.C. Berkeley and BBN to help DARPA decide which version to place in the first BSD Unix release."
– Xen2050
Feb 20 '18 at 23:28
add a comment |
as I pointed out in my comment at best answer, that solution is not good enough be cause client/server is not optimized to ... squeeze every bit of speed
my solution:
make a ramdisk on both sides (therefore, you aren't limited by storage speed and I suggest you made them with ramfs not tmpfs, so they won't go in swap ... just be careful not to leave at least 512M free memory for system, this is REQUIRED if you have giga ethernet, at that speed even SSDs may slow things down)
install apache on server, then create a link to ramdisk, create few large files on ramdisk (100M-1G, you can create them with dd from /dev/random or copy if you have some at hand)
then go client side and download them (also on that side's ramdisk) with an advanced download program, I used lftp
oh well, difference was major, from 75mbps reported by iperf and 9.5M/s netcat
to 11.18M/s with my solution:
1591129421 bytes transferred in 136 seconds (11.18M/s)
add a comment |
as I pointed out in my comment at best answer, that solution is not good enough be cause client/server is not optimized to ... squeeze every bit of speed
my solution:
make a ramdisk on both sides (therefore, you aren't limited by storage speed and I suggest you made them with ramfs not tmpfs, so they won't go in swap ... just be careful not to leave at least 512M free memory for system, this is REQUIRED if you have giga ethernet, at that speed even SSDs may slow things down)
install apache on server, then create a link to ramdisk, create few large files on ramdisk (100M-1G, you can create them with dd from /dev/random or copy if you have some at hand)
then go client side and download them (also on that side's ramdisk) with an advanced download program, I used lftp
oh well, difference was major, from 75mbps reported by iperf and 9.5M/s netcat
to 11.18M/s with my solution:
1591129421 bytes transferred in 136 seconds (11.18M/s)
add a comment |
as I pointed out in my comment at best answer, that solution is not good enough be cause client/server is not optimized to ... squeeze every bit of speed
my solution:
make a ramdisk on both sides (therefore, you aren't limited by storage speed and I suggest you made them with ramfs not tmpfs, so they won't go in swap ... just be careful not to leave at least 512M free memory for system, this is REQUIRED if you have giga ethernet, at that speed even SSDs may slow things down)
install apache on server, then create a link to ramdisk, create few large files on ramdisk (100M-1G, you can create them with dd from /dev/random or copy if you have some at hand)
then go client side and download them (also on that side's ramdisk) with an advanced download program, I used lftp
oh well, difference was major, from 75mbps reported by iperf and 9.5M/s netcat
to 11.18M/s with my solution:
1591129421 bytes transferred in 136 seconds (11.18M/s)
as I pointed out in my comment at best answer, that solution is not good enough be cause client/server is not optimized to ... squeeze every bit of speed
my solution:
make a ramdisk on both sides (therefore, you aren't limited by storage speed and I suggest you made them with ramfs not tmpfs, so they won't go in swap ... just be careful not to leave at least 512M free memory for system, this is REQUIRED if you have giga ethernet, at that speed even SSDs may slow things down)
install apache on server, then create a link to ramdisk, create few large files on ramdisk (100M-1G, you can create them with dd from /dev/random or copy if you have some at hand)
then go client side and download them (also on that side's ramdisk) with an advanced download program, I used lftp
oh well, difference was major, from 75mbps reported by iperf and 9.5M/s netcat
to 11.18M/s with my solution:
1591129421 bytes transferred in 136 seconds (11.18M/s)
answered Jul 27 '18 at 7:24
THESorcererTHESorcerer
10114
10114
add a comment |
add a comment |
It's easy plug your computer on the first box, plug the other box to the first box. Then from your computer ping the first box save the result, ping the other box and do the substraction.
10
That shows network latency which is only one part of speed. For example my phone's 3G connection has huge latency (100-300ms) but it can still manage a throughput of 5mbps.
– Oli♦
Oct 17 '10 at 17:18
Not my fault if he asked speed but wanted throughput.
– Nyamiou The Galeanthrope
Dec 7 '17 at 17:48
1
Latency is reaction-time, not speed.
– wullxz
Apr 25 '18 at 10:01
add a comment |
It's easy plug your computer on the first box, plug the other box to the first box. Then from your computer ping the first box save the result, ping the other box and do the substraction.
10
That shows network latency which is only one part of speed. For example my phone's 3G connection has huge latency (100-300ms) but it can still manage a throughput of 5mbps.
– Oli♦
Oct 17 '10 at 17:18
Not my fault if he asked speed but wanted throughput.
– Nyamiou The Galeanthrope
Dec 7 '17 at 17:48
1
Latency is reaction-time, not speed.
– wullxz
Apr 25 '18 at 10:01
add a comment |
It's easy plug your computer on the first box, plug the other box to the first box. Then from your computer ping the first box save the result, ping the other box and do the substraction.
It's easy plug your computer on the first box, plug the other box to the first box. Then from your computer ping the first box save the result, ping the other box and do the substraction.
answered Oct 17 '10 at 17:16
Nyamiou The GaleanthropeNyamiou The Galeanthrope
2,3131425
2,3131425
10
That shows network latency which is only one part of speed. For example my phone's 3G connection has huge latency (100-300ms) but it can still manage a throughput of 5mbps.
– Oli♦
Oct 17 '10 at 17:18
Not my fault if he asked speed but wanted throughput.
– Nyamiou The Galeanthrope
Dec 7 '17 at 17:48
1
Latency is reaction-time, not speed.
– wullxz
Apr 25 '18 at 10:01
add a comment |
10
That shows network latency which is only one part of speed. For example my phone's 3G connection has huge latency (100-300ms) but it can still manage a throughput of 5mbps.
– Oli♦
Oct 17 '10 at 17:18
Not my fault if he asked speed but wanted throughput.
– Nyamiou The Galeanthrope
Dec 7 '17 at 17:48
1
Latency is reaction-time, not speed.
– wullxz
Apr 25 '18 at 10:01
10
10
That shows network latency which is only one part of speed. For example my phone's 3G connection has huge latency (100-300ms) but it can still manage a throughput of 5mbps.
– Oli♦
Oct 17 '10 at 17:18
That shows network latency which is only one part of speed. For example my phone's 3G connection has huge latency (100-300ms) but it can still manage a throughput of 5mbps.
– Oli♦
Oct 17 '10 at 17:18
Not my fault if he asked speed but wanted throughput.
– Nyamiou The Galeanthrope
Dec 7 '17 at 17:48
Not my fault if he asked speed but wanted throughput.
– Nyamiou The Galeanthrope
Dec 7 '17 at 17:48
1
1
Latency is reaction-time, not speed.
– wullxz
Apr 25 '18 at 10:01
Latency is reaction-time, not speed.
– wullxz
Apr 25 '18 at 10:01
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f7976%2fhow-do-you-test-the-network-speed-between-two-boxes%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown