httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Igor Tatarinov <tatar...@prairie.NoDak.edu>
Subject Re: A question on ka requests
Date Wed, 04 Feb 1998 21:14:54 GMT
Yeah, right I wasn't careful in my comments. Each ka requests costs
only sizeof(request_rec)=340 (on my Solaris). Which is probably no
big deal unless you are running a benchmark like I was doing and 
noticing that your httpd processes are getting larger and larger.
Say, 100,000 ka requests increase the size of httpd by 34M.

So if there is a Web site with MaxPerKA=0 and MaxPerChild=100,000
a dozen concurrent ka connections would bring it down. And you don't
need a whole lot of bandwidth to do that, just make one request for a
small file per ka timeout.

Still, why are those 340 bytes lost and why both MaxPerKA and 
MaxPerChild?

igor

Dean Gaudet wrote:
> 
> >From child_main:
> 
>         while ((r = read_request(current_conn)) != NULL) {
> 
>             /* read_request_line has already done a
>              * signal (SIGUSR1, SIG_IGN);
>              */
> 
>             (void) update_child_status(my_child_num, SERVER_BUSY_WRITE, r);
> 
>             process_request(r);
> 
> #if defined(STATUS)
>             increment_counts(my_child_num, r);
> #endif
> 
>             if (!current_conn->keepalive || current_conn->aborted)
>                 break;
> 
>             destroy_pool(r->pool);
>             (void) update_child_status(my_child_num, SERVER_BUSY_KEEPALIVE,
>                                        (request_rec *) NULL);
> 
> i.e. what are you referring to?  It cleans the request pool.  It doesn't
> clean the connection pool until the connection is done.
> 
> If you can show a stock server consuming lots of memory on a keep alive
> connection I wouldn't mind seeing it.
> 
> Dean
> 
> On Wed, 4 Feb 1998, Igor Tatarinov wrote:
> 
> > Hi all,
> >
> > I have a simple question. Why is it that Apache treats requests coming
> > from a keep-alive connection differently from requests from a regular
> > connection?
> >
> > I mean, why doesn't it clean its pools after each ka request like it does
> > after each regular request.
> >
> > Now we have two parameters MaxKeepAliveRequests and MaxRequestsPerChild.
> > As I understand, if MaxKeepAliveRequests is set to 0 (and
> > MaxRequestsPerChild is not very small) it is very easy to make Apache
> > consume a lot of memory (create a bunch of ka connections and request
> > a small file so that you don't need a lot of bandwidth).
> >
> > As for my problem, I want to have some cleanup done after each request
> > (whether it's ka or not doesn't matter). Any way I can do it?
> >
> > or am I missing something?
> > igor
> >

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Igor Tatarinov, graduate student, Computer Science Dept, NDSU
e-mail: tatarino@prairie.nodak.edu   or   itat@acm.org
http://www.cs.ndsu.nodak.edu/~tatarino
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Mime
View raw message