From owner-freebsd-questions Tue Apr 24 16:58:23 2001 Delivered-To: freebsd-questions@freebsd.org Received: from matrix.dynamic-cast.com (r175-5-dsl.sea.lightrealm.net [216.122.5.175]) by hub.freebsd.org (Postfix) with ESMTP id DE4CE37B43C for ; Tue, 24 Apr 2001 16:58:15 -0700 (PDT) (envelope-from herveyw@dynamic-cast.com) Received: from chillipepper (chillipepper.dynamic-cast.com [192.168.1.1]) by matrix.dynamic-cast.com (8.11.3/8.11.3) with SMTP id f3ONw6U74862; Tue, 24 Apr 2001 16:58:08 -0700 (PDT) (envelope-from herveyw@dynamic-cast.com) Message-ID: <000d01c0cd1a$83109640$0101a8c0@chillipepper> From: "Hervey Wilson" To: "Mike Meyer" , "Mark Giglio" Cc: References: <15077.62126.88738.629586@guru.mired.org> Subject: Re: hotmail converted from freeBSD Date: Tue, 24 Apr 2001 16:58:48 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2462.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2462.0000 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG From: "Mike Meyer" > > This model is indeed inefficient on FreeBSD - and every other OS I > know of. If there's an OS out there that can handle this model > efficiently at the levels required for a busy web server, I'd like to > hear about it. > > > and thirdly, can it be improved, or is it a property of cgi and fixed? > > Oh, it can definitely be improved. Most modern web servers use a > threaded model, with one thread per socket. That's the recommended > model on Win9X, so I suspect that's what they went to at Hotmail. Developing a full-blown web server on Win9x wouldn't be a Good Thing (TM). The "thread per socket" model is not the recommended solution for Windows 2000 (see below). IIS does not use that model. > > For killer performance, you go to a single thread of control for all > your sockets and use the Unix select() syscall. This makes all the > technical headaches associated with threaded systems and separate > address spaces disappear, cuts the overhead associated with context > switches, and in general simply screams. > > Win9X doesn't have a native select() call. The Cygnus tools apparently > simulate it using threads (which throws out about half the > advantages). I suspect that the same is true of Win2K Windows 2000 has an asynchronous IO subsystem that supports a model where a pool of threads can wait on completion objects and the operating system wakes threads as required to handle IO events. This is typically a more scalable than the "thread per socket" model although it not for the faint hearted developer ;) Which leads me to ask a question: where can I find more information about thread models for FreeBSD ? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message