next_group up previous


Introduction

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.

Usage

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:

-I/usr/local/package/FastSockets/include

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
i386_linux

<feature> currently from
debug
slower but extensive internal checking
optimized
fastest
profiling
compiled with -pg

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

Features

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

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

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

$\bullet$
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().

Caveats

$\bullet$
If a Panda implementation on top of LFC is used, the usual LFC restrictions apply:
$\bullet$
only one process may own the Myrinet device. So fork/exec and sharing of file descriptors is impossible.
$\bullet$
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).

$\bullet$
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).
$\bullet$
Currently, peeking from a socket buffer is supported, but it has not yet been extensively tested.
$\bullet$
Currently, support for C++ has been implemented not yet been extensively tested.
$\bullet$
Currently, the TCP out-of-band mechanism (OOB) is not supported.
$\bullet$
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>
socket
bind
connect
listen
accept
send
sendto
sendmsg
recv
recvfrom
recvmsg
shutdown
getsockopt
setsockopt
getsockname
getpeername
#include <unistd.h>
write
read
close
#include <sys/uio.h>
writev
readv
#include <sys/ioctl.h>
ioctl
#include <sys/select.h>
select
#include <fctnl.h>
fcntl

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

2000-04-14