Linux-Noob Forums

Full Version: How to test network speeds
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

TTCP - How to check network transfer speeds. .:H A T E B R E D:.

 

DESCRIPTION

Ttcp times the transmission and reception of data between

two systems using the UDP or TCP protocols. It differs

from common ``blast'' tests, which tend to measure the

remote inetd as much as the network performance, and which

usually do not allow measurements at the remote end of a

UDP transmission. - From the man page

 

Now you know what it does here is a few ways to use it on your network to test transfer speed.

 

First we will start ttcp in recive mode on machine 1 - 192.168.1.105

 

The way I run it is in recive mode, be verbose (give more info), and sink all data. Sinking the data doesent print the data sent from the host to the target, in this case the contents of the 1 meg file I am sending.

 

[root@laptop howto] ttcp -r -v -s

ttcp-r: buflen=8192, nbuf=2048, align=16384/0, port=5001 tcp

ttcp-r: socket

 

From this you can see that ttcp started in recive mode and has the following structure:

 

buflen=8192 Length of buffers in bytes

nbuf=2048 Number of source buffers transmitted

align=16384/0 This has 2 parts to it.

1. the 16384 represents align the start of buffers to this modulus

2. 0 align the start of buffers to this offset.

 

port=5001 This is the port ttcp is listening on and can not be blocked by a firewall.

tcp tcp is used. You may also use UDP but TCP is better for testing in my opinon because it uses the same protocol as a majority of the network.

 

 

Now we have our target running ttcp in recive mode. Next we need to send the 1 meg file to it from our host

 

The way I run the host

[root@desktop howto] ttcp -t 192.168.1.100 < 1mb.001

ttcp-t: buflen=8192, nbuf=2048, align=16384/0, port=5001 tcp -> 192.168.1.100

ttcp-t: 1048576 bytes in 2.66 real seconds = 384.41 KB/sec +++

ttcp-t: 128 I/O calls, msec/call = 21.31, calls/sec = 48.05

 

As you can see from the first line the connection was successful to 192.168.1.100

 

The second line states that 1038576 bytes (1 MB) was sent in 2.66 seconds @ 384.41 KB/sec

 

Line there refers to the system used to do this. 128 I/O calls @ 48.05 calls a second.

 

Now back to the reciving system,

 

[root@laptop howto] ttcp -r -s -v

ttcp-r: buflen=8192, nbuf=2048, align=16384/0, port=5001 tcp

ttcp-r: 1048576 bytes in 2.75 real seconds = 372.85 KB/sec +++

ttcp-r: 1048576 bytes in 1.42 CPU seconds = 721.13 KB/cpu sec

ttcp-r: 191 I/O calls, msec/call = 14.72, calls/sec = 69.55

ttcp-r: 0.0user 1.4sys 0:02real 51% 0i+0d 0maxrss 0+2pf 0+0csw

ttcp-r: buffer address 0x8050000

 

So here is a system breakdown while we are at it:

 

DESC DESKTOP LAPTOP

300Mhz 233Mhz

 

seconds: 2.66 2.75

KB/sec 384.41 372.85

I/O calls 128 191

calls sec. 48.05 69.55

 

You can also do this between internet computers.