4 ms·
Apache has pluggable concurrency modules (MPM's) and you can switch to a multiple-threads per process MPM if you choose. When the limit is hit, it will fork a n
by moon_of_moon 17y ago
Apache has pluggable concurrency modules (MPM's) and you can switch to a multiple-threads per process MPM if you choose. When the limit is hit, it will fork a new process. Each new thread stack is not more than an MB or two, so based on your calculations, you can do much better.
- pmjordan 17y agoEven if you're forking processes for concurrency, all memory pages assigned to the process at fork time are shared and use copy-on-write semantics, so anything that doesn't change doesn't consume real memory in each additional process. I don't know how much outside of each thread's/process's heap and stack sees writes in apache, but I suspect the difference between threads and processes is pretty slim in this respect.
- moon_of_moon 17y agoNo, you are assuming that 20 MB number is all heap. Wrong assumption. Anyway this article is flawed about the number of MB each process uses because I think hes using PS to get the numbers and that shows shared libraries too. Shared, as in single code segment used by all the processes. Also he's making bad assumptions about the work load. Shit maybe I should blog.