TTCP
Readme
August 2006
Table of Content:
1.
Overview of module
2.
Documentation
3.
Compiling TTCP
4.
Running TTCP
5.
Man Page
1.
Overview of module
The
TTCP program of HyperCast is a tool for throughput and delay
measurements
with HyperCast overlay sockets. The software is based on the
public domain (?) Chesapeake
TTCP implementation (see http://www.ccci.com/).
The program assumes some familiarity with the original TCP (TTCP)
utility, a widely used command-line sockets-based
benchmarking tool
for measuring TCP and UDP performance between two systems.
The program also assumes some familiarity with HyperCast.
The HyperCast TTCP program extends TTCP to HyperCast overlay
sockets:
- Benchmarking with HyperCast overlay sockets.
- Delay and Throughput measurements
- Multicast measurements
The functionality of the original
TTCP program for UDP and TCP measurements is mostly maintained.
2.
Documentation
The
commenting of the code is sparse, and the documentation consists of
this file and the HyperCast TTCP Man page. There are numerous
undocumented features.
3.
Compiling TTCP
Download and extract a BINARY distribution of Hypercast.
Extract the *.java source files and the *.xml files to the
root directory of HyperCast.
Compile the sources with the following commands
javac -cp "lib/hypercast.jar;lib/xalan.jar;lib/crimson.jar;.
*.java
The main class is in ttcp.class
4.
Running TTCP
- The lib
directory should contain the following JAR files, which can
be obtained from any
hypercast binary distribution:
bcprov-jdk14-122.jar
xalan.jar
crimson.jar
hypercast.jar
- The
following commands assume that the classpath is set to
"lib/hypercast.jar;lib/xalan.jar;lib/crimson.jar;.". If not, add
`-cp "lib/hypercast.jar;lib/xalan.jar;lib/crimson.jar;." '
between "java" and "ttcp".
- Hypercast
configuration files hypercast.xml must be appropriately
configured. (See the
HyperCast Binary readme file).
Example 1: TCP benchmark
At receiver: >
java ttcp
-r
At sender: > java
ttcp -t 128.100.11.52
Output at sender:
Overlay TTCP
send to 128.100.11.52
counter 1
TCP Transmit: buflen= 512 nbuf= 1024 port= 5001
Transmit connection:
Socket[addr=/128.100.11.52,port=5001,localport=2343].
Start to send TCP packets
Waiting 3sec before transmiting...
....................
.
finished.
Transmit: 1024 packets in 31 milli-seconds = 16912.516 KB/sec
(135300.12 Kbps).
0 ACKs
recceived Average
round-trip-time=0.0ms
Interpretation: Transmitting
1024 buffers @512 Bytes over a TCP connection was completed in 31 msec,
resulting in a data rate of approx. 135 Mbps.
Example 2: UDP benchmark
At receiver: > java
ttcp -r -u
At sender: > java
ttcp -t 128.100.11.52 -u
Output at sender:
Overlay TTCP
send to 128.100.11.52
counter 1
UDP Transmit: buflen= 512 nbuf= 1024 port= 5001
Start to send udp packets to 128.100.11.52
Waiting 3sec before transmiting...
...................
ACK Receiver stopped.
Transmit: 1024 packets in 47 milli-seconds = 11155.063 KB/sec (89240.51
Kbps).
ACKs recceived Average
round-trip-time=0.0ms
Output at receiver:
Overlay TTCP
Overrides:
counter 1
UDP Receive: buflen= 512 nbuf= 1024 port= 5001
Wait to receive udp packets:
Unicast Receive: nbuf adjusted to 1024
Start to receive udp packets:
Bandwidth check interval set to default value: 500ms
.....Receive: Receiving finishes but not all packets received.
Receive: Receive: 289 packets, 38185.29 Kbps, lost 735 packets, lost
ratio is 71.77734375%, retransmission 0.
average delay=-1027.2007
Interpretation: Transmitting
1024 UDP messages 512 Bytes over UDP was completed
in 47 msec,
resulting in a transmission rate of approx. 89 Mbps. 735 UDP
messages (~71%) did not arrive at the receiver.
Example 3: Overlay benchmark
At receiver: >
java ttcp -o -r -prop hypercastR.xml
At sender: > java ttcp -o -t 500,500 -prop
hypercastS.xml -d delaysend -l 100
Output at sender:
Overlay TTCP
send to 500,500
record delay to: delaysend
Overrides:
counter 1
Overlay Transmit: nbuf= 1024
This node's logical address is:984,4861
Send to 500,500
Waiting 5sec before overlay network becomes stable...
eventOccurred: hypercast.events.NODE_NEIGHBORHOODCHANGED
eventOccurred: hypercast.events.NODE_ISSTABLE
Start to send overlay packets
eventOccurred: TTCP_EVENT
....................
.
finished.
Waiting 5sec before leaving overlay network...
Transmit: 1024 packets in 125 milli-seconds = 819.2 KB/sec (6553.6
Kbps).
0 ACKs recceived Average
round-trip-time=0.0ms
Output at receiver:
Overlay TTCP
counter 1
Overlay Receive: nbuf= 1024
This node's logical address is:500,500
Wait to receive multicast packets:
eventOccurred: hypercast.events.NODE_ISSTABLE
Interpretation: TTCP
uses an overlay with configuration files hypercastR.xml at receiver and
hypercastS.xml at sender. The sender sends to the logical address of
the receiver ("500,500"). 1024 application messages are
transmitted. The events
"hypercast.events.NODE_NEIGHBORHOODCHANGED" and
"hypercast.events.NODE_ISSTABLE" are events defined in HyperCast. ( The
NODE_ISSTABLE tells that the nodes have stabilized and formed an
overlay network.)
Example 4: Overlay benchmark with delay measurements
At receiver: > java ttcp -o -r
-prop RunServerSocketR.xml
At sender:
>java ttcp -o -t 400,400 -prop RunServerSocketS.xml -d
delaysend -n 10000
Output at sender:
Overlay TTCP
send to 400,400
record delay to: delaysend
Overrides:
counter 1
Overlay Transmit: nbuf= 10000
This node's logical address is:500,500
Send to 400,400
Waiting 5sec before overlay network becomes stable...
eventOccurred: hypercast.events.NODE_NEIGHBORHOODCHANGED
eventOccurred: hypercast.events.NODE_ISSTABLE
Start to send overlay packets
eventOccurred: TTCP_EVENT
....................
....................
....................
....................
....................
....................
....................
....................
....................
finished.
>
Last ACK received.
Waiting 5sec before leaving overlay network...
Encountered Exception "Connection reset" while reading from incoming
socket.
Transmit: 10000 packets in 2328 milli-seconds = 2199.3127 KB/sec
(17594.502 Kbps).
10000 ACKs recceived Average
round-trip-time=24.907ms
Output at receiver:
Overlay TTCP
counter 1
Overlay Receive: nbuf= 1024
This node's logical address is:400,400
Wait to receive multicast packets:
eventOccurred: hypercast.events.NODE_ISSTABLE
eventOccurred: hypercast.events.NODE_NEIGHBORHOODCHANGED
eventOccurred: hypercast.events.NODE_ISSTABLE
Session set to: TEST
Overlay Receive: nbuf adjusted to 10000
Timeout set to: 20000
Bandwidth check interval set to default value: 500ms
Start to receive overlay packets:
eventOccurred: TTCP_EVENT
....................
....................
....................
....................
....................
....................
....................
....................
....................
....................
Waiting 5sec before finish...
Receive: Receive: 10000 packets, 17957.037 Kbps, lost 0 packets, lost
ratio is 0.0%, retransmission 0.
average delay=81521.12
Content of output file
TEST_DATA/TEST_delaysend_1.txt
Overlay
receiver sequence# size(byte)
sent
received
acked
RTT delay
throuput(kbps)
400,400
0
512
1154730964371
1154731045938 1154730964464
93
46
89.04348
400,400
1
512
1154730964402
1154731045954 1154730964464 62
31
132.12903
400,400
2
512
1154730964402
1154731045954 1154730964464 62
31
132.12903
400,400
3
512
1154730964402
1154731045954 1154730964464 62
31
132.12903
Interpretation: TTCP
uses an overlay with configuration files hypercastR.xml at receiver and
hypercastS.xml at sender. The sender sends to the logical
address of the receiver ("500,500"). 10000 application
messages are transmitted. With the -d delaysend
option, the receiver sends an ACK for each message to the sender. The
sender records the round trip time of each packet, computed as the
differences of the return time of an ACK and the
transmission time of the corresponding packet. The "average
round-trip-time=24.907"is the average delay in milliseconds. The
content of the file is explained in the manual page.
5.
Man Page
Usage: java
ttcp <options>
Note: The following parameters need to be set identically at sender and
receiver: [u, m, o]
Sender sends packets with Seq number, timestamp of transmission, size
of payload,
Receiver sends ACK:
Usage: java ttcp <options>
-o
Use HyperCast overlay for
data
transmission. Configuration file is default configuration file is
RunServerSocket.xml). If this
option is not given, then TCP/UDP/or UDP
multicast is run without an overlay socket.
-R
[start_rate] [end_rate]
[increment]
Set the sending
rate to start_rate
kbps. Can be used to impose a rate limit with
UDP (without overlay) or with a UDP substrate (with overlay). The
parameter is
set at
the sender side only. When the rate is set
to “0”, the
sender transmits as fast as possible. (default: 0 (greedy))
(There are additional parameters end rate and
increment, that can be used to increase the transmission rate.)
-r
Receive mode (default)
-t <logical address (for
overlays) or IP
addr (if no overlay is used) of receiver
address>
Transmit mode. The
argument specifies
the receiver (destination) address. If no argument is specified and the
-o option is used, then the overlay will use SendtoAll().
The following parameters are set if TTCP is run without an overlay:
-u
use UDP instead of TCP (default: TCP)
-m
[addr]
use UDP Multicast (default TCP, default for addr:
224.228.19.79)
-p ##
Port number (default 5001)
The following parameters are only
set at the sender:
-l
##
Buffer (payload) length in
bytes (default 512)
-n
##
Number of messages to be
transmitted (default
1024)
-c
[##]
Repeat experiment ## times
(default is
to repeat indefinetly). When this argument is >1, the sequence
of packets given in
the -n
option
is transmitted several times with a pause of approximately 10
seconds between transmissions.
Other options:
-f
[file]
Log statistics (default
file=ttcp_log_<timestamp>.txt) Statistics
are recorded at sender and receiver.
-s [file]
Record sequence number (default
file=ttcp_seq_<timestamp>.txt). Only
recorded at
receivers.
Fields in the sequennce number file:
sequence#
= Sequence number
received
= Always set to “1”
sent time
= Timestamp
of sending time (obtained from content packet). The values are
normalized to first value of
“received time”
received time = Timestamp at receiver when data was
received. Values
are normalized to “0” for first message.
pseudo-delay = received time – sent time
after reply <--- ignore this field
-bw
<interval> [file]
Record the Bandwidth at
every <interval>
ms
time, where <interval>
is a window over which throughput is
calculated.
-s2d
<interval> <sq_file> [output_file]
Convert the sequence number
file to density
file, where density [????]
-d
<delay_file>
When
this option is specified, the receivers sends ACKs. The specified file
contains the time stamp value for theacknowledgement data.
Receiver
= logical address of receiver
sequence# = seq no of packet
size(byte) = payload of
packet
sent
= timestamp from sender (returned in ACK)
received
= timestamp from receiver (returned in ACK)
acked
= timestamp at sender when ACk
arrived.
RTT
= acked
– sent
delay
= RTT/2
throuput(kbps) = size/delay (should not be used for
calculations)
-smd
<interval> <receiver ID>
<delay_file> [output_file]
Create Smoothed delay file
-monitor
Start in Monitor
Mode
-prop
<file>
Specify the the config
file to create overlay socket
-h
Print this message
end
jl 8/2006