Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Apr 2000 05:17:10 +0300
From:      A G F Keahan <ak@freenet.co.uk>
To:        freebsd-hackers@freebsd.org
Subject:   Multithreaded server performance
Message-ID:  <3903AEA6.FA7CBBAB@freenet.co.uk>

next in thread | raw e-mail | index | archive | help
I am currently porting a multithreaded TCP server from NT (yech!) to
UNIX using pthreads.  The server has a fairly straightforward design --
it opens a thread for each connection, and each thread spends most of
its life blocked in a call to read() from a socket.   As soon as it
receives enough of a request, it does quite a bit of processing and
sends something back to the client.

How would FreeBSD 4.0 perform in such a scenario?   We are talking
hundreds, maybe thousands of threads, a lot of them doing blocking reads
and writes.   Is the standard pthreads library adequate for the task, or
would "Linuxthreads" be a better choice?   What is the main difference
between the standard FreeBSD pthreads and "Linuxthreads" -- it seems
both are implemented using a version of clone().

The hardware is probably going to be UP at first -- a fast Pentium III
(733MHz?), an Intel 820 board, an Adaptec U2W SCSI controller, and a
couple of U2W LVD SCA disks to go with it.   The operating system has
yet to be chosen.   I have tried Solaris 7 on similar hardware, and it
seems so much slower than FreeBSD -- and so bloody unresponsive when
doing I/O that even NT seems faster.   On the other hand, Solaris's
threads implementation is supposedly better than anything else out
there.  I'm not even considering Linux -- or should I?   Is it safe to
use FreeBSD 4.0-S on a production server?   So far I've had nothing but
positive experience with it.

Any advice will be much appreciated.

Alex Keahan


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3903AEA6.FA7CBBAB>