httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Bannert <>
Subject Re: Why do we have NONBLOCK bucket reads? (or, "I want poll for buckets")
Date Thu, 07 Mar 2002 14:53:38 GMT
On Wed, Mar 06, 2002 at 11:42:11PM -0800, Greg Stein wrote:
> apr_bucket_read(NONBLOCK)
> if (got_nothing)
>   do_some_work
>   flush_some_buffers
>   apr_bucket_read(BLOCK)
> process_buckets()
> In other words, you could see if you have some work to do. If not, then you
> go off and flush out other stuff that was pending. (that is: take advantage
> of idle time)  Once you're done with the work, then you go ahead and block
> to get more work.

You are correct, and this pattern is used twice only in mod_include.

It seems to me that this pattern would tend to double the amount of
system calls to read, while only being successful with fast clients.
I would have to do some testing, but I suspect that we're not actually
improving data processing/response time but are instead increasing
system time. Just a hunch though...


View raw message