Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:9448 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6073 invoked by uid 1010); 21 Apr 2004 09:52:25 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 5987 invoked from network); 21 Apr 2004 09:52:24 -0000 Received: from unknown (HELO mail.zend.com) (192.117.235.230) by pb1.pair.com with SMTP; 21 Apr 2004 09:52:24 -0000 Received: (qmail 3327 invoked from network); 21 Apr 2004 09:52:23 -0000 Received: from localhost (HELO AndiNotebook.zend.com) (127.0.0.1) by localhost with SMTP; 21 Apr 2004 09:52:23 -0000 Message-ID: <5.1.0.14.2.20040421125140.01fdecb8@127.0.0.1> X-Sender: andi@127.0.0.1 X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Wed, 21 Apr 2004 12:52:21 +0300 To: "Wez Furlong" , In-Reply-To: <010c01c4271b$dd512760$8a02a8c0@tron> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: [PHP-DEV] limit for mmaping for readfile (Bug #19749) From: andi@zend.com (Andi Gutmans) References: <010c01c4271b$dd512760$8a02a8c0@tron> Wez, I have played with mmap() in the past. I found that mapping in relatively small blocks such as 1MB does not really hurt performance. I suggest not to add yet another INI option but to do it with smaller blocks. I think even 256KB wouldn't make a big difference. Andi At 10:10 PM 4/20/2004 +0100, Wez Furlong wrote: >http://bugs.php.net/bug.php?id=19749 > >It's been playing on my mind recently that this bug >hasn't been addressed; the problem was how to guess >precisely what limit to set for mmaping when doing >something like readfile(). >[note that some comments are missing from the bugdb >for that bug] > >Well, we can solve the problem by allowing the >sysadmin to decide, as you can see in my patch >against PHP 5: > >http://www.php.net/~wez/mmap-limit.diff > >The default limit is 8MB. If the limit is set to 0, >no limit is applied. > >This is separate from memory_limit, so PHP could >potentially use double the default memory amount for a >short period of time. This is still better than allowing >it to eat all the RAM when someone decides to readfile() >large media files for example. > >--Wez. > >-- >PHP Internals - PHP Runtime Development Mailing List >To unsubscribe, visit: http://www.php.net/unsub.php