Performance comparison between packet routed and unrouted

 

Here is the diagram for the network infrastructure.
 

Machine Name CPU info Memory Info Routing table
Dublin

model name : Pentium III
cpu MHz : 728.448
cache size : 256 KB

MemTotal: 257580 kB
 

SwapTotal: 1028120 kB
 

Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.1 * 255.255.255.255 UH 0 0 0 eth2
dublin.cs.unh.e * 255.255.255.255 UH 0 0 0 eth0
192.168.2.1 * 255.255.255.255 UH 0 0 0 eth1
132.177.8.0 * 255.255.255.128 U 0 0 0 eth0
192.168.3.0 192.168.2.2 255.255.255.0 UG 0 0 0 eth1
192.168.2.0 * 255.255.255.0 U 0 0 0 eth1
192.168.1.0 * 255.255.255.0 U 0 0 0 eth2
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default phub0.cs.unh.ed 0.0.0.0 UG 0 0 0 eth0

Madrid model name : Pentium III
cpu MHz : 728.448
cache size : 256 KB

MemTotal: 517196 kB

SwapTotal: 1028120 kB
 

Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.3.1 * 255.255.255.255 UH 0 0 0 eth2
madrid.cs.unh.e * 255.255.255.255 UH 0 0 0 eth0
192.168.1.2 * 255.255.255.255 UH 0 0 0 eth1
132.177.8.0 * 255.255.255.128 U 0 0 0 eth0
192.168.3.0 * 255.255.255.0 U 0 0 0 eth2
192.168.2.0 192.168.1.1 255.255.255.0 UG 0 0 0 eth1
192.168.1.0 * 255.255.255.0 U 0 0 0 eth1
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default phub0.cs.unh.ed 0.0.0.0 UG 0 0 0 eth0

Prague model name : Pentium III
cpu MHz : 728.458
cache size : 256 KB

MemTotal: 257660 kB

SwapTotal: 1028120 kB

Destination Gateway Genmask  Flags Metric Ref  Use Iface
192.168.3.2 *    255.255.255.255 UH      0       0      0   eth2
prague.cs.unh.edu * 255.255.255.255 UH 0       0      0   eth0
192.168.2.2 * 255.255.255.255    UH      0       0      0   eth1
132.177.8.0 * 255.255.255.128    U         0       0      0  eth0
192.168.3.0 * 255.255.255.0        U         0       0      0   eth2
192.168.2.0 * 255.255.255.0        U         0       0       0  eth1
192.168.1.0 192.168.2.1 255.255.255.0 UG 0   0      0 eth1
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default phub0.cs.unh.ed 0.0.0.0       UG      0        0     0 eth0


In the following experiment. I was before madrid, telnet to prague and dublin. Does my telnet session affect the result?????I think telnet session is using eth0. It should not affect the result of these experiments as long as the CPU and memory used by telnet session does not take too much
 

Experiment on October 4
    1st 2nd 3rd 4th 5th AVG
Experiment 1 Trans Speed (KB/sec) 10759.86 10759.23 1555.89 10910.87 3276.12 7452.394
Recv Speed (KB/sec) 10681.92 10743.23 1444.84 10754.66 3273.74 7379.678
Data Sent   (Byte) 16777216 16777216 1743818 1743818 28338216  
Experiment 2 Trans Speed (KB/sec) 213.96 229.42 243.06 282.38 220.21 237.806
Recv Speed (KB/sec) 213.41 228.78 235.01 256.47 219.52 230.638
Data Sent   (Byte) 16777216 16777216 1743818 1743818 28338216  
Experiment 3 Trans Speed (KB/sec) 11461.40 11461.45 1536.28 11425.34 11066.61 9390.216
Recv Speed (KB/sec) 11406.63 11422.59 1424.03 11599.83 11057.17 9382.05
Data Sent   (Byte) 16777216 16777216 1743818 1743818 28338216  

 

 

 

 

 

 

 

 

 

 

 

 

 

For the detail experiment data, please see the following

 

The first group of experiment will use "-s" option on both transmitting side and receiving side.

the file to send is: nttcp-1.47.tar.gz

 

