From owner-freebsd-hackers Sun Apr 23 18:16:52 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mailgw1.netvision.net.il (mailgw1.netvision.net.il [194.90.1.14]) by hub.freebsd.org (Postfix) with ESMTP id 1C82737B55B for ; Sun, 23 Apr 2000 18:16:40 -0700 (PDT) (envelope-from ak@freenet.co.uk) Received: from freenet.co.uk (RAS3-p79.rlz.netvision.net.il [62.0.169.81]) by mailgw1.netvision.net.il (8.9.3/8.9.3) with ESMTP id EAA17885 for ; Mon, 24 Apr 2000 04:16:30 +0300 (IDT) Message-ID: <3903AEA6.FA7CBBAB@freenet.co.uk> Date: Mon, 24 Apr 2000 05:17:10 +0300 From: A G F Keahan X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 4.0-CURRENT i386) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Subject: Multithreaded server performance Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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