[wp-hackers] WordPress memory needed
Brian Layman
wp-hackers at thecodecave.com
Tue Jul 24 20:12:43 UTC 2012
On 7/23/2012 7:51 PM, Almog Baku wrote:
> If you ask me.. 256 is very very low.. so don't be miser about your
> memory.. it for your own good!
I tried to resist adding another reply to this thread, but I can't.
We need to remember that not every server implementation is done the
same. In many implementations there will be multiple instances of PHP
executed and loaded in memory. That must be a consideration. If you
have 30 instances of PHP running at once, and all of them tried to use
256MB of ram, you suddenly find yourself using 8gb of ram just for php
process - and that doesn't consider apache, mysql and OS memory. So
yeah, 256MB doesn't sound like much, but being miserly over memory usage
is critical. The one server I work regularly works its way up to 5500
simultaneous connections. If it used an Apache setup where 1/5 of those
connections might require a separate php instance and each instance
needed even 64MB, the server would need over 70GB of ram available to
keep up. Fortunately the max memory limit is simply that - a limit.
It is not a requested amount. And also nginx configs are awesome and
handle this level of traffic in full stride.
But you can see why it is important to keep memory usage in mind when
you write plugins and develop core. Desktop development has one person
using one computer, memory isn't as much of an issue. In a distributed
situation, when thousands of clients can connect at once, it's a
different world.
Brian Layman
More information about the wp-hackers
mailing list