$ ls -l nttcp-1.47.tar.gz
-rw-r--r--    1 lin      lin         25693 Oct  3 15:00 nttcp-1.47.tar.gz


Experiment 1.

==========================================
Send data from madrid:eth1 to prague:eth2. They are connected with a crossover cable.

[lin@prague ttcp]$ ttcp -r -s -l 8192
ttcp-r: buflen=8192, nbuf=2048, align=16384/0, port=5001  tcp
ttcp-r: socket
ttcp-r: accept from 192.168.3.1
ttcp-r: 16777216 bytes in 1.53 real seconds = 10681.92 KB/sec +++
ttcp-r: 12268 I/O calls, msec/call = 0.13, calls/sec = 7998.40
ttcp-r: 0.0user 0.0sys 0:01real 3% 0i+0d 0maxrss 0+2pf 0+0csw

[lin@madrid lin]$ ttcp/ttcp -t -s 192.168.3.2 < nttcp-1.47.tar.gz
ttcp-t: buflen=8192, nbuf=2048, align=16384/0, port=5001  tcp  -> 192.168.3.2
ttcp-t: socket
ttcp-t: connect
ttcp-t: 16777216 bytes in 1.52 real seconds = 10759.86 KB/sec +++
ttcp-t: 2048 I/O calls, msec/call = 0.76, calls/sec = 1344.98
ttcp-t: 0.0user 0.0sys 0:01real 5% 0i+0d 0maxrss 0+2pf 0+0csw

============================================



===============================
Experiment 2.

Send data from madrid:eth1 to prague:eth1. It will use dublin as router.
The route is: madrid:eth1==>dublin:eth2==>dublin:eth1==>prague:eth1


[lin@prague ttcp]$ ttcp -r -s -l 8192
ttcp-r: buflen=8192, nbuf=2048, align=16384/0, port=5001  tcp
ttcp-r: socket
ttcp-r: accept from 192.168.1.2
ttcp-r: 16777216 bytes in 76.77 real seconds = 213.41 KB/sec +++
ttcp-r: 5225 I/O calls, msec/call = 15.05, calls/sec = 68.06
ttcp-r: 0.0user 0.0sys 1:16real 0% 0i+0d 0maxrss 0+2pf 0+0csw


[lin@madrid lin]$ ttcp/ttcp -t -s 192.168.2.2 < nttcp-1.47.tar.gz
ttcp-t: buflen=8192, nbuf=2048, align=16384/0, port=5001  tcp  -> 192.168.2.2
ttcp-t: socket
ttcp-t: connect
ttcp-t: 16777216 bytes in 76.57 real seconds = 213.96 KB/sec +++
ttcp-t: 2048 I/O calls, msec/call = 38.29, calls/sec = 26.75
ttcp-t: 0.0user 0.0sys 1:16real 0% 0i+0d 0maxrss 0+2pf 0+0csw

===============================



=============================================
Experiment 3.

send data from madrid:eth0 to prague:eth0   NOT using DNS

[lin@prague ttcp]$ ttcp -r -s -l 8192
ttcp-r: buflen=8192, nbuf=2048, align=16384/0, port=5001  tcp
ttcp-r: socket
ttcp-r: accept from 132.177.8.27
ttcp-r: 16777216 bytes in 1.44 real seconds = 11406.63 KB/sec +++
ttcp-r: 12284 I/O calls, msec/call = 0.12, calls/sec = 8552.19
ttcp-r: 0.0user 0.2sys 0:01real 18% 0i+0d 0maxrss 0+1pf 0+0csw


[lin@madrid lin]$ ttcp/ttcp -t -s 132.177.8.29 < nttcp-1.47.tar.gz
ttcp-t: buflen=8192, nbuf=2048, align=16384/0, port=5001  tcp  -> 132.177.8.29
ttcp-t: socket
ttcp-t: connect
ttcp-t: 16777216 bytes in 1.43 real seconds = 11461.40 KB/sec +++
ttcp-t: 2048 I/O calls, msec/call = 0.71, calls/sec = 1432.67
ttcp-t: 0.0user 0.2sys 0:01real 19% 0i+0d 0maxrss 0+2pf 0+0csw

=============================================



=============================================
Experiment 4.

send data from madrid:eth0 to prague:eth0   using DNS



