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 488673A3AD0 for ; Mon, 3 Jan 2005 08:34:18 +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 16371-08 for ; Mon, 3 Jan 2005 08:34:13 +0000 (GMT) Received: from floppy.pyrenet.fr (floppy.pyrenet.fr [194.250.190.2]) by svr1.postgresql.org (Postfix) with ESMTP id 67D273A2DBA for ; Mon, 3 Jan 2005 08:34:11 +0000 (GMT) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id 50DB0313D4; Mon, 3 Jan 2005 09:34:11 +0100 (MET) From: William Yu X-Newsgroups: pgsql.performance Subject: Re: Low Performance for big hospital server .. Date: Mon, 03 Jan 2005 00:32:10 -0800 Organization: Hub.Org Networking Services Lines: 38 Message-ID: References: <1104634472.41d762681b548@webmail.moph.go.th> <20050102140828.GA21826@pobox.com> <1104683293.41d8211d62221@webmail.moph.go.th> <41D827C1.3050707@fastcrypt.com> <1104717243.41d8a5bb9cb9b@webmail.moph.go.th> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@news.hub.org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.3) Gecko/20040910 X-Accept-Language: en-us, en In-Reply-To: <1104717243.41d8a5bb9cb9b@webmail.moph.go.th> To: pgsql-performance@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200501/11 X-Sequence-Number: 9701 amrit@health2.moph.go.th wrote: > I will try to reduce shared buffer to 1536 [1.87 Mb]. 1536 is probaby too low. I've tested a bunch of different settings on my 8GB Opteron server and 10K seems to be the best setting. >>also effective cache is the sum of kernel buffers + shared_buffers so it >>should be bigger than shared buffers. > > also make the effective cache to 2097152 [2 Gb]. > I will give you the result , because tomorrow [4/12/05] will be the official day > of my hospital [which have more than 1700 OPD patient/day]. To figure out your effective cache size, run top and add free+cached. >>Also turning hyperthreading off may help, it is unlikely it is doing any >>good unless you are running a relatively new (2.6.x) kernel. > > Why , could you give me the reason? Pre 2.6, the kernel does not know the difference between logical and physical CPUs. Hence, in a dual processor system with hyperthreading, it actually sees 4 CPUs. And when assigning processes to CPUs, it may assign to 2 logical CPUs in the same physical CPU. > > >>I presume you are vacuuming on a regular basis? > > Yes , vacuumdb daily. Do you vacuum table by table or the entire DB? I find over time, the system tables can get very bloated and cause a lot of slowdowns just due to schema queries/updates. You might want to try a VACUUM FULL ANALYZE just on the system tables.