X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 4B923D1B97B for ; Thu, 26 Feb 2004 23:42:53 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 48164-03 for ; Thu, 26 Feb 2004 19:42:47 -0400 (AST) Received: from rlx13.zapatec.com (66-117-144-213.zapatec.lmi.net [66.117.144.213]) by svr1.postgresql.org (Postfix) with ESMTP id 94949D1B860 for ; Thu, 26 Feb 2004 19:42:44 -0400 (AST) Received: from rlx11.zapatec.com (rlx11.pr.zapatec.com [192.168.1.132]) by rlx13.zapatec.com (Postfix) with ESMTP id 51E71A941 for ; Thu, 26 Feb 2004 15:42:47 -0800 (PST) Received: (from dror@localhost) by rlx11.zapatec.com (8.12.3/8.12.3/Submit) id i1QNgkpT081720 for pgsql-performance@postgresql.org; Thu, 26 Feb 2004 15:42:46 -0800 (PST) (envelope-from dror) Date: Thu, 26 Feb 2004 15:42:46 -0800 From: Dror Matalon To: pgsql-performance@postgresql.org Subject: Re: FreeBSD config Message-ID: <20040226234246.GN26787@rlx11.zapatec.com> References: <20040226180345.GU26787@rlx11.zapatec.com> <20040226191616.GA26787@rlx11.zapatec.com> <20040226230606.GG49146@smtp.k12us.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040226230606.GG49146@smtp.k12us.com> X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/310 X-Sequence-Number: 5834 On Thu, Feb 26, 2004 at 06:06:06PM -0500, Christopher Weimann wrote: > On 02/26/2004-11:16AM, Dror Matalon wrote: > > > > > > effective_cache_size changes no cache settings for postgresql, it simply > > > acts as a hint to the planner on about how much of the dataset your OS / > > > Kernel / Disk cache can hold. > > > > I understand that. The question is why have the OS, in this case FreeBsd > > use only 200 Megs for disk cache and not more. Why not double the > > vfs.hibufspace to 418119680 and double the effective_cache_size to 51040. > > > > FreeBSD uses ALL ram that isn't being used for something else as > its disk cache. The "effective_cache_size" in the PostGreSQL config > has no effect on how the OS chooses to use memory, it is just hint > to the PostGreSQL planner so it can guess the the likelyhood of > what it is looking for being in the cache. Let me try and say it again. I know that setting effective_cache_size doesn't affect the OS' cache. I know it just gives Postgres the *idea* of how much cache the OS is using. I know that. I also know that a correct hint helps performance. I've read Matt Dillon's discussion about the freebsd VM at http://www.daemonnews.org/200001/freebsd_vm.html and I didn't see him saying that Freebsd uses all the free RAM for disk cache. Would you care to provide a URL pointing to that? Assuming you are correct, why has the ongoing recommendation been to use hibufspace/8192 as the effective_cache_size? Seems like it would be quite a bit more on machines with lots of RAM. Regards, Dror -- Dror Matalon Zapatec Inc 1700 MLK Way Berkeley, CA 94709 http://www.fastbuzz.com http://www.zapatec.com