Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id C4E429FB21F for ; Thu, 19 Oct 2006 14:10:36 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 97580-05 for ; Thu, 19 Oct 2006 14:10:28 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from lynet.oppetid.no (oppetid.no [80.65.51.2]) by postgresql.org (Postfix) with ESMTP id E13D49FA5D8 for ; Thu, 19 Oct 2006 14:10:27 -0300 (ADT) Received: by lynet.oppetid.no (Postfix, from userid 1019) id EB0E811AFA9; Thu, 19 Oct 2006 19:10:23 +0200 (CEST) Date: Thu, 19 Oct 2006 19:10:23 +0200 From: Tobias Brox To: "Jim C. Nasby" Cc: Tobias Brox , pgsql-performance@postgresql.org Subject: Re: Swappiness setting on a linux pg server Message-ID: <20061019171023.GA29574@oppetid.no> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Organization: Group Nordicbet User-Agent: Mutt/1.5.9i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.174 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200610/412 X-Sequence-Number: 21541 [Jim C. Nasby - Thu at 12:00:39PM -0500] > What's reasonable for work_mem depends on your workload. If you've got > some reporting queries that you know aren't run very concurrently they > might benefit from large values of work_mem. For stats.distributed.net, > I set work_mem to something like 2MB in the config file, but the nightly > batch routines manually set it up to 256M or more, because I know that > those only run one at a time, and having that extra memory means a lot > of stuff that would otherwise have to spill to disk now stays in memory. That sounds like a good idea; indeed we do have some few heavy reporting queries and they are not run much concurrently (the application checks the pg_stat_activity table and will disallow reports to be taken out if there is too much activity there). We probably would benefit from raising the work mem just for those reports, and lower it for the rest of the connections.