[lin@prague ttcp]$ ttcp -r -s -l 8192
ttcp-r: buflen=8192, nbuf=2048, align=16384/0, port=5001  tcp
ttcp-r: socket
ttcp-r: accept from 132.177.8.27
ttcp-r: 16777216 bytes in 1.44 real seconds = 11409.03 KB/sec +++
ttcp-r: 12272 I/O calls, msec/call = 0.12, calls/sec = 8545.63
ttcp-r: 0.0user 0.2sys 0:01real 15% 0i+0d 0maxrss 0+2pf 0+0csw


[lin@madrid lin]$ ttcp/ttcp -t -s prague.cs.unh.edu < nttcp-1.47.tar.gz
ttcp-t: buflen=8192, nbuf=2048, align=16384/0, port=5001  tcp  -> prague.cs.unh.edu
ttcp-t: socket
ttcp-t: connect
ttcp-t: 16777216 bytes in 1.43 real seconds = 11454.14 KB/sec +++
ttcp-t: 2048 I/O calls, msec/call = 0.72, calls/sec = 1431.77
ttcp-t: 0.0user 0.6sys 0:01real 43% 0i+0d 0maxrss 0+2pf 0+0csw

===================================================================

 

From the first group experiment, we can get the following assumption:

 

1. The speed shown at transmitting side is always a little bit faster than that on receiving side. The reason may be:

    Transmission time counted at receiving side is actually the real transmitting time and the delay time.??

2. On transmitting side, the connection without using DNS(-t 11461.40 KB/sec) is a little bit faster than that of using DNS( -t 11454.14 KB/sec ). This might because Domain Name looking up take some time.

 

3. The current LAN infrastructure( network 132.177.8.0/25 ) is faster than the connection of 2 NIC cards with crossover cable( 11461.40 KB/sec VS 10759.86 KB/sec ). Why?

    The possible reason may be:  1).  Crossover cable is a little slow than regular cable.

                                 2).  The NIC card speed difference.

                                      eth0 is using on-board NIC card, 3Com chip

                                      eth1, eth2 is using PCI card, DECchip, tulip

 

4. The connection routed by Dublin.cs.unh.edu is much slower than that of directly connected. ( about 1:50 )

Why???  Dublin is not powerful enough to do ip_forwarding???????

 

5. It seems that as long as '-s' option is specified at transmitting side. The data sent is always 16777216 bytes.

 

The second group of experiments using 8192 buffers.


Experiment 1.


==========================================
Send data from madrid:eth1 to prague:eth2. They are connected with a crossover
cable


[lin@prague ttcp]$ ttcp -r -s -n 8192
ttcp-r: buflen=8192, nbuf=8192, align=16384/0, port=5001  tcp
ttcp-r: socket
ttcp-r: accept from 192.168.3.1
ttcp-r: 16777216 bytes in 1.53 real seconds = 10743.23 KB/sec +++
ttcp-r: 12285 I/O calls, msec/call = 0.13, calls/sec = 8055.46
ttcp-r: 0.0user 0.0sys 0:01real 2% 0i+0d 0maxrss 0+1pf 0+0csw


[lin@madrid lin]$ ttcp/ttcp -t -s 192.168.3.2 < nttcp-1.47.tar.gz
ttcp-t: buflen=8192, nbuf=2048, align=16384/0, port=5001  tcp  -> 192.168.3.2
ttcp-t: socket
ttcp-t: connect
ttcp-t: 16777216 bytes in 1.52 real seconds = 10759.23 KB/sec +++
ttcp-t: 2048 I/O calls, msec/call = 0.76, calls/sec = 1344.90
ttcp-t: 0.0user 0.0sys 0:01real 6% 0i+0d 0maxrss 0+2pf 0+0csw




===============================
Experiment 2.

Send data from madrid:eth1 to prague:eth1. It will use dublin as router.
The route is: madrid:eth1==>dublin:eth2==>dublin:eth1==>prague:eth1


