Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 4B89264FC8B for ; Thu, 27 Nov 2008 06:04:55 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 17216-07 for ; Thu, 27 Nov 2008 06:04:52 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.172]) by mail.postgresql.org (Postfix) with ESMTP id 3A93F64FC08 for ; Thu, 27 Nov 2008 06:04:52 -0400 (AST) Received: by wf-out-1314.google.com with SMTP id 25so883430wfc.28 for ; Thu, 27 Nov 2008 02:04:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=9TC427JRYND3HSvQt/jt+p/bZexV4BG4GdP3iZf+4XQ=; b=dlzO69jME89lMqhWopN0c0L7gCHYoDi6pQ9qYea+SdJ7KEdzB89VD+qT+UkkOVnxdU nUz1ksz6+hDuwH1cbHiwmpd+B63X3kwzpsNRlVzpGK62v7iNF1kxPX+edgOFH0dJhpBt WjvBTZ0rs0cMb7WyAqawPz747NLyB/PR57Gag= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=oGkwvT34EKd/n0icQSvywNkWpXTVPibwwdU0bHElEz2qCoxx4E0s0VG9B7SVaIUHYI UGm/LrUk9C5WNDmE5iQkn09LRmWdVOEEJvnozsjM3fms5kJBwgRK1U0RnFkdJ2elV35h 5KIdqM0l5Ct6S/XtTqZ5bqAVWm09OVv7EHysY= Received: by 10.142.161.13 with SMTP id j13mr2935265wfe.56.1227780290791; Thu, 27 Nov 2008 02:04:50 -0800 (PST) Received: by 10.142.174.9 with HTTP; Thu, 27 Nov 2008 02:04:50 -0800 (PST) Message-ID: Date: Thu, 27 Nov 2008 12:04:50 +0200 From: "Marko Kreen" To: Fabricio Subject: Re: NUMA architecture and PostgreSQL Cc: pgsql-admin@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <3a0028490811260543x74d02719w775a457999cfc74@mail.gmail.com> <492D5C87.5090505@usit.uio.no> <3a0028490811260700w6e8d9d86o24effbe0bea2bddb@mail.gmail.com> <3a0028490811260921l5d6aac06v54dca32aae672b97@mail.gmail.com> <492DA95D.3010303@zeut.net> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200811/161 X-Sequence-Number: 30815 On 11/27/08, Fabricio wrote: > I have an IBM server with NUMA architecture, two nodes with 4 CPU quad core and 64 GB of RAM each, and PostgrSQL 8.3.5. > > Is there any way to avoid the performance degradation when the load goes up and used the two nodes? > > I understand this performance degradation is due to the higher latency than a cpu access a remote memory that the local memory. But there are ways to improve this? > > http://archives.postgresql.org/pgsql-general/2005-04/msg01187.php You can use sched_setaffinity to select group of cpu-s for a process and it's childs: http://www.kernel.org/doc/man-pages/online/pages/man2/sched_setaffinity.2.html There is a bit higher level concept of cpusets too: http://www.kernel.org/doc/man-pages/online/pages/man7/cpuset.7.html In both cases, you can either patch Postgres or write a launcher that configures CPUs before executing postgres. -- marko