| Last modified: Tue Mar 26 23:50:24 CET 2002 | Index |
Architecture The way it works is simple: The server listens on port 1515 for inbound connections. When a client connects, the client sends data blocks of a certain size to the server. Both client and server measure the time. After sending several packets, the program shows the throughput-rate.
Usage Usage example for a server (host: nettp.bogus.edu):
nettp -s
Usage example for a corresponding client:
nettp -c nettp.bogus.edu $((1*1024*1024)) 10
This will send 10 times 1Mb to the host. (Yes, the $(())-trick works only with bash.) For slower lines decrease the block-size and increase the block-count. And don't forget: It is just a quick hack! Don't trust the results of this benchmark. Because IPv4 knows nothing about QoS, you should ensure that nobody else sends any data over the network-segment.
Some interesting results I measured:
10Mbit-Ethernet connection; between a Cyrix-6x86MX-PR233 and a
Pentium II 233: 946Kb/s.
115200bps-PPP-direct-serial-line; between an Amd-486-33Mhz with a
simple 16450-UART (!!) and a Pentium II 233 with a 16550A-UART:
12.11Kb/s.
100Mbit-Ethernet connection; between a Cyrix-6x86MX-PR233 and a
Pentium 133: 4770Kb/s.
Pros and cons There are several programs like "bing" out there, which do better jobs. nettp sends random data. This disables any lowelevel-compression, which may built into the lowest network-protocol like PPP. Because we use a TCP-connection for measurement you can be sure that there is a big amount of overhead which is sent over the net too. When you try to measure throughput of a PLIP-connection you'll get very silly results because the PLIP-driver consumes too much CPU-time.
Download Get the source-codes: nettp-0.1-source.tar.gz.
Compilation Just compile it with your favourite compiler (gcc, egcs or pgcc, or what ever you want). The program does not rely on any other libraries besides of libc6.
gcc -O2 nettp.c -o nettp
Development Development was done on Intel with Debian GNU/Linux 2.1. The network-protocol is NOT system-independent, but little-endian-to-little-endian and big-endian-to-big-endian should work.
| © 2000-2002 by Lennart Poettering | mzarggc (at) 0pointer (at) de |