My impression is yes that it is and that this is why mod_php shops run it (usually for non-thread safe apps).

On my ubuntu box, if I run

sudo ps axo pid,ppid,rss,vsz,nlwp,cmd

I get this:

32305     1  9820 183732    1 /usr/sbin/apache2 -k start
32318 32305  7172 183732    1 /usr/sbin/apache2 -k start

the nlwp would suggest apache is running as a single-threaded app or am I missing something?

Also - does this mean that all apache modules will be run in these apache processes as single threaded? Does the single threading nature of the parent process basically force these modules into acting as single threaded?



Yes, mpm prefork is always single-threaded. But this does not force all apache modules to be single-threaded because this just can't be forced.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.