From owner-freebsd-stable@FreeBSD.ORG Wed Dec 26 15:32:31 2007 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82A2716A421 for ; Wed, 26 Dec 2007 15:32:31 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.236]) by mx1.freebsd.org (Postfix) with ESMTP id 4405C13C500 for ; Wed, 26 Dec 2007 15:32:31 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by nz-out-0506.google.com with SMTP id l8so381191nzf.13 for ; Wed, 26 Dec 2007 07:32:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=lnJGbl7Ggo3vqw4ON5W6/w5UjEpcihX0C19BuC9BvCQ=; b=biggXnIshnb7Et9XX29/DRuNljub0EiqxScFUw8SWZJf9aPD9aO6lAthoHkbGzuB64Ev19GMzSThJKwjrDZtWju1nrwt0sel4Rx+5tXg5dgKyT/s8B/baWwGWKzdddsbRGXm/2GVK7mFj7EvCOexAfi8qJhRKR04KFMFOD24vaA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=ZBIeyLuGKKfKLBMfh9aqcIvNI2HFj2VFtvgwUlvPxifsBRIa0pD8+cNeYFOUEm29tQKb70Hh/Cs+yWgGxGSH+RMG6tDHtIY5RJmcc8YlKjhWXxwl5TAxys+Zj1rKd3AtsRpFEWwZBo1QTJasiRVAyTrnHxMGpk+ag9lUfvINvzo= Received: by 10.142.231.7 with SMTP id d7mr1888552wfh.30.1198683150042; Wed, 26 Dec 2007 07:32:30 -0800 (PST) Received: by 10.143.155.13 with HTTP; Wed, 26 Dec 2007 07:32:29 -0800 (PST) Message-ID: Date: Thu, 27 Dec 2007 00:32:29 +0900 From: "Adrian Chadd" Sender: adrian.chadd@gmail.com To: "Brett Glass" In-Reply-To: <200712261512.IAA27697@lariat.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200712220531.WAA09277@lariat.net> <476FBED0.2080400@samsco.org> <200712241549.IAA19650@lariat.net> <476FDA10.4060107@samsco.org> <200712241653.JAA20845@lariat.net> <476FE868.8080704@samsco.org> <200712241756.KAA21950@lariat.net> <4772529D.9010805@samsco.org> <200712261512.IAA27697@lariat.net> X-Google-Sender-Auth: 0826b50361ca3f75 Cc: stable@freebsd.org Subject: Re: SMP on FreeBSD 6.x and 7.0: Worth doing? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Dec 2007 15:32:31 -0000 On 27/12/2007, Brett Glass wrote: > Scott, Adrian: > > Even more interesting would be a storage schema for caches that rests > on top of FreeBSD's GEOM facility. One could bypass all filesystems > but still take advantage of the driver architecture. The biggest bonuses to gain high throughput with web caches, at least with small objects, is to apply temporal locality to them and do IO in $LARGE chunks. You then want to pull tricks with your memory cache so you throw away RAM in cluster-sized chunks - the objects grouped by temporal locality above - because really, if you throw away a 4k page, your costs of performing disk IO to read that 4k versus reading say, 32k or 64k, are pretty freaking similar (the same if you happen to be on the same track, slightly more if you're straddling tracks.) So you also want to pull those tricks. If you have two small objects (<64k) which are 50% likely to be fetched together, then by grouping them into one IO operation you're effectively slicing the seeks needed in half with very little impact. Well, there's an impact - you suddenly start pulling lots more data off disk. Could -that- be done without too much trouble? I've looked at madvise() to pull these tricks with mmap()'ed backing files but, again, I've not hit the point where I'm looking to optimise Squid's disk storage. There's just too much catching up to do to varnish's memory-only workload performance. Damn you phk. :) -- Adrian Chadd - adrian@freebsd.org