[lin@prague ttcp]$ ttcp -r -s -n 8192
ttcp-r: buflen=8192, nbuf=8192, align=16384/0, port=5001  tcp
ttcp-r: socket
ttcp-r: accept from 192.168.1.2
ttcp-r: 16777216 bytes in 71.61 real seconds = 228.78 KB/sec +++
ttcp-r: 5474 I/O calls, msec/call = 13.40, calls/sec = 76.44
ttcp-r: 0.0user 0.3sys 1:11real 0% 0i+0d 0maxrss 0+2pf 0+0csw

[lin@madrid lin]$ ttcp/ttcp -t -s 192.168.2.2 < nttcp-1.47.tar.gz
ttcp-t: buflen=8192, nbuf=2048, align=16384/0, port=5001  tcp  -> 192.168.2.2
ttcp-t: socket
ttcp-t: connect
ttcp-t: 16777216 bytes in 71.41 real seconds = 229.42 KB/sec +++
ttcp-t: 2048 I/O calls, msec/call = 35.71, calls/sec = 28.68
ttcp-t: 0.0user 0.0sys 1:11real 0% 0i+0d 0maxrss 0+2pf 0+0csw

=========================================
Experiment 3.

send data from madrid:eth0 to prague:eth0   NOT using DNS


[lin@prague ttcp]$ ttcp -r -s -n 8192
ttcp-r: buflen=8192, nbuf=8192, align=16384/0, port=5001  tcp
ttcp-r: socket
ttcp-r: accept from 132.177.8.27
ttcp-r: 16777216 bytes in 1.43 real seconds = 11422.59 KB/sec +++
ttcp-r: 12260 I/O calls, msec/call = 0.12, calls/sec = 8547.42
ttcp-r: 0.0user 0.2sys 0:01real 17% 0i+0d 0maxrss 0+2pf 0+0csw


[lin@madrid lin]$ ttcp/ttcp -t -s 132.177.8.29 < nttcp-1.47.tar.gz
ttcp-t: buflen=8192, nbuf=2048, align=16384/0, port=5001  tcp  -> 132.177.8.29
ttcp-t: socket
ttcp-t: connect
ttcp-t: 16777216 bytes in 1.43 real seconds = 11461.45 KB/sec +++
ttcp-t: 2048 I/O calls, msec/call = 0.71, calls/sec = 1432.68
ttcp-t: 0.0user 0.4sys 0:01real 28% 0i+0d 0maxrss 0+2pf 0+0csw



==========================================

Experiment 4.

send data from madrid:eth0 to prague:eth0   using DNS

[lin@prague ttcp]$ ttcp -r -s -n 8192
ttcp-r: buflen=8192, nbuf=8192, align=16384/0, port=5001  tcp
ttcp-r: socket
ttcp-r: accept from 132.177.8.27
ttcp-r: 16777216 bytes in 1.43 real seconds = 11425.56 KB/sec +++
ttcp-r: 12281 I/O calls, msec/call = 0.12, calls/sec = 8564.29
ttcp-r: 0.0user 0.3sys 0:01real 23% 0i+0d 0maxrss 0+1pf 0+0csw


[lin@madrid lin]$ ttcp/ttcp -t -s prague.cs.unh.edu < nttcp-1.47.tar.gz
ttcp-t: buflen=8192, nbuf=2048, align=16384/0, port=5001  tcp  -> prague.cs.unh.edu
ttcp-t: socket
ttcp-t: connect
ttcp-t: 16777216 bytes in 1.43 real seconds = 11461.05 KB/sec +++
ttcp-t: 2048 I/O calls, msec/call = 0.71, calls/sec = 1432.63
ttcp-t: 0.0user 0.2sys 0:01real 16% 0i+0d 0maxrss 0+2pf 0+0csw

 

 

From the second group, We can get:

 

1. The assumption make earlier holds for the second group of experiments, too.

2. Add number of buffer from 2048 to 8192 does not affect the network speed significantly. Or almost the same.

 

 

 

The third group of experiments use bigger file, default buffer size and number of buffer, without "-s" option.  silence????
 



[lin@madrid lin]$ ls -l ncurses-5.2.tar.gz
-rw-r--r--    1 lin      lin      
1743818 Sep 26 20:46 ncurses-5.2.tar.gz



Experiment 1.

==========================================
Send data from madrid:eth1 to prague:eth2. They are connected with a crossover directly.

