Re: [PHP-DEV] limit for mmaping for readfile (Bug #19749)

2004-04-21 Thread Andi Gutmans
It's not a big deal, but I don't see why we should add a configure option if it's something which we'll remove the minute Wez has some more spare time and improves the implementation. At 01:40 AM 4/22/2004 +0200, Marcus Boerger wrote: Hello Andi, i still cannot say any reason against a configur

Re: [PHP-DEV] limit for mmaping for readfile (Bug #19749)

2004-04-21 Thread Marcus Boerger
Hello Andi, i still cannot say any reason against a configure option here? marcus Wednesday, April 21, 2004, 1:42:00 PM, you wrote: > For now make it like 4MB. When you fix it to mmap() parts of the file I'd > use 256 or 512KB. > Andi > At 12:38 PM 4/21/2004 +0100, Wez Furlong wrote: >>Whic

Re: [PHP-DEV] limit for mmaping for readfile (Bug #19749)

2004-04-21 Thread Andi Gutmans
At 08:46 AM 4/21/2004 -0400, Ilia Alshanetsky wrote: On April 21, 2004 05:52 am, Andi Gutmans wrote: > 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 wi

Re: [PHP-DEV] limit for mmaping for readfile (Bug #19749)

2004-04-21 Thread Ilia Alshanetsky
On April 21, 2004 05:52 am, Andi Gutmans wrote: > 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

Re: [PHP-DEV] limit for mmaping for readfile (Bug #19749)

2004-04-21 Thread Wez Furlong
1MB it is. --Wez. - Original Message - From: "Andi Gutmans" <[EMAIL PROTECTED]> To: "Derick Rethans" <[EMAIL PROTECTED]> Cc: "Wez Furlong" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, April 21, 2004 12:51 PM Subject: Re

Re: [PHP-DEV] limit for mmaping for readfile (Bug #19749)

2004-04-21 Thread Andi Gutmans
At 01:49 PM 4/21/2004 +0200, Derick Rethans wrote: On Wed, 21 Apr 2004, Andi Gutmans wrote: > >My patch is "nice" at this stage in the release because it is a > >minimal change that can't hurt anything; tweaking the passthru > >code is a bit more worrying :/ > > In that case, I'd put a hardcoded l

Re: [PHP-DEV] limit for mmaping for readfile (Bug #19749)

2004-04-21 Thread Derick Rethans
On Wed, 21 Apr 2004, Andi Gutmans wrote: > >My patch is "nice" at this stage in the release because it is a > >minimal change that can't hurt anything; tweaking the passthru > >code is a bit more worrying :/ > > In that case, I'd put a hardcoded limit after which you fallback to > non-mmap()'ed re

Re: [PHP-DEV] limit for mmaping for readfile (Bug #19749)

2004-04-21 Thread Andi Gutmans
For now make it like 4MB. When you fix it to mmap() parts of the file I'd use 256 or 512KB. Andi At 12:38 PM 4/21/2004 +0100, Wez Furlong wrote: Which brings us back to the original problem ;) How big should the limit be? --Wez. > In that case, I'd put a hardcoded limit after which you fallback

Re: [PHP-DEV] limit for mmaping for readfile (Bug #19749)

2004-04-21 Thread Wez Furlong
Which brings us back to the original problem ;) How big should the limit be? --Wez. > In that case, I'd put a hardcoded limit after which you fallback to > non-mmap()'ed reading and not add an INI option. Then you can add the > tweaked code when you have time/energy. > Andi -- PHP Internals -

Re: [PHP-DEV] limit for mmaping for readfile (Bug #19749)

2004-04-21 Thread Andi Gutmans
At 12:10 PM 4/21/2004 +0100, Wez Furlong wrote: Andi, Do you think mmap'ing a series of smaller chunks is going to be faster than mmap'ing the whole file, or faster than reading chunks conventionally? (just asking; I've not done any tests) I'm saying that mmap'ing chunks which are relatively big s

Re: [PHP-DEV] limit for mmaping for readfile (Bug #19749)

2004-04-21 Thread Wez Furlong
;t hurt anything; tweaking the passthru code is a bit more worrying :/ --Wez. - Original Message - From: "Andi Gutmans" <[EMAIL PROTECTED]> To: "Wez Furlong" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, April 21, 2004 10:52 AM Subject: Re: [PHP-

Re: [PHP-DEV] limit for mmaping for readfile (Bug #19749)

2004-04-21 Thread Andi Gutmans
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

[PHP-DEV] limit for mmaping for readfile (Bug #19749)

2004-04-20 Thread Wez Furlong
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