Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 92223 invoked from network); 21 Sep 2006 09:37:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Sep 2006 09:37:52 -0000 Received: (qmail 54472 invoked by uid 500); 21 Sep 2006 09:37:45 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 54412 invoked by uid 500); 21 Sep 2006 09:37:45 -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 54401 invoked by uid 99); 21 Sep 2006 09:37:45 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Sep 2006 02:37:45 -0700 Authentication-Results: idunn.apache.osuosl.org smtp.mail=nikke@acc.umu.se; spf=permerror X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=SUBJ_HAS_SPACES Received-SPF: error (idunn.apache.osuosl.org: domain acc.umu.se from 130.239.18.156 cause and error) Received: from [130.239.18.156] ([130.239.18.156:46366] helo=mail.acc.umu.se) by idunn.apache.osuosl.org (ecelerity 2.1.1.8 r(12930)) with ESMTP id 36/16-04092-46D52154 for ; Thu, 21 Sep 2006 02:37:43 -0700 Received: from localhost (localhost [127.0.0.1]) by amavisd-new (Postfix) with ESMTP id 48EF54C for ; Thu, 21 Sep 2006 11:37:33 +0200 (MEST) Received: by mail.acc.umu.se (Postfix, from userid 12143) id 63D8D50; Thu, 21 Sep 2006 11:37:32 +0200 (MEST) Received: from localhost (localhost [127.0.0.1]) by mail.acc.umu.se (Postfix) with ESMTP id 5C6A34C for ; Thu, 21 Sep 2006 11:37:32 +0200 (MEST) Date: Thu, 21 Sep 2006 11:37:32 +0200 (MEST) From: Niklas Edmundsson To: dev@httpd.apache.org Subject: Re: mod_cache responsibilities vs mod_xxx_cache provider responsibilities In-Reply-To: <16655.196.8.104.37.1158831011.squirrel@www.sharp.fm> Message-ID: References: <45085C32.7070603@beamartyr.net> <0A36A991-68A8-4F16-A876-07FA6BD18D16@haxent.com.br> <450AEB58.6050604@turner.com> <450DB44A.2070408@sharp.fm> <45114330.5060000@beamartyr.net> <45115DF4.5030706@turner.com> <22319.196.8.104.37.1158767539.squirrel@www.sharp.fm> <4511881A.7030102@beamartyr.net> <45119B6D.7050404@apache.org> <16655.196.8.104.37.1158831011.squirrel@www.sharp.fm> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: amavisd-new at acc.umu.se X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On Thu, 21 Sep 2006, Graham Leggett wrote: > Hmmm - this affects the case where another process/thread is delivering > from a still-being-cached entity. > > If the lead thread decides to stop, and other threads are following, the > other following threads will deliver CacheMaxFileSize data, and cut the > request short. > > One workaround for this problem is to have following threads ignore the > cached entity if the entity does not have a content length - something the > entity will have when caching is complete. > > This means the backend server will still see a spike of traffic while the > object is being cached, but the cache will no try and cache multiple > entities until the first one wins, which happens now. Our patch solves this by pausing read-threads while the object is being cached until there is a known length of the body, with a timeout to detect if the caching thread has died. Drawback is that you have to write the header twice, but that's cheap compared to caching an object N times. Seems to do the trick, but it haven't had nearly as much pounding as the cache-from-file case (the main use is on a ftp server, remember). /Nikke - currently working on getting a machine up for testing the smaller patches before submitting them. -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Niklas Edmundsson, Admin @ {acc,hpc2n}.umu.se | nikke@acc.umu.se --------------------------------------------------------------------------- The dog ate my .REP packet. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=