The stackthru program (client part) needs the following arguments:
Usage ........: stackthru >>--- SERVERADDRESS --- COMMUNICATION --->
>--- BLOCKSIZE --- DATASIZE ---><
Parameters ...: SERVERADDRESS = Address where the stackthru-daemon
is listening:
- For TCP/IP family: <host>:<port>
COMMUNICATION = The protocol/way which should be used:
- TCPv4 = TCP over IP Version 4
- UDPv4 = UDP over IP Version 4
BLOCKSIZE = Number of bytes per write() to the
stackthru-daemon.
DATASIZE = Total size in MB of the data to be
send to the stackthru-daemon.
Sample .......: stackthru 192.168.2.1:2342 TCPv4 1448 256
Sends 256 Megabytes of data (in blocks of 1448 Bytes;
based on a MTU of 1500 Bytes) via TCP to port 2342
on the host 192.168.2.1 (where the stackthru daemon
is listening).
|
|
Figure 1: Syntaxdiagram for the stackthru executable
The stackthrud program (server part) needs the following arguments:
Usage ........: stackthrud >>--- LISTENTO --- COMMUNICATION --->
>--- BLOCKSIZE ---><
Parameters ...: LISTENTO = Port,... where the stackthru-daemon
is listening:
- For TCP/IP family: <port>
COMMUNICATION = The protocol/way which should be used:
- TCPv4 = TCP Version 4
- UDPv4 = UDP Version 4
BLOCKSIZE = Number of bytes per read() from the
stackthru client.
Sample .......: stackthrud 2342 TCPv4 1448
Listens to port 2342 for TCP packages and reads
in 1448 byte blocks.
|
|
Figure 2: Syntaxdiagram for the stackthrud executable
So lets go for a small example on how to do a measurement / benchmark using
the stackthru tool. First we have to start the server program.
[xca1019][hal][...te/stackthru/v00r006][0] > stackthrud 2342 tcpv4 1448
STACKTHRUD V00.99/R006
Session established ...
Session terminated ...^C
[xca1019][hal][...te/stackthru/v00r006][130] > _
|
|
Figure 3: Sample output of the stackthru daemon (the
stackthrud executable)
In Figure 3 we see the output of stackthrud which is listening to port
2342 for TCP packages coming over IP version 4. The buffer size is 1448
Bytes. To end the server process, you have to press Ctrl + C.
As a next step we are able start the client program.
[xca1019][hal][...te/stackthru/v00r006][0] > stackthru 127.0.0.1:2342 tcpv4 1402 1
STACKTHRU V00.99/R006
Server.Name .............: 127.0.0.1
Server.IP ...............: 127.0.0.1
Server.Port .............: 2342
Transfer.Method .........: TCP over IP Version 4
Transfer.Size.Total .....: 256 MB
Transfer.Size.Block .....: 1448 Bytes
Transfer.Blocks .........: 185383 (185383.602)
Transfer.Size.X-Block ...: 871 Bytes
Result.Time.Real ........: 0.964 sec
Result.Time.Sys .........: 0.400 sec
Result.Throughput .......: 265.560 MB/sec (2^20)
Result.Throughput .......: 2227.680 Mbit/sec (10^6)
Result.Throughput .......: 192307.062 Frames/sec *
* = Only a rough estimate that can be far off - so handle with care!
The calcuated value assumes that the data got transmitted with
TCP packets where the payload size equals the given block size.
[xca1019][hal][...te/stackthru/v00r006][0] > _
|
|
Figure 4: Sample output of the stackthru testdriver
after transmitting 256 MB over the loopback device.
In Figure 4 we see the client process output. You can see the results
for sending 256 MB (with 1448 Bytes block size) over the loopback
device.
The block size can be very important for the resulting throughput.
It defines the buffer size used for the single write() function
call. The buffer gets filled with random values (ASCII 32 - 255).
As an eyecatcher (for sniffing) the buffer will be led by the
string "
##### BEGIN #####
" and ended with
"
##### END #####
".
You can expect the maximum throughput by using a block size which
is equal to the maximum size of a frames data part. For TCP over
IP version 4 this is 1448 Bytes (with a MTU of 1500; using Jumbo
frames this value is higher). To be on the save side, you can use
a quite large value for sending 1 MB and sniffing this to get the
maximum size of a single frames data part.