Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


Even 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.


No, 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.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: