Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 5C2812E0091 for ; Thu, 21 Feb 2008 01:13:56 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 14416-04 for ; Thu, 21 Feb 2008 01:13:52 -0400 (AST) Received: from hs-out-0708.google.com (hs-out-0708.google.com [64.233.178.244]) by postgresql.org (Postfix) with ESMTP id 94F012E008C for ; Thu, 21 Feb 2008 01:13:52 -0400 (AST) Received: by hs-out-0708.google.com with SMTP id k27so2468969hsc.3 for ; Wed, 20 Feb 2008 21:13:52 -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:mime-version:content-type:content-transfer-encoding:content-disposition; bh=agv+LBnAqChcSzg807RBBEMVBjoa6uICayYgF2zQCjg=; b=TVcGhcZnE93m3zCVEOB+/ivsYy3G07PG/xCbKe4iEwpSHPnEHvH139dcfmIGc1IsN22Cd1vmI4NNISWICuYVHvesiTpDPluC4Mbceyl9IuPX/iEIvHgjWTcIVVogdOHUHDZ2ULoCrLzRcUc4VqUMDgw0p7jFt4N4S+K51nd42Cw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=r/8J0gSIlPsU/telJaCPft60bNElA1Y+TY1XEInsPEHc1uzcwmdReyIJmPWxuoYXkLSO3/6MQ5I0mDUezFuScgn4o4tA5YAwkezNzbcYzhqoTKWDVuV4lKFaU6eWnVv5gSxbiCvosaMO3PJW5FYRz9cVLtnVRm4AHXZjGJJI6ZE= Received: by 10.142.101.17 with SMTP id y17mr7269326wfb.20.1203570830880; Wed, 20 Feb 2008 21:13:50 -0800 (PST) Received: by 10.142.143.9 with HTTP; Wed, 20 Feb 2008 21:13:50 -0800 (PST) Message-ID: <3c7b84c00802202113x3a705e34u9d9cf307fdde8048@mail.gmail.com> Date: Thu, 21 Feb 2008 14:13:50 +0900 From: "bh yuan" To: pgsql-performance@postgresql.org Subject: Question about shared_buffers and cpu usage MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/259 X-Sequence-Number: 28801 Hi I am using Postgres8.3 on 8G memory , Xeon X5355 Quad Core x 2 processer RH5 machine with 10G data. (with some table which have about 2,000,000~ 5,000,000 rows ) I have two quesion. 1. how to set the shared_buffers and other postgresql.conf parameter for best performance? I only run the Postgres8.3 on the machine so I set the shared_buffers = 7168MB (7G) But somebody said it is too big, so confused. The memory info is that ----------------------------------------------------- MemTotal: 8177484 kB MemFree: 313336 kB Buffers: 112700 kB Cached: 7008160 kB SwapCached: 210832 kB Active: 7303660 kB Inactive: 402088 kB HighTotal: 0 kB HighFree: 0 kB LowTotal: 8177484 kB LowFree: 313336 kB SwapTotal: 8385920 kB SwapFree: 7415768 kB Dirty: 908 kB Writeback: 0 kB AnonPages: 28312 kB Mapped: 2163912 kB Slab: 99396 kB PageTables: 13004 kB NFS_Unstable: 0 kB Bounce: 0 kB CommitLimit: 12474660 kB Committed_AS: 8169440 kB VmallocTotal: 34359738367 kB VmallocUsed: 267136 kB VmallocChunk: 34359470587 kB HugePages_Total: 0 HugePages_Free: 0 HugePages_Rsvd: 0 Hugepagesize: 2048 kB ----------------------------------------------- 2 I have 8 core cpu ,but It seems that one sql can only use 1 core. Can I use more core to execute one sql to optimize the speed ? Thanks