Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 0BDEE2E2F89 for ; Wed, 12 Dec 2007 06:45:28 -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 52757-09 for ; Wed, 12 Dec 2007 06:45:25 -0400 (AST) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.245]) by postgresql.org (Postfix) with ESMTP id 2ADE72E2FA5 for ; Wed, 12 Dec 2007 06:45:25 -0400 (AST) Received: by an-out-0708.google.com with SMTP id c36so46055ana.33 for ; Wed, 12 Dec 2007 02:45:24 -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=5xu9vo6wAy0VzH0UoCX4uvuC0FbV5kCtAOtAJSDBG4A=; b=b+tvy6eqvGYg9myKIro6fodyY5GQ8zYYq2Yc9Y/xaGlWONnV5xP3Q37LpWugE0ixhpBKIZVnJww7VaWDJAvFwahPK+m26+sidSi7Dk6pc91gdm6pSBVBiAxINpQlejbnVcjmDVQdIOTW0HfvNCPgoRaiZA/hIKCnTGWROdUKVTo= 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=BTOcchcbKXy76i2WeCOLhhNwB8jW06+PgVBet1QnGWHPURkObyGIFArZL4UMz/SREuAuHV8rhBMwGy9Cys01EZJUuFfZFfGNVn1uNXiavYwySrxKNJ8QJ1CMJRWmiW5LC30StfpECngOpSmzgRubftaFzkxmBGByZa7IgNGba2M= Received: by 10.100.34.16 with SMTP id h16mr1107527anh.114.1197456324161; Wed, 12 Dec 2007 02:45:24 -0800 (PST) Received: by 10.100.242.10 with HTTP; Wed, 12 Dec 2007 02:45:24 -0800 (PST) Message-ID: Date: Wed, 12 Dec 2007 11:45:24 +0100 From: "Claus Guttesen" To: mlunnon@rwa-net.co.uk Subject: Re: Limited performance on multi core server Cc: pgsql-performance@postgresql.org In-Reply-To: <475FB50B.8060701@rwa-net.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <475FB50B.8060701@rwa-net.co.uk> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/163 X-Sequence-Number: 27979 > I have a 4 * dual core 64bit AMD OPTERON server with 16G of RAM, running > postgres 7.4.3. This has been recompiled on the server for 64 stored > procedure parameters, (I assume this makes postgres 64 bit but are not > sure). When the server gets under load from database connections > executing reads, lets say 20 - 40 concurrent reads, the CPU's seem to > limit at about 30-35% usage with no iowait reported. If I run a simple > select at this time it takes 5 seconds, the same query runs in 300 > millis when the server is not under load so it seems that the database > is not performing well even though there is plenty of spare CPU. There > does not appear to be large amounts of disk IO and my database is about > 5.5G so this should fit comfortably in RAM. > > changes to postgresql.sql: > > max_connections = 500 > shared_buffers = 96000 > sort_mem = 10240 > effective_cache_size = 1000000 > > Does anyone have any ideas what my bottle neck might be and what I can > do about it? You might want to lower shared_buffers to a lower value. Mine is set at 32768. Is your db performing complex sort? Remember that this value is per connection. Maby 1024. effective_cache_size should also be lowered to something like 32768. As far as I understand shared_buffers and effective_cache_size have to be altered "in reverse", ie. when lowering one the other can be raised. HTH. -- regards Claus When lenity and cruelty play for a kingdom, the gentlest gamester is the soonest winner. Shakespeare