[lin@madrid lin]$ ttcp/ttcp -t  192.168.3.2 < ncurses-5.2.tar.gz
ttcp-t: buflen=8192, nbuf=2048, align=16384/0, port=5001  tcp  -> 192.168.3.2
ttcp-t: socket
ttcp-t: connect
ttcp-t: 1743818 bytes in 1.09 real seconds = 1555.89 KB/sec +++
ttcp-t: 213 I/O calls, msec/call = 5.26, calls/sec = 194.61
ttcp-t: 0.0user 0.0sys 0:01real 0% 0i+0d 0maxrss 0+2pf 0+0csw


[lin@prague ttcp]$ ttcp -r
ttcp-r: buflen=8192, nbuf=2048, align=16384/0, port=5001  tcp
ttcp-r: socket

 

data received is shown here...


ttcp-r: 1743818 bytes in 1.18 real seconds = 1444.84 KB/sec +++
ttcp-r: 217 I/O calls, msec/call = 5.56, calls/sec = 184.11
ttcp-r: 0.0user 0.1sys 0:01real 9% 0i+0d 0maxrss 0+2pf 0+0csw


====================================
Experiment 2.
using static routing:


[lin@prague ttcp]$ ttcp -r
ttcp-r: buflen=8192, nbuf=2048, align=16384/0, port=5001  tcp
ttcp-r: socket

 

data received is shown here...


ttcp-r: 1743818 bytes in 7.25 real seconds = 235.01 KB/sec +++
ttcp-r: 382 I/O calls, msec/call = 19.42, calls/sec = 52.72
ttcp-r: 0.0user 0.0sys 0:07real 1% 0i+0d 0maxrss 0+2pf 0+0csw


[lin@madrid lin]$ ttcp/ttcp -t  192.168.2.2 < ncurses-5.2.tar.gz
ttcp-t: buflen=8192, nbuf=2048, align=16384/0, port=5001  tcp  -> 192.168.2.2
ttcp-t: socket
ttcp-t: connect
ttcp-t: 1743818 bytes in 7.01 real seconds = 243.06 KB/sec +++
ttcp-t: 213 I/O calls, msec/call = 33.68, calls/sec = 30.40
ttcp-t: 0.0user 0.0sys 0:07real 0% 0i+0d 0maxrss 0+2pf 0+0csw


=======================================
Experiment 3

eth0 without DNS


[lin@prague ttcp]$ ttcp -r
ttcp-r: buflen=8192, nbuf=2048, align=16384/0, port=5001  tcp
ttcp-r: socket
 

 

data received is shown here...


 

ttcp-r: 1743818 bytes in 1.20 real seconds = 1424.03 KB/sec +++
ttcp-r: 228 I/O calls, msec/call = 5.37, calls/sec = 190.66
ttcp-r: 0.0user 0.1sys 0:01real 12% 0i+0d 0maxrss 0+2pf 0+0csw

[lin@madrid lin]$ ttcp/ttcp -t  132.177.8.29 < ncurses-5.2.tar.gz
ttcp-t: buflen=8192, nbuf=2048, align=16384/0, port=5001  tcp  -> 132.177.8.29
ttcp-t: socket
ttcp-t: connect
ttcp-t: 1743818 bytes in 1.11 real seconds = 1536.28 KB/sec +++
ttcp-t: 213 I/O calls, msec/call = 5.33, calls/sec = 192.15
ttcp-t: 0.0user 0.0sys 0:01real 0% 0i+0d 0maxrss 0+2pf 0+0csw



=======================================
Experiment 4

eth0 with DNS



[lin@prague ttcp]$ ttcp -r
ttcp-r: buflen=8192, nbuf=2048, align=16384/0, port=5001  tcp
ttcp-r: socket
ttcp-r: 1743818 bytes in 1.21 real seconds = 1412.66 KB/sec +++
ttcp-r: 219 I/O calls, msec/call = 5.64, calls/sec = 181.67
ttcp-r: 0.0user 0.1sys 0:01real 9% 0i+0d 0maxrss 0+2pf 0+0csw

