X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 1F23BD1B4E1 for ; Thu, 9 Oct 2003 10:13:46 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 88159-02 for ; Thu, 9 Oct 2003 07:12:58 -0300 (ADT) Received: from anchor-post-33.mail.demon.net (anchor-post-33.mail.demon.net [194.217.242.91]) by svr1.postgresql.org (Postfix) with ESMTP id AB831D1B506 for ; Thu, 9 Oct 2003 07:12:55 -0300 (ADT) Received: from tmsl-adsl.demon.co.uk ([80.177.114.181] helo=bacon.tmsl.demon.co.uk) by anchor-post-33.mail.demon.net with esmtp (Exim 3.35 #1) id 1A7Xmz-000P42-0X for pgsql-performance@postgresql.org; Thu, 09 Oct 2003 11:12:57 +0100 Date: Thu, 9 Oct 2003 11:12:55 +0100 From: Paul Thomas To: "pgsql-performance @ postgresql . org" Subject: Re: go for a script! / ex: PostgreSQL vs. MySQL Message-ID: <20031009111255.A17336@bacon> References: Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=ISO-8859-1 In-Reply-To: ; from oliver.scheit@REALGARANT.DE on Thu, Oct 09, 2003 at 09:29:52 +0100 X-Mailer: Balsa 1.2.3 Lines: 41 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/262 X-Sequence-Number: 4010 On 09/10/2003 09:29 Oliver Scheit wrote: > Hi guys, > > I followed the discussion and here are my 0.2$: > > I think instead of thinking about where to put the > information about tuning, someone should provide a > "pgsql-autotune". Maybe even a shell script would do the > trick. > > It's not so hard to find out, how much memory is installed, > and IMHO SHARED_BUFFERS, SORT_MEM and EFFECTIVE_CACHE_SIZE > depend heavily on this. a "cat /proc/sys/kernel/shmmax" > would give some valuable information on linux boxes, > there is probably other stuff for different OSes. > > random_page_cost could be set after probing the harddisks, > maybe even do a hdparm -tT if they seem to be ATA, not SCSI. > > Now, let's pretend the script finds out there is 1 GB RAM, > it could ask something like "Do you want to optimize the > settings for postgres (other applications may suffer from > having not enough RAM) or do you want to use moderate > settings?" > > Something like this, you get the idea. ISR reading that 7.4 will use a default of shared_beffers = 1000 if the machine can support it (most can). This alone should make a big difference in out-of-the-box performance. -- Paul Thomas +------------------------------+---------------------------------------------+ | Thomas Micro Systems Limited | Software Solutions for the Smaller Business | | Computer Consultants | http://www.thomas-micro-systems-ltd.co.uk | +------------------------------+---------------------------------------------+