Re: [PHP-DEV] Re: PHP Performance in Apache: Multi-Process vs Multi-Threaded

2010-12-15 Thread Ferenc Kovacs
On Wed, Dec 15, 2010 at 5:46 PM, Julien Pauli wrote: > Well, I can't answer precisely about kernel fork() implementation and > possible copy on write mechanisms. May vary across systems. > Someone here could answer I suppose. > > 'top' on httpd process with a prefork mpm gives each child process

Re: [PHP-DEV] Re: PHP Performance in Apache: Multi-Process vs Multi-Threaded

2010-12-15 Thread Julien Pauli
Well, I can't answer precisely about kernel fork() implementation and possible copy on write mechanisms. May vary across systems. Someone here could answer I suppose. 'top' on httpd process with a prefork mpm gives each child process memory as a whole XxxMb process, but I don't know what kind of m

Re: [PHP-DEV] Re: PHP Performance in Apache: Multi-Process vs Multi-Threaded

2010-12-15 Thread Jon Davey
2010/12/15 Julien Pauli > > Well, I would say that if your problem is memory, you should consider > threads as they all share the same memory space in their process. > > Apache's children can weight very heavy if PHP's been compiled to > support lots of extensions, you can happen with ~40/50Mb per

Re: [PHP-DEV] Re: PHP Performance in Apache: Multi-Process vs Multi-Threaded

2010-12-15 Thread Johannes Schlüter
On Tue, 2010-12-14 at 22:22 +0300, jvlad wrote: > > No. Php if we talk about php with all its extensions is not threadsafe > at > all. Many of the extensions allocate static data and inherently > non-thread-safe. PHP is, if compiled with ZTS/TSRM, thread-safe. Some libraries used by some exten

Re: [PHP-DEV] Re: PHP Performance in Apache: Multi-Process vs Multi-Threaded

2010-12-15 Thread Julien Pauli
Well, I would say that if your problem is memory, you should consider threads as they all share the same memory space in their process. Apache's children can weight very heavy if PHP's been compiled to support lots of extensions, you can happen with ~40/50Mb per process which is very huge. Conside