X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 6BD433A2D7A for ; Tue, 4 Jan 2005 11:13:42 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 56583-07 for ; Tue, 4 Jan 2005 11:13:14 +0000 (GMT) Received: from linuxworld.com.au (unknown [203.34.46.50]) by svr1.postgresql.org (Postfix) with ESMTP id E6F5D3A3CB7 for ; Tue, 4 Jan 2005 11:13:14 +0000 (GMT) Received: from localhost (swm@localhost) by linuxworld.com.au (8.11.6/8.11.4) with ESMTP id j04BDCW08956; Tue, 4 Jan 2005 22:13:12 +1100 Date: Tue, 4 Jan 2005 22:13:12 +1100 (EST) From: Gavin Sherry X-X-Sender: swm@linuxworld.com.au To: amrit@health2.moph.go.th Cc: PGsql-performance Subject: Re: Low Performance for big hospital server .. In-Reply-To: <1104831107.41da6283add0c@webmail.moph.go.th> Message-ID: References: <1104831107.41da6283add0c@webmail.moph.go.th> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200501/38 X-Sequence-Number: 9728 On Tue, 4 Jan 2005 amrit@health2.moph.go.th wrote: > Today is the first official day of this weeks and the system run better in > serveral points but there are still some points that need to be corrected. Some > queries or some tables are very slow. I think the queries inside the programe > need to be rewrite. > Now I put the sort mem to a little bit bigger: > sort mem = 16384 increase the sort mem makes no effect on the slow point > eventhough there is little connnection. > shared_buffers = 27853 > effective cache = 120000 Even though others have said otherwise, I've had good results from setting sort_mem higher -- even if that is per query. > > I will put more ram but someone said RH 9.0 had poor recognition on the Ram > above 4 Gb? I think they were refering to 32 bit architectures, not distributions as such. > Should I close the hyperthreading ? Would it make any differnce between open and > close the hyperthreading? > Thanks for any comment In my experience, the largest performance increases come from intensive analysis and optimisation of queries. Look at the output of EXPLAIN ANALYZE for the queries your application is generating and see if they can be tuned in anyway. More often than not, they can. Feel free to ask for assistence on irc at irc.freenode.net #postgresql. People there help optimise queries all day ;-). > Amrit > Thailand Gavin