Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 28EEE632A07 for ; Tue, 30 Mar 2010 03:18:55 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 33810-07 for ; Tue, 30 Mar 2010 06:18:41 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from glacier.frostconsultingllc.com (glacier.frostconsultingllc.com [69.36.227.170]) by mail.postgresql.org (Postfix) with ESMTP id 49F7F6329B6 for ; Tue, 30 Mar 2010 03:18:44 -0300 (ADT) Received: from adsl-63-195-55-98.dsl.snfc21.pacbell.net ([63.195.55.98] helo=Sidney-Stratton.local) by glacier.frostconsultingllc.com with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.69) (envelope-from ) id 1NwUmd-0005ne-Gx; Mon, 29 Mar 2010 23:18:41 -0700 Message-ID: <4BB197B3.3050306@agliodbs.com> Date: Mon, 29 Mar 2010 23:18:27 -0700 From: Josh Berkus User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b3pre) Gecko/20090223 Thunderbird/3.0b2 MIME-Version: 1.0 To: Richard Yen CC: pgsql-performance@postgresql.org Subject: Re: why does swap not recover? References: <04C98397-261D-4A50-99CB-61FA3E4A974B@richyen.com> In-Reply-To: <04C98397-261D-4A50-99CB-61FA3E4A974B@richyen.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.271 tagged_above=-10 required=5 tests=AWL=0.328, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201003/380 X-Sequence-Number: 38205 On 3/26/10 4:57 PM, Richard Yen wrote: > I'm planning on lowering the shared_buffers to a more sane value, like 25GB (pgtune recommends this for a Mixed-purpose machine) or less (pgtune recommends 14GB for an OLTP machine). However, before I do this (and possibly resolve the issue), I was hoping to see if anyone would have an explanation for the constant reading from swap, but never writing back. Postgres does not control how swap is used. This would be an operating system issue. Leaving aside the distict possibility of a bug in handling swap (nobody seems to do it well), there's the distinct possibility that you're actually pinning more memory on the system than it has (through various processes) and it's wisely shifted some read-only files to the swap (as opposed to read-write ones). But that's a fairly handwavy guess. -- -- Josh Berkus PostgreSQL Experts Inc. http://www.pgexperts.com