views:

99

answers:

1

Apache's worker MPM creates multiple threads per process, where each thread handles a request. As of 2.6, the Linux kernel uses Native POSIX Threading Library, which has a 1:1 threading model. Given this, I would expect to see 100 apache processes if there are 100 simultaneous requests being serviced (one request -> one thread -> one process). However, after running some real world tests, I see this is not the case. What is going on here?

+1  A: 

The 1-on-1 model of NPTL doesn't mean 1 thread per process. It rather means one user level thread to one kernel thread so that there is no need for two schedulers as in mxn model. This is explained in detail in the NPTL design here.

Murali VP