Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 63824 invoked from network); 26 Mar 2008 15:23:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Mar 2008 15:23:33 -0000 Received: (qmail 89242 invoked by uid 500); 26 Mar 2008 15:23:29 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 88999 invoked by uid 500); 26 Mar 2008 15:23:28 -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 88988 invoked by uid 99); 26 Mar 2008 15:23:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Mar 2008 08:23:28 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of dirkx@webweaving.org designates 209.132.96.45 as permitted sender) Received: from [209.132.96.45] (HELO skutsje.san.webweaving.org) (209.132.96.45) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Mar 2008 15:22:48 +0000 Received: from [10.11.0.121] (5356CA0A.cable.casema.nl [83.86.202.10]) (authenticated bits=0) by skutsje.san.webweaving.org (8.12.9/8.12.9) with ESMTP id m2QFMv2Q041687 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Wed, 26 Mar 2008 07:22:59 -0800 (PST) (envelope-from dirkx@webweaving.org) Message-Id: From: Dirk-Willem van Gulik To: dev@httpd.apache.org In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Subject: Re: mod_disk_cache and atimes Date: Wed, 26 Mar 2008 16:22:56 +0100 References: X-Mailer: Apple Mail (2.919.2) X-Virus-Checked: Checked by ClamAV on apache.org On Mar 26, 2008, at 4:15 PM, Konstantin Chuguev wrote: > Can you please clarify your mentioning the bucket-brigade footprint? > Are they so slow they make memory-based cache no more efficient then > disk-based one? Or the opposite: sendfile() works so well that > serving content from memory is not any faster? > No - they are very fast (in an absolute sense) - and your approach is almost certainly the right one. However all-in-all there is a lot of logic surrounding them; and if you are trying to squeeze out the very last drop (e.g. the 1x1 gif example) - you run into all sorts of artificial limits, specifically on linux and 2x2 core machines; as the memory which needs to be accessed is just a little more scattered than one would prefer and all sort of competition around the IRQ handling in the kernel and so on. Or in other words - in a pure static case where you are serving very small files which rarely if ever change, have no variance to any inbound headers, etc - things are not ideal. But that is a small price to pay - i.e. apache is more of a swiss army knife; which saw's OK, but a proper hacksaw is 'better'. > I'm developing an Apache output filter for highly loaded servers and > proxies that juggles small-size buckets and brigades extensively. > I'm not at the stage yet where I can do performance tests but if I > knew this would definitely impact performance, I would perhaps > switch to fixed-size buffers straight away... I'd bet you are on the right track. However there is -one- small concern; sometimes if you have looooots of buckets and very chunked output - then one gets lots and lots of 1-5 byte chunks; each prefixed by the length byte. And this can get really inefficient. Perhaps we need a de-bucketer to 'dechunk' when outputting chunked. Dw