Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 80319 invoked from network); 23 Sep 2010 10:05:41 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 23 Sep 2010 10:05:41 -0000 Received: (qmail 58288 invoked by uid 500); 23 Sep 2010 10:05:40 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 56833 invoked by uid 500); 23 Sep 2010 10:05:37 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 55960 invoked by uid 99); 23 Sep 2010 10:05:36 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Sep 2010 10:05:36 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of trawick@gmail.com designates 209.85.215.173 as permitted sender) Received: from [209.85.215.173] (HELO mail-ey0-f173.google.com) (209.85.215.173) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Sep 2010 10:05:12 +0000 Received: by eyf18 with SMTP id 18so712544eyf.18 for ; Thu, 23 Sep 2010 03:04:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=p367thNNfuWDi6FA4EJUNr+hoGRLDHQ2eFteQH/gFj8=; b=PudSFxOPyB+wn6DYCI6CrbFyIYT2L3PXapInkozylrFap5YdBo74Aowt2ArI9GMf1c tDj7sMi2tOQP0KgkH8EETDbwYobOZmx9bo7H4RAOu2Da68C3zoTOHI7oXIFm5ksAKW1U Gw+wV5fYROehBemGxy9nU1wBwJlJFpSOOk0yA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=nJpky2CvKWcws+PLYflH5ZL96F/FMG+5Emxp+rBY0RrsApbajVdvKYU90junbkqUac DmcD8bZBgwfkwypcWP9Wna6M7kg99VYXRWouOWiVF9rPsjNXDPtfjdl3mfF3JWuQg7C9 EI9Bf+t5L2yyBfZc6rvrgOFuBQv7pwBzA3R5A= MIME-Version: 1.0 Received: by 10.213.52.5 with SMTP id f5mr1764847ebg.35.1285236292604; Thu, 23 Sep 2010 03:04:52 -0700 (PDT) Received: by 10.213.17.140 with HTTP; Thu, 23 Sep 2010 03:04:52 -0700 (PDT) In-Reply-To: <4C9AEDB3.2000305@apache.org> References: <20100922183716.8E5A2238890D@eris.apache.org> <4C9AEDB3.2000305@apache.org> Date: Thu, 23 Sep 2010 06:04:52 -0400 Message-ID: Subject: Re: svn commit: r1000130 - /httpd/httpd/trunk/docs/manual/mod/mod_proxy.xml From: Jeff Trawick To: dev@httpd.apache.org Content-Type: multipart/alternative; boundary=00c09f955c94ac64210490ea64bf X-Virus-Checked: Checked by ClamAV on apache.org --00c09f955c94ac64210490ea64bf Content-Type: text/plain; charset=ISO-8859-1 On Thu, Sep 23, 2010 at 2:03 AM, Ruediger Pluem wrote: first, thanks for stepping in! > > > On 09/22/2010 08:59 PM, Jeff Trawick wrote: > > On Wed, Sep 22, 2010 at 2:37 PM, wrote: > > > >> Author: trawick > >> Date: Wed Sep 22 18:37:16 2010 > >> New Revision: 1000130 > >> > >> URL: http://svn.apache.org/viewvc?rev=1000130&view=rev > >> Log: > >> follow up r956069 with additional clarifications > >> about the connection pool and related parameters > >> (yes, and fix part of those earlier "clarifications") > >> > >> Modified: > >> httpd/httpd/trunk/docs/manual/mod/mod_proxy.xml > >> > >> Modified: httpd/httpd/trunk/docs/manual/mod/mod_proxy.xml > >> URL: > >> > http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/mod_proxy.xml?rev=1000130&r1=1000129&r2=1000130&view=diff > >> > >> > ============================================================================== > >> --- httpd/httpd/trunk/docs/manual/mod/mod_proxy.xml (original) > >> +++ httpd/httpd/trunk/docs/manual/mod/mod_proxy.xml Wed Sep 22 18:37:16 > >> 2010 > >> @@ -764,13 +764,12 @@ expressions > >> using key=value parameters, described in the table > >> below.

> >> > >> -

Setting min will determine how many connections to > >> - the backend server will be retained after use. Up to the > >> - Soft Maximum, or smax, number of connections will be > >> - created on demand. Any connections above smax are > >> - subject to a time to live, or ttl. Apache httpd will > >> - never create more than the Hard Maximum or, max, > >> - connections to the backend server.

> >> +

Setting min to non-zero allows connections to the > >> + backend server to be retained after use; > > > > > > That last sentence is wrong, isn't it? (I'm using the > > two-steps-forward/one-step-back approach until I can't go any further. > At > > least you don't have to look at the doc for apr_reslist_create() anymore > ;) > > ) > > > > I honestly don't know what min is used for since we only create > connections > > on demand, unless min=0 means don't retain, and min>0 means retain. > > > > What I want to do as a user today: retain connections but don't use any > if > > they've been idle for >= origin-server-keepalive seconds. > > > > ttl is the only timeout avail, so that has to be set to the origin's > > keepalive timeout > > ttl only applies to connections above smax, so smax needs to be set as > low > > as allowable > > No. ttl is absolute. The resource list hands out no resources that have > been > idle in the resource list for more then ttl. So no need to fiddle with > smax. > I have a hard time believing both that and the apr_reslist_create() doc. ttl is passed only to apr_reslist_create(), which says " * @param ttl If non-zero, sets the maximum amount of time in microseconds a * resource may be available while exceeding the soft limit." That seems to say that I can get resources that have been idle for more than ttl, as long as the soft limit wasn't exceeded. In fact the smax concept only exists for this nuance about ttl handling, right? > min only ensures that you always have at least min idle resources (of > course > only if this does not increase the total number above hmax). > In the proxy case that does not mean that these resources have connections > to the backend. These are only created during their first real use. > Understood, but I think that for proxy the min concept is very obscure because the resource in this case is not the connection but some implementation artifact. Proxy admins think about connections, but min has zero control on the number of connections; it only controls the number of reslist elements, which is interesting in only very rare situations where you care about preallocating the structure and associated pools. Agreed? The proxy doc needs to mention min as little as possible, and from a different standpoint altogether (memory management, not connection management). > So in short: Just set ttl to the keepalive of the backend minus some race > seconds > for packet latency and don't care about the remaining stuff if don't want > to > for other reasons. > That's the best possible scenario for the admin. I'll have to figure out why it isn't working for me. Thanks! --00c09f955c94ac64210490ea64bf Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Thu, Sep 23, 2010 at 2:03 AM, Ruediger Pluem = <rpluem@apache.or= g> wrote:

