httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug MacEachern <>
Subject Re: [patch] major ssl problem
Date Mon, 26 Nov 2001 06:51:39 GMT
On Sat, 24 Nov 2001, Cliff Woolley wrote:
> Actually, that's not exactly true.  If APR_HAS_MMAP, and the file bucket
> is between MMAP_THRESHOLD and MMAP_LIMIT (MMAP_LIMIT is 4MB by default),
> then yes, len will be up to 4MB.  But if the file bucket is bigger than
> 4MB or the system doesn't have MMAP, then len will *never* be bigger than

hmm..putting ssl aside, lets say we have a 10Mb file, looking at
apr_buckets_file.c:file_read() that's ~1200 calls each to:
- malloc for the 8k buffer
- seek() for the current offset
- read() of 8k for the actual buffer

not to mention the APR_BRIGADE_FOREACH loop and whatever else is in
between.  seems that could use some performance tuning of its own?

> I don't know if that affects any of the decisions in the patch (which I
> haven't finished looking at), but it was worth mentioning.

i still suggest the current patch.  even though apr_bucket_read() will
break up a file > 4Mb, the pbioWrite buffer will still be filled to the
length of the file.

View raw message