Slam! is a tool that measures network bandwidth by opening a TCP socket between a client and server, and pushing data over the network. Slam! is logically a direct descendent of TTCP, a widely used and freely available tool for measuring bandwidth over a TCP connection (for more info on TTCP, visit this link).
Slam! Source Code
All of the current Slam! source (21 Jan 2000) is in this tarball. There is no documentation, just read the source. There are only a few command line options to set server or client mode, the connect-to host (only the client specifies this), the size in bytes of the TCP window, and the number of shovel-fulls of data to send over the pipe.
The Jan 5 version of the Slam! source is available here.
Slam! was written because TTCP doesn't (easily) compile on some of our machines at LBL/NERSC, so we wrote a new one from scratch while occasionally glancing at the TTCP code. TTCP and Slam! generate more or less identical results, but Slam! is much thinner, albeit not as complete in terms of command line options. The command line interface is very, very simple.
|Server Side||Client Side|
cartman% slam -sRun slam in server mode on a host named "cartman." The "cartman %" is NOT part of the command line, it is the prompt on host "cartman."
bigal% slam -c -h cartman -n 1024 ([-bs TCPWindowSizeInBytes] || [-bw BandwidthBytesPerSec -d LineDelayMsec])Run slam in client mode, specifying a host named "cartman" for the server host. The client code is being run on host "bigal". Note that "bigal %" is NOT part of the command line, it is the prompt on host "bigal".
- One of -c or -s must be specified on the command line.
- When running in client mode (-c on the command line), you must specify a hostname with -h hostname command line option.
- (Jan 21, 2000) TCP Window size is specified ONLY on the client side,
and may be expressed in one of two ways. When the client starts up, it will
negotiate with the server to obtain the final TCP window size, and use
that value when opening up the data connection. Use one of the two sets
of client-side command-line options to set the TCP window size.
- -bs TCPWindowSizeInBytes
- The TCP window size will be set to TCPWindowSizeInBytes in size.
- -bw BytesPerSecond -d PathDelayMsec
- Set the TCP window size to be the product of the channel bandwidth BandwidthBytesPerSecond with the line delay PathDelayMsec. Current thinking on this subject states that the optimal TCP window size is the product of these two values.
- When using the second form (bandwidth * delay), you will need to use other tools to obtain measurements of these values for the specific route you'll be using between the client and server. For more information on this subject, please refer to this page. We have used Pchar with success to obtain bandwidth and delay values.
- The reason for providing two TCP window size interfaces is because in some cases, we want to discover the bandwidth with Slam!. Another reason is to develop the client-server negotiation code inside of Slam!, which was subsequently integrated into the IBRAVR viewer.
- If you omit specifying a TCP window size on the client side, a default window size of 128K is used.
- -bs TCPWindowSizeInBytes
Slam! is being release "as is" with no license restrictions, but no promise of future support, in the hope that it will be useful to others.