first, thanks for stepping in!


On 09/22/2010 08:59 PM, Jeff Trawick wrote:
> On Wed, Sep 22, 2010 at 2:37 PM, <trawick@apache.org> wrote:
>
>> Author: trawick
>> Date: Wed Sep 22 18:37:16 2010
>> New Revision: 1000130
>>
>> URL: http://svn.apache.org/viewvc?rev=3D1000130&v= iew=3Drev
>> Log:
>> follow up r956069 with additional clarifications
>> about the connection pool and related parameters
>> (yes, and fix part of those earlier "clarifications") >>
>> Modified:
>> =A0 =A0httpd/httpd/trunk/docs/manual/mod/mod_proxy.xml
>>
>> Modified: httpd/httpd/trunk/docs/manual/mod/mod_proxy.xml
>> URL:
>> http://svn.apache.org/viewvc/httpd/httpd/trun= k/docs/manual/mod/mod_proxy.xml?rev=3D1000130&r1=3D1000129&r2=3D100= 0130&view=3Ddiff
>>
>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D
>> --- httpd/httpd/trunk/docs/manual/mod/mod_proxy.xml (original)
>> +++ httpd/httpd/trunk/docs/manual/mod/mod_proxy.xml Wed Sep 22 18:= 37:16
>> 2010
>> @@ -764,13 +764,12 @@ expressions</description>
>> =A0 =A0 using =A0<code>key=3Dvalue</code> parameters, = described in the table
>> =A0 =A0 below.</p>
>>
>> - =A0 =A0<p>Setting <code>min</code> will determ= ine how many connections to
>> - =A0 =A0the backend server will be retained after use. =A0Up to t= he
>> - =A0 =A0Soft Maximum, or <code>smax</code>, number of= connections will be
>> - =A0 =A0created on demand. =A0Any connections above <code>s= max</code> are
>> - =A0 =A0subject to a time to live, or <code>ttl</code>= ;. =A0Apache httpd will
>> - =A0 =A0never create more than the Hard Maximum or, <code>m= ax</code>,
>> - =A0 =A0connections to the backend server.</p>
>> + =A0 =A0<p>Setting <code>min</code> to non-zero= allows connections to the
>> + =A0 =A0backend server to be retained after use;
>
>
> That last sentence is wrong, isn't it? =A0(I'm using the
> two-steps-forward/one-step-back approach until I can't go any furt= her. =A0At
> least you don't have to look at the doc for apr_reslist_create() a= nymore ;)
> )
>
> I honestly don't know what min is used for since we only create co= nnections
> on demand, unless min=3D0 means don't retain, and min>0 means r= etain.
>
> What I want to do as a user today: retain connections but don't us= e any if
> they've been idle for >=3D origin-server-keepalive seconds.
>
> ttl is the only timeout avail, so that has to be set to the origin'= ;s
> keepalive timeout
> ttl only applies to connections above smax, so smax needs to be set as= low
> as allowable

No. ttl is absolute. The resource list hands out no resources t= hat have been
idle in the resource list for more then ttl. So no need to fiddle with
smax.

I have a hard time believing both= that and the apr_reslist_create() doc. =A0ttl is passed only to apr_reslis= t_create(), which says

"=A0* @param ttl If no= n-zero, sets the maximum amount of time in microseconds a
=A0* =A0 =A0 =A0 =A0 =A0 =A0resource may be available while exceeding = the soft limit."

That seems to say that I can= get resources that have been idle for more than ttl, as long as the soft l= imit wasn't exceeded.

In fact the smax concept only exists for this nuance ab= out ttl handling, right?
=A0
min only ensures that you always have at least min idle resources (of cours= e
only if this does not increase the total number above hmax).
In the proxy case that does not mean that these resources have connections<= br> to the backend. These are only created during their first real use.

Understood, but I think that for proxy the min= concept is very obscure because the resource in this case is not the conne= ction but some implementation artifact. =A0Proxy admins think about connect= ions, but min has zero control on the number of connections; it only contro= ls the number of reslist elements, which is interesting in only very rare s= ituations where you care about preallocating the structure and associated p= ools. =A0Agreed?

The proxy doc needs to mention min as little as possibl= e, and from a different standpoint altogether (memory management, not conne= ction management).



So in short: Just set ttl to the keepalive of the backend minus some race s= econds
for packet latency and don't care about the remaining stuff if don'= t want to
for other reasons.

That's the best = possible scenario for the admin. =A0I'll have to figure out why it isn&= #39;t working for me.

Thanks!

--00c09f955c94ac64210490ea64bf--