[ale] threads and apache

stephen stephen at phynp6.phy-astr.gsu.edu
Fri Oct 11 10:01:10 EDT 2002


On Fri, Oct 11, 2002 at 04:13:28AM -0700, Stephen Turner wrote:
> hey, i was reading about how threads use less resources than actual
> applications, well that makes sense and all but why hasnt apache adopted
> this before? and how much resources do you think it saves?

This depends on the OS, but linuxthreads in glibc is implemented
in userspace so threads in linux are not lightweight processes
scheduled by the kernel.  However, I believe the forking API
in linux was designed to be as lightweight as possible so
the time for process creation is minimal.  This may also help
programmers so they don't have to change their apps from a
forking model to pthreads.

Also, there are some patches going into 2.5 wrt scaling for
kernelspace threads along with the Native Posix Threads
Library (nptl) which will eventually be integrated into glibc.
This should give linux the ablility to schedule threads in
kernelspace and will most certainly be cheaper than process
creation with forking.  You may have heard already about
some of the initial benchmarks of starting and stopping
100,000 threads in under 2 seconds.

stephen

---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list