X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id D1D2B3A4142 for ; Mon, 25 Oct 2004 17:03:37 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 43775-10 for ; Mon, 25 Oct 2004 16:03:32 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 0F9923A4147 for ; Mon, 25 Oct 2004 17:03:31 +0100 (BST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id i9PG3D7t020652; Mon, 25 Oct 2004 12:03:13 -0400 (EDT) To: Jan Wieck Cc: Kenneth Marshall , Simon Riggs , pgsql-patches@postgresql.org, pgsql-hackers@postgresql.org, josh@agliodbs.com Subject: Re: [PATCHES] ARC Memory Usage analysis In-reply-to: <417D1D01.3090401@Yahoo.com> References: <1098471059.20926.49.camel@localhost.localdomain> <41796115.2020501@Yahoo.com> <20041022200955.GC4382@it.is.rice.edu> <417D1D01.3090401@Yahoo.com> Comments: In-reply-to Jan Wieck message dated "Mon, 25 Oct 2004 11:34:25 -0400" Date: Mon, 25 Oct 2004 12:03:12 -0400 Message-ID: <20651.1098720192@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200410/821 X-Sequence-Number: 60324 Jan Wieck writes: > This all only holds water, if the OS is allowed to swap out shared > memory. And that was my initial question, how likely is it to find this > to be true these days? I think it's more likely that not that the OS will consider shared memory to be potentially swappable. On some platforms there is a shmctl call you can make to lock your shmem in memory, but (a) we don't use it and (b) it may well require privileges we haven't got anyway. This has always been one of the arguments against making shared_buffers really large, of course --- if the buffers aren't all heavily used, and the OS decides to swap them to disk, you are worse off than you would have been with a smaller shared_buffers setting. However, I'm still really nervous about the idea of using effective_cache_size to control the ARC algorithm. That number is usually entirely bogus. Right now it is only a second-order influence on certain planner estimates, and I am afraid to rely on it any more heavily than that. regards, tom lane