next_group up previous


Panda FastSockets is a reimplementation of Berkeley FastSockets that was written by Steve Rodrigues and Kristin Wright. Panda FastSockets has been extended/rewritten by Rutger Hofman.

Panda FastSockets lies on top of Panda. Its main virtues are: zero-copy streams in all cases, throughput and latency close to Panda (no-threads) throughput and latency.

Panda FastSockets is used in the same way as Berkeley FastSockets: all relevant syscalls and library calls are caught and redefined: socket, close, send, sendmsg, read, write, etc etc. If a socket is created for access within the fast network domain, the handling is done by FastSockets. Otherwise, the system call or library call is executed.


To access the FastSockets primitives in your program, obtain include files from the FastSockets location in stead of from the system location. Use the Panda compile script panc -no-threads (see man panc) in stead of the usual C compiler. Add to your compile command:


Be sure to include the relevant system include files (e.g. #include <sys/socket.h> for calls to socket(), bind() etc) in ALL source files where intercepted calls occur! See the Appendix for a list of intercepted calls and corresponding include files.

Add to your link command:

-L/usr/local/package/FastSockets/lib/<arch>/<feature> -lsockets
-L/usr/local/package/FastSockets/enameserver/lib/<arch> -lens

<arch> currently from

<feature> currently from
slower but extensive internal checking
compiled with -pg

This should be all to migrate your program from kernel sockets to FastSockets. Migration should be transparent. However, see section `Caveats'!


To disable FastSockets and just use the kernel implementation, set environment variable FS_DISABLE

To disable Kernel/FastSocket multiplexing at listen/accept/connect time so only fast network connections are accepted, set environment variable FS_NO_INET_ACCEPT

To change socket buffer size, set environment variable FS_BUFFER_SIZE to the desired value. However, see section `Caveats', subsection Panda/LFC/flow control!

The debug version of FastSockets can print communication statistics. Set the environment variable FS_STATISTICS. Statistics are printed on shutdown. FastSockets attempts to be intelligent about shutdown: if the last FastSocket socket is closed, it assumes it should shut down. If the user does not close all his sockets, FastSockets can be explicitly shut down with a call to fs_disable().


If a Panda implementation on top of LFC is used, the usual LFC restrictions apply:
only one process may own the Myrinet device. So fork/exec and sharing of file descriptors is impossible.
only a fixed amount of pinnend memory is available. Therefore Panda implements flow control. By default, 64K is the receive buffer size per host pair. FastSockets uses a TCP buffer window of 64K per connection.

If > 1 connection between two hosts are open, the Panda buffer size is insufficient. The current solution is to either increase the panda buffer size (but the LFC pinned memory limit will be hit) or decrease the socket buffer size. An eventual solution will be to have FastSockets copy aside into a user space buffer when the required socket buffer exceeds the panda buffer (at run time, so no copy penalty as long as buffer space suffices).

LFC initialisation is a collective call. So all participating processes should initialise FastSockets at the same time. Initialization is automatic when any relevant call is made (e.g. socket()). If your program does not call socket() at the same time in all nodes, it is best to explicitly initialize FastSockets with a call to fs_init(1) (this means an integer parameter of value 1).
Currently, peeking from a socket buffer is supported, but it has not yet been extensively tested.
Currently, support for C++ has been implemented not yet been extensively tested.
Currently, the TCP out-of-band mechanism (OOB) is not supported.
Currently, runtime change of socket buffer size is not well debugged. Use the FS_BUFFER_SIZE mechanism instead, see section `FEATURES'.

Appendix. Intercepted calls

Currenty the following calls are intercepted:

#include <sys/sockets.h>
#include <unistd.h>
#include <sys/uio.h>
#include <sys/ioctl.h>
#include <sys/select.h>
#include <fctnl.h>

About this document ...

This document was generated using the LaTeX2HTML translator Version 99.1 release (March 30, 1999)

Copyright © 1993, 1994, 1995, 1996, Nikos Drakos, Computer Based Learning Unit, University of Leeds.
Copyright © 1997, 1998, 1999, Ross Moore, Mathematics Department, Macquarie University, Sydney.

The command line arguments were:
latex2html -split 0 FastSockets.tex

The translation was initiated by on 2000-04-14

next_group up previous