[lin@madrid lin]$ ttcp/ttcp -t  prague.cs.unh.edu < ncurses-5.2.tar.gz
ttcp-t: buflen=8192, nbuf=2048, align=16384/0, port=5001  tcp  -> prague.cs.unh.edu
ttcp-t: socket
ttcp-t: connect
ttcp-t: 1743818 bytes in 1.12 real seconds = 1522.90 KB/sec +++
ttcp-t: 213 I/O calls, msec/call = 5.38, calls/sec = 190.48
ttcp-t: 0.0user 0.0sys 0:01real 2% 0i+0d 0maxrss 0+2pf 0+0csw

===========================================

 

 

From this group of experiment, we can get:

 

1. The assumption we made on first group of experiments holds

2. Turning off the '-s' option on receiving side significantly affects the receiving speed. ( 3-7% slower )





In the fourth group of experiments, we turn on -s on receiving side, Turn off -s on transmitting side, use default buffer size and number of buffer.


===================================
Experiment 1.

[lin@prague ttcp]$ ttcp -r -s
ttcp-r: buflen=8192, nbuf=2048, align=16384/0, port=5001  tcp
ttcp-r: socket
ttcp-r: accept from 192.168.3.1
ttcp-r: 1743818 bytes in 0.16 real seconds = 10754.66 KB/sec +++
ttcp-r: 1258 I/O calls, msec/call = 0.13, calls/sec = 7944.68
ttcp-r: 0.0user 0.0sys 0:00real 0% 0i+0d 0maxrss 0+2pf 0+0csw


[lin@madrid lin]$ ttcp/ttcp -t  192.168.3.2 < ncurses-5.2.tar.gz
ttcp-t: buflen=8192, nbuf=2048, align=16384/0, port=5001  tcp  -> 192.168.3.2
ttcp-t: socket
ttcp-t: connect
ttcp-t: 1743818 bytes in 0.16 real seconds = 10910.87 KB/sec +++
ttcp-t: 213 I/O calls, msec/call = 0.75, calls/sec = 1364.70
ttcp-t: 0.0user 0.0sys 0:00real 13% 0i+0d 0maxrss 0+2pf 0+0csw


====================================
Experiment 2.


[lin@prague ttcp]$ ttcp -r -s
ttcp-r: buflen=8192, nbuf=2048, align=16384/0, port=5001  tcp
ttcp-r: socket
ttcp-r: accept from 192.168.1.2
ttcp-r: 1743818 bytes in 6.64 real seconds = 256.47 KB/sec +++
ttcp-r: 556 I/O calls, msec/call = 12.23, calls/sec = 83.73
ttcp-r: 0.0user 0.0sys 0:06real 0% 0i+0d 0maxrss 0+2pf 0+0csw


[lin@madrid lin]$ ttcp/ttcp -t  192.168.2.2 < ncurses-5.2.tar.gz
ttcp-t: buflen=8192, nbuf=2048, align=16384/0, port=5001  tcp  -> 192.168.2.2
ttcp-t: socket
ttcp-t: connect
ttcp-t: 1743818 bytes in 6.03 real seconds = 282.38 KB/sec +++
ttcp-t: 213 I/O calls, msec/call = 28.99, calls/sec = 35.32
ttcp-t: 0.0user 0.0sys 0:06real 0% 0i+0d 0maxrss 0+2pf 0+0csw


=============================
Experiment 3

[lin@prague ttcp]$ ttcp -r -s
ttcp-r: buflen=8192, nbuf=2048, align=16384/0, port=5001  tcp
ttcp-r: socket
ttcp-r: accept from 132.177.8.27
ttcp-r: 1743818 bytes in 0.15 real seconds = 11425.34 KB/sec +++
ttcp-r: 1268 I/O calls, msec/call = 0.12, calls/sec = 8507.21
ttcp-r: 0.0user 0.0sys 0:00real 7% 0i+0d 0maxrss 0+1pf 0+0csw


[lin@madrid lin]$ ttcp/ttcp -t  132.177.8.29 < ncurses-5.2.tar.gz
ttcp-t: buflen=8192, nbuf=2048, align=16384/0, port=5001  tcp  -> 132.177.8.29
ttcp-t: socket
ttcp-t: connect
ttcp-t: 1743818 bytes in 0.15 real seconds = 11599.83 KB/sec +++
ttcp-t: 213 I/O calls, msec/call = 0.71, calls/sec = 1450.87
ttcp-t: 0.0user 0.0sys 0:00real 35% 0i+0d 0maxrss 0+2pf 0+0csw



