Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id B9A7737C0FD for ; Mon, 6 Oct 2008 10:42:45 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 81213-06 for ; Mon, 6 Oct 2008 10:42:40 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.238]) by postgresql.org (Postfix) with ESMTP id 9E9AB37C0C7 for ; Mon, 6 Oct 2008 10:42:40 -0300 (ADT) Received: by rv-out-0506.google.com with SMTP id b25so2826559rvf.43 for ; Mon, 06 Oct 2008 06:42:36 -0700 (PDT) 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=BjYT3kUKb1esstb4Y9GjW46Y+jpSp5TRvA1MjyqzyZ4=; b=BcV1mmo2DbKv/dMFphLi6Y5/S35wtpo/Ap7Cdg0jq6RArX6VltoDkSnYjN1y9qAxRF toPN9Dmcen+zT8WbukoT7jBJFFVrG/K5LnoTDFrMgiY2vE97/igfWlBiaChjdsCEAdep sS5UXQNjWRdPfREpRF2ENChGkAb9Ex5VBUPDY= 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=frc0/x+nVHt1ns4sx1rxtRaAvbOB267rWqdaLeq9thB9m+tVHj0MpLwhZPcMVPBwPx jS+mortwV+FMN9LHcdBNJOE0+PnEcVIkz5mGpTjTk2QKrg6kEn2J7EeRT1GunWZCUfJj ARTwfWvmZ4RStQBXSDv9hudgezlou4u0ygHeM= Received: by 10.140.191.14 with SMTP id o14mr2845081rvf.130.1223300556812; Mon, 06 Oct 2008 06:42:36 -0700 (PDT) Received: by 10.140.248.12 with HTTP; Mon, 6 Oct 2008 06:42:36 -0700 (PDT) Message-ID: Date: Mon, 6 Oct 2008 07:42:36 -0600 From: "Scott Marlowe" To: "Rafael Domiciano" Subject: Re: Shared_buffers hint Cc: "pgsql-admin@postgresql.org" In-Reply-To: <3a0028490810060452m268d0777uc18e2e605ff0bd28@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <3a0028490810060452m268d0777uc18e2e605ff0bd28@mail.gmail.com> 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: 200810/21 X-Sequence-Number: 30477 On Mon, Oct 6, 2008 at 5:52 AM, Rafael Domiciano wrote: > HI people, > I'm tuning a server that is a long time abandoned, and this server is a > little slow. What version pgsql is it running? If it's 7.4 or before, you should look at upgrading it. If you can't then a shared buffer setting in the 1000 to 10000 range is generally reasonable, but large shared_buffer settings (i.e. over 10000) are counterproductive for 7.4 and before. > Now, in my postgresql.conf I have: > shared_buffers = 100Mb So it's a pretty modern version, since old ones can't read 100Mb as a setting. > mas_fsm_relations = 15000 > mas_fsm_pages = 1600000 > max_connections = 300 > And I changin' to: > shared_buffers = 1000Mb > (The server has 2 Gb of memory) 50% is kind of big. Generally you either want it small enough that the OS can do the majority of the caching (it's usually better at caching large amounts of data) or large enough that the kernel cache doesn't come into play much. 50% means that everything is buffered exactly twice. > mas_fsm_relations = 15000 > (The Vacuum noticed me 608 relations) > mas_fsm_pages = 1600000 > (The Vacuum noticed me 500800 pages) > max_connections = 300 > (I did a "ps axf | grep postgres | wc -l" and the bash brings to me the > number of 120 and all the people is not online at now) > My qustion is about shared_buffers, in postgresql.conf I have: min 128kB or > max_connections*16kB # (change requires restart) > So I did: > 300 * (16Kb / 1024) = 4,69? > What this result means? That's just the minimum the server needs to operate. Not operate well, just operate.