Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 9290E9F9316 for ; Mon, 22 Oct 2007 14:15:33 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 43173-08 for ; Mon, 22 Oct 2007 14:15:24 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from rv-out-0910.google.com (rv-out-0910.google.com [209.85.198.190]) by postgresql.org (Postfix) with ESMTP id 618069F94D7 for ; Mon, 22 Oct 2007 14:15:24 -0300 (ADT) Received: by rv-out-0910.google.com with SMTP id l15so1087490rvb for ; Mon, 22 Oct 2007 10:15:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; 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=Vgxie5e2ViO6iXHpWcXH99txqScbmOl54JP3FwsIfbo=; b=MSiEY0HrybkYLMm9zz2dJxXUQIeaY3pomVcYNU8SToPm1AlquFkl+IQWybinmZZEvwzObt+NG63WGNY3jcxKBg8mNpI9S5C7wfWCB4M5Cg72U7M/Vw+mf7DzjLVfVEGKLDqO2wOnI09NF2THibJMMrCfj5nJzvK1qn1fttodUao= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=pVVAdQxlgY5DXkJ3aXnL+IlKeSEo9LTWvKo0p6SviNwWiVfsMaurPhTE1fOJ1G3mC0StyJLpZ8/6D2o/+4PnpXJQPoHJZmWYf/Luab1FasQlwJDXLxo/qyPZNf0+7kUyCuS0tQuGD77xlJsUgDZ4pbpcip3uBmiPIdMdIrCoQto= Received: by 10.141.99.4 with SMTP id b4mr2456042rvm.1193073322206; Mon, 22 Oct 2007 10:15:22 -0700 (PDT) Received: by 10.140.173.19 with HTTP; Mon, 22 Oct 2007 10:15:22 -0700 (PDT) Message-ID: <4544e0330710221015v3e723b76kd490bca99d252b9e@mail.gmail.com> Date: Mon, 22 Oct 2007 12:15:22 -0500 From: "Peter Koczan" To: "Lee Keel" Subject: Re: Memory Settings.... Cc: pgsql-performance@postgresql.org In-Reply-To: <76758090F8686C47A44B6FF52514A1D30904E0B5@hermes.uai.int> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <76758090F8686C47A44B6FF52514A1D30904E0B5@hermes.uai.int> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/241 X-Sequence-Number: 27263 I recently tweaked some configs for performance, so I'll let you in on what I changed. For memory usage, you'll want to look at shared_buffers, work_mem, and maintenance_work_mem. Postgres defaults to very low values of this, and to get good performance and not a lot of disk paging, you'll want to raise those values (you will need to restart the server and possibly tweak some memory config for lots of shared_buffers, I had to raise SHMMAX on Linux, but I don't know the Windows analogue). The basic rule of thumb for shared_buffers is 25%-50% of main memory, enough to use main memory but leaving some to allow work_mem to do its thing and allow any other programs to run smoothly. Tweak this as necessary. The other big thing is the free space map, which tracks free space and helps to prevent index bloat. A VACUUM VERBOSE in a database will tell you what these values should be set to. Go here for full details: http://www.postgresql.org/docs/8.2/static/runtime-config.html, especially http://www.postgresql.org/docs/8.2/static/runtime-config-resource.html Peter On 10/22/07, Lee Keel wrote: > > > > I have a client server that is dedicated to being a Postgres 8.2.4 database > server for many websites. This server will contain approximately 15 > databases each containing between 40-100 tables. Each database will have > approximately 7 web applications pulling data from it, but there will > probably be no more than 50 simultaneous requests. The majority of the > tables will be very small tables around 1K in total size. However, most of > the queries will be going to the other 10-15 tables that are in each > database that will contain postgis shapes. These tables will range in size > from 50 to 730K rows and each row will range in size from a 2K to 3MB. The > data will be truncated and reinserted as part of a nightly process but other > than that, there won't be many writes during the day. I am trying to tune > this server to its maximum capacity. I would appreciate any advice on any > of the settings that I should look at. I have not changed any of the > settings before because I have never really needed to. And even now, I have > not experienced any bad performance, I am simply trying to turn the track > before the train gets here. > > Server Specification: > > Windows 2003 Enterprise R2 > > Dual-Quad Core 2.33GHz > > 8GB RAM > > 263 GB HD (I am not 100% on drive speed, but I think it is 15K) > > > Thanks in advance, > > Lee Keel > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual or entity to whom they are addressed. > If you have received this email in error please notify the sender. This > message contains confidential information and is intended only for the > individual named. If you are not the named addressee you should not > disseminate, distribute or copy this e-mail.