===========================
Experiment 4


[lin@prague ttcp]$ ttcp -r -s
ttcp-r: buflen=8192, nbuf=2048, align=16384/0, port=5001  tcp
ttcp-r: socket
ttcp-r: accept from 132.177.8.27
ttcp-r: 1743818 bytes in 0.15 real seconds = 11425.42 KB/sec +++
ttcp-r: 1274 I/O calls, msec/call = 0.12, calls/sec = 8547.52
ttcp-r: 0.0user 0.0sys 0:00real 20% 0i+0d 0maxrss 0+1pf 0+0csw


[lin@madrid lin]$ ttcp/ttcp -t  prague.cs.unh.edu < ncurses-5.2.tar.gz
ttcp-t: buflen=8192, nbuf=2048, align=16384/0, port=5001  tcp  -> prague.cs.unh.edu
ttcp-t: socket
ttcp-t: connect
ttcp-t: 1743818 bytes in 0.15 real seconds = 11602.59 KB/sec +++
ttcp-t: 213 I/O calls, msec/call = 0.71, calls/sec = 1451.22
ttcp-t: 0.0user 0.0sys 0:00real 33% 0i+0d 0maxrss 0+2pf 0+0csw


=========================

From the fourth group of experiments, we know our assumption on DNS doesn't hold here.

The other assumption still holds.

 

 

In the fifth group of experiment we use very big file, use default buffer size, number of buffer. Turn on -s on receiving side, Turn of -s on transmitting side

[lin@madrid lin]$ ls -l linux-2.4.10.tar.gz
-rw-rw-r--    1 lin      lin      28338216 Sep 25 00:58 linux-2.4.10.tar.gz




====================
Experiment 1

[lin@prague ttcp]$ ttcp -r -s
ttcp-r: buflen=8192, nbuf=2048, align=16384/0, port=5001  tcp
ttcp-r: socket
ttcp-r: accept from 192.168.3.1
ttcp-r: 28338216 bytes in 8.45 real seconds = 3273.74 KB/sec +++
ttcp-r: 20739 I/O calls, msec/call = 0.42, calls/sec = 2453.35
ttcp-r: 0.0user 0.1sys 0:08real 1% 0i+0d 0maxrss 0+2pf 0+0csw


[lin@madrid lin]$ ttcp/ttcp -t  192.168.3.2 < linux-2.4.10.tar.gz
ttcp-t: buflen=8192, nbuf=2048, align=16384/0, port=5001  tcp  -> 192.168.3.2
ttcp-t: socket
ttcp-t: connect
ttcp-t: 28338216 bytes in 8.45 real seconds = 3276.12 KB/sec +++
ttcp-t: 3460 I/O calls, msec/call = 2.50, calls/sec = 409.60
ttcp-t: 0.0user 6.5sys 0:08real 77% 0i+0d 0maxrss 6919+2pf 0+0csw


====================
Experiment 2


[lin@prague ttcp]$ ttcp -r -s
ttcp-r: buflen=8192, nbuf=2048, align=16384/0, port=5001  tcp
ttcp-r: socket
ttcp-r: accept from 192.168.1.2
ttcp-r: 28338216 bytes in 126.07 real seconds = 219.52 KB/sec +++
ttcp-r: 8736 I/O calls, msec/call = 14.78, calls/sec = 69.30
ttcp-r: 0.0user 0.3sys 2:06real 0% 0i+0d 0maxrss 0+2pf 0+0csw


[lin@madrid lin]$ ttcp/ttcp -t  192.168.2.2 < linux-2.4.10.tar.gz
ttcp-t: buflen=8192, nbuf=2048, align=16384/0, port=5001  tcp  -> 192.168.2.2
ttcp-t: socket
ttcp-t: connect
ttcp-t: 28338216 bytes in 125.67 real seconds = 220.21 KB/sec +++
ttcp-t: 3460 I/O calls, msec/call = 37.19, calls/sec = 27.53
ttcp-t: 0.0user 0.0sys 2:05real 0% 0i+0d 0maxrss 0+2pf 0+0csw


