Re: Details on delivering and managing application
From: John Thingstad (john.thingstad_at_chello.no)
Date: 02/03/05
- Next message: Stefan Scholl: "Re: Details on delivering and managing application"
- Previous message: Pascal Costanza: "Re: Continuations in Common Lisp (with apologies)"
- In reply to: Wade Humeniuk: "Re: Details on delivering and managing application"
- Next in thread: Wade Humeniuk: "Re: Details on delivering and managing application"
- Reply: Wade Humeniuk: "Re: Details on delivering and managing application"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 03 Feb 2005 19:40:33 +0100
On Thu, 03 Feb 2005 15:47:29 GMT, Wade Humeniuk
<whumeniu+anti+spam@telus.net> wrote:
> John Thingstad wrote:
>
>> It seems some peaple forget how expensive spawning new proceses is
>> compared to
>> lightweight threading. (share process and memory.)
>>
>
> How many microseconds does it take? But seriously I am tainted
> by past memories of the first releases of Solaris where we found
> forking processes was much faster than threads. I am
> also pretty sure that in some OS models there are things called
> light-weight processes that are used to implement processes and
> threads. My memory is very fuzzy though, and who cares these
> days? throw another Gig of memory in the sucker and add 4 more
> processors.
>
> Wade
Depends on your system. Unixes have a relatively quick context switch.
Still sharing data is much more difficult. And remember fork actually
copies the process before exec overwrites it. So starting the
multi-processing is much slower. (I think there is a kludge that get's
around this but I forget the details.) This matters if you are forking
a new process for each web request.
Under windows process overhead is much higher so if you want to
port the code to Windows you are in for a nasty surprise.
(However there is OS thread support which is rather fast.)
The first version of Apache for windows tried spawning (a windows term)
a new process for each request. This works well under Unix but
the performance under Windows was unacceptable.
The newer Apache 2 uses a threading pool and is much faster.
-- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
- Next message: Stefan Scholl: "Re: Details on delivering and managing application"
- Previous message: Pascal Costanza: "Re: Continuations in Common Lisp (with apologies)"
- In reply to: Wade Humeniuk: "Re: Details on delivering and managing application"
- Next in thread: Wade Humeniuk: "Re: Details on delivering and managing application"
- Reply: Wade Humeniuk: "Re: Details on delivering and managing application"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|