Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42561 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 51278 invoked from network); 11 Jan 2009 16:05:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Jan 2009 16:05:01 -0000 X-Host-Fingerprint: 85.21.236.169 xdmitri.dialup.corbina.ru Received: from [85.21.236.169] ([85.21.236.169:5851] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 43/D6-17244-BA81A694 for ; Sun, 11 Jan 2009 11:05:01 -0500 Message-ID: <43.D6.17244.BA81A694@pb1.pair.com> To: internals@lists.php.net References: <200901101830.35403.thomas@koch.ro> <8E.40.26912.68B39694@pb1.pair.com> <4969B6C9.4070903@daylessday.org> <496A12D6.1050104@daylessday.org> Date: Sun, 11 Jan 2009 19:04:53 +0300 Lines: 43 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5512 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-RFC2646: Format=Flowed; Original X-Posted-By: 85.21.236.169 Subject: Re: [PHP-DEV] Re: php daemons, memory From: dmda@yandex.ru ("jvlad") >> seems you're flying too high. >> RHEL5 still ships php5.1.6 and it has this option and it undefines >> ZEND_USE_ZEND_ALLOC. > > PHP 5.2.0 has been released more than 2 (two) years ago, which should be > enough for a distro to catch up, don't you think so? Perhaps. But what they ship with RHEL5 is up to Redhat. >> For the newer versions (5.2.x) it can be set at the environment, which is >> not that good btw. > > Please elaborate. Ok. With default memory allocation strategy I can run relatively short scripts very efficiently and that's why I'd not change it for the web site. On the other hand, for long-running scripts that I run using php-cli, I'd always prefer resource saving priorities. In particular, I'd prefer ZMM not to "cache" memory blocks. With only one system-wide setting, I have no choise. Either all php will use ZMM or neither. >>> That won't affect memory usage very much. >> >> I gives appox 2MB per php-cli instance. Sometimes it's good enough, if >> for >> example you need to run 200 instances. > > Shared libs are, well, shared among the processes, so I don't think it's > "per instance". That's truth. Code segments will be shared. But even with 2MB of code, CPU uses 512 entries in TLB for _each_ process and it's clear worthless stuff. In case of hundred instances running simultaneously, it may save some time. Also, please add time for the initialization of the modules that won't be used. Anyway, if php is to be recompiled from the sources in order to build long-term running daemons, the configure options should be carefully tuned. -jv