====================
Experiment 3


[lin@prague ttcp]$ ttcp -r -s
ttcp-r: buflen=8192, nbuf=2048, align=16384/0, port=5001  tcp
ttcp-r: socket
ttcp-r: accept from 132.177.8.27
ttcp-r: 28338216 bytes in 2.50 real seconds = 11057.17 KB/sec +++
ttcp-r: 20752 I/O calls, msec/call = 0.12, calls/sec = 8291.46
ttcp-r: 0.0user 0.4sys 0:02real 18% 0i+0d 0maxrss 0+1pf 0+0csw


[lin@madrid lin]$ ttcp/ttcp -t  132.177.8.29 < linux-2.4.10.tar.gz
ttcp-t: buflen=8192, nbuf=2048, align=16384/0, port=5001  tcp  -> 132.177.8.29
ttcp-t: socket
ttcp-t: connect
ttcp-t: 28338216 bytes in 2.50 real seconds = 11066.61 KB/sec +++
ttcp-t: 3460 I/O calls, msec/call = 0.74, calls/sec = 1383.62
ttcp-t: 0.0user 1.0sys 0:02real 39% 0i+0d 0maxrss 0+2pf 0+0csw


====================
Experiment 4


[lin@prague ttcp]$ ttcp -r -s
ttcp-r: buflen=8192, nbuf=2048, align=16384/0, port=5001  tcp
ttcp-r: socket
ttcp-r: accept from 132.177.8.27
ttcp-r: 28338216 bytes in 2.51 real seconds = 11046.06 KB/sec +++
ttcp-r: 20753 I/O calls, msec/call = 0.12, calls/sec = 8283.54
ttcp-r: 0.0user 0.4sys 0:02real 15% 0i+0d 0maxrss 0+1pf 0+0csw


[lin@madrid lin]$ ttcp/ttcp -t  prague.cs.unh.edu < linux-2.4.10.tar.gz
ttcp-t: buflen=8192, nbuf=2048, align=16384/0, port=5001  tcp  -> prague.cs.unh.edu
ttcp-t: socket
ttcp-t: connect
ttcp-t: 28338216 bytes in 2.50 real seconds = 11056.14 KB/sec +++
ttcp-t: 3460 I/O calls, msec/call = 0.74, calls/sec = 1382.31
ttcp-t: 0.0user 0.9sys 0:02real 35% 0i+0d 0maxrss 0+2pf 0+0csw


From the above group of experiment, we found:

 

1. big files significantly affects the connection of 2 NIC cards directly connected with crossover cable.

   ( 3276.12 KB/sec VS 10910.87 KB/sec )

  The possible reason might be: not enough buffer or buffer size is too small. To test it, Redo experiment 1 with larger buffer and more buffers.

 

Experiment 1

[lin@prague ttcp]$ ttcp -r -s -n 16384 -l 16384
ttcp-r: buflen=16384, nbuf=16384, align=16384/0, port=5001 tcp
ttcp-r: socket
ttcp-r: accept from 192.168.3.1
ttcp-r: 28338216 bytes in 8.46 real seconds = 3271.23 KB/sec +++
ttcp-r: 19867 I/O calls, msec/call = 0.44, calls/sec = 2348.39
ttcp-r: 0.0user 0.1sys 0:08real 1% 0i+0d 0maxrss 0+4pf 0+0csw

 

[lin@madrid lin]$ ttcp/ttcp -t -n 16384 -l 16384 192.168.3.2 < linux-2.4.10.tar.gz
ttcp-t: buflen=16384, nbuf=16384, align=16384/0, port=5001 tcp -> 192.168.3.2
ttcp-t: socket
ttcp-t: connect
ttcp-t: 28338216 bytes in 8.46 real seconds = 3272.07 KB/sec +++
ttcp-t: 1730 I/O calls, msec/call = 5.01, calls/sec = 204.55
ttcp-t: 0.0user 6.4sys 0:08real 76% 0i+0d 0maxrss 6919+4pf 0+0csw

 

The result shows: the speed decreases not because of small buffer size or shortage of buffer