Re: Re: PHP Performance in Apache: Multi-Process vs Multi-Threaded
| From: | Jon Davey | Date: | Wed, 15 Dec 2010 11:58:55 +0000 |
| Subject: | Re: Re: PHP Performance in Apache: Multi-Process vs Multi-Threaded | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-51033@lists.php.net to get a copy of this message | ||
2010/12/15 Julien Pauli <jpauli@php.net>
>
> 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. Considerating 50 parallel processes eat up 2-3Gb
> for example.
>
Surely creating a fork of a 50MB process will not consume an
additional 50MB because of copy-on-write virtual memory? I would think
you would only see this growth in memory usage if the extensions
maintained a large payload of data that was being heavily modified in
each request, such as caches, but I expect they create their own
shared memory segments (I have yet to check the source of APC).
Jon