Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Apr 2001 16:58:48 -0700
From:      "Hervey Wilson" <herveyw@dynamic-cast.com>
To:        "Mike Meyer" <mwm@mired.org>, "Mark Giglio" <markgiglio@yahoo.com>
Cc:        <questions@FreeBSD.ORG>
Subject:   Re: hotmail converted from freeBSD
Message-ID:  <000d01c0cd1a$83109640$0101a8c0@chillipepper>
References:  <15077.62126.88738.629586@guru.mired.org>

next in thread | previous in thread | raw e-mail | index | archive | help
From: "Mike Meyer" <mwm@mired.org>
>
> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000d01c0cd1a$83109640$0101a8c0>