X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id C06CB9DD725 for ; Fri, 2 Dec 2005 11:16:35 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 53021-05 for ; Fri, 2 Dec 2005 11:16:30 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from smtp107.mail.sc5.yahoo.com (smtp107.mail.sc5.yahoo.com [66.163.169.227]) by postgresql.org (Postfix) with SMTP id 5A9009DCAB2 for ; Fri, 2 Dec 2005 11:16:32 -0400 (AST) Received: (qmail 95400 invoked from network); 2 Dec 2005 15:16:37 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=Yahoo.com; h=Received:Received:Message-ID:Date:From:User-Agent:X-Accept-Language:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=xouP/JROa9vAJdgBDQRT2/n6K3VYS7v8bhyl+psLnxCL6jS1FytrDcPjh9WsVsb+XHPSu3QDJ8w7TAdR1+jQ7rQUOaYdlg13yo9CGaNyoD+tiL7VuCChxYwUWi4G790U1vv7+nSqEcXVkxx4qtFqu42vMsuiEfj2eEpK3J/Vyr4= ; Received: from unknown (HELO jupiter.black-lion.info) (janwieck@68.80.245.191 with login) by smtp107.mail.sc5.yahoo.com with SMTP; 2 Dec 2005 15:16:36 -0000 Received: from [172.21.8.23] (ismtp.afilias.com [216.217.55.254]) (authenticated bits=0) by jupiter.black-lion.info (8.12.10/8.12.9) with ESMTP id jB2FGY1o096742; Fri, 2 Dec 2005 10:16:35 -0500 (EST) (envelope-from JanWieck@Yahoo.com) Message-ID: <4390654C.90805@Yahoo.com> Date: Fri, 02 Dec 2005 10:16:28 -0500 From: Jan Wieck User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.1) Gecko/20040707 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Michael Riess CC: pgsql-performance@postgresql.org Subject: Re: 15,000 tables References: <60psogzqui.fsf@dba2.int.libertyrms.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=4.18 required=5 tests=[DNS_FROM_RFC_ABUSE=0.479, RCVD_IN_NJABL_DUL=1.713, RCVD_IN_SORBS_DUL=1.988] X-Spam-Score: 4.18 X-Spam-Level: **** X-Archive-Number: 200512/65 X-Sequence-Number: 15886 On 12/1/2005 2:34 PM, Michael Riess wrote: >> VACUUM FULL was probably always overkill, unless "always" includes >> versions prior to 7.3... > > Well, we tried switching to daily VACUUM ANALYZE and weekly VACUUM FULL, > but the database got considerably slower near the end of the week. This indicates that you have FSM settings that are inadequate for that many tables and eventually the overall size of your database. Try setting those to max_fsm_relations = 80000 max_fsm_pages = (select sum(relpages) / 2 from pg_class) Another thing you might be suffering from (depending on the rest of your architecture) is file descriptor limits. Especially if you use some sort of connection pooling or persistent connections like PHP, you will have all the backends serving multiple of your logical applications (sets of 30 tables). If on average one backend is called for 50 different apps, then we are talking 50*30*4=6000 files accessed by that backend. 80/20 rule leaves 1200 files in access per backend, thus 100 active backends lead to 120,000 open (virtual) file descriptors. Now add to that any files that a backend would have to open in order to evict an arbitrary dirty block. With a large shared buffer pool and little more aggressive background writer settings, you can avoid mostly that regular backends would have to evict dirty blocks. If the kernel settings allow Postgres to keep that many file descriptors open, you avoid directory lookups. Jan -- #======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #================================================== JanWieck@Yahoo.com #