Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id AFB9FF64992 for ; Tue, 24 Jul 2012 18:23:17 -0300 (ADT) Received: from out1.ip04ir2.opaltelecom.net ([62.24.128.240]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1StmZX-0003bx-RV for pgsql-performance@postgresql.org; Tue, 24 Jul 2012 21:23:16 +0000 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApMBADIRD1BPS0Sg/2dsb2JhbAANOL0qAQEBAQM4QRALDgoJJQ8CEDYGDQEFAgEBh3oDF6cXijQNiU6KY2iGdAOTdYJoiXaHYw X-IronPort-AV: E=Sophos;i="4.77,648,1336345200"; d="scan'208";a="380023000" Received: from 79-75-68-160.dynamic.dsl.as9105.com (HELO [192.168.6.20]) ([79.75.68.160]) by out1.ip04ir2.opaltelecom.net with ESMTP; 24 Jul 2012 22:23:01 +0100 Message-ID: <500F1239.80104@kickstone.com> Date: Tue, 24 Jul 2012 22:23:05 +0100 From: John Lister User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: Claudio Freire CC: pgsql-performance@postgresql.org Subject: Re: Linux memory zone reclaim References: <500616CB.3070408@2ndQuadrant.com> <500EEB29.3030503@kickstone.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.2 (-) X-Archive-Number: 201207/315 X-Sequence-Number: 47496 On 24/07/2012 21:12, Claudio Freire wrote: > On Tue, Jul 24, 2012 at 3:41 PM, Claudio Freire wrote: >> On Tue, Jul 24, 2012 at 3:36 PM, John Lister wrote: >>> Do you have a suggestion about how to do that? I'm running Ubuntu 12.04 and >>> PG 9.1, I've modified pg_ctlcluster to cause pg_ctl to use a wrapper script >>> which starts the postmaster using a numactl wrapper, but all subsequent >>> client processes are started with interleaving enabled as well. Any ideas >>> how to make just the postmaster process start with interleaving? >> postmaster should call numactl right after forking: >> http://linux.die.net/man/2/set_mempolicy > Something like the attached patch (untested) Cheers, I'll give it a go, I wonder if this is likely to be integrated into the main code? As has been mentioned here before, postgresql isn't as badly affected as mysql for example, but I'm wondering if the trend to larger memory and more cores/nodes means it should be offered as an option? Although saying that I've read that 10Gb of shared buffers may be enough even in big machines 128+Gb ram.. Thoughts? John