Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 38176475DAD for ; Sun, 29 Dec 2002 12:19:05 -0500 (EST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 93DB6475C15 for ; Sun, 29 Dec 2002 12:19:04 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.6/8.12.6) with ESMTP id gBTHIvd0010106; Sun, 29 Dec 2002 12:18:57 -0500 (EST) To: "HT" Cc: pgsql-admin@postgresql.org Subject: Re: max_fsm_pages Sanity Check In-reply-to: References: Comments: In-reply-to "HT" message dated "Sat, 28 Dec 2002 22:19:44 -0800" Date: Sun, 29 Dec 2002 12:18:57 -0500 Message-ID: <10105.1041182337@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/319 X-Sequence-Number: 6814 "HT" writes: > We have quite large production Postgres 7.2 DB which is out of control in > terms of disk consumption. We made it thru the holiday shopping season, > but it isn't over yet. We have taken the DB down once for a vacuum analyze > but only vacuum'd 2 large tables which took FIVE HOURS WITH NO > RESULTS. 1. You don't need to take down the DB to do vacuuming. 2. What do you mean by "WITH NO RESULTS"? > Posts to the newsgroup advised that I crank up the max_fsm_pages. Right > now it is at roughly 65,000. > select relname, relpages from pg_class where relkind in ('r', 't', 'i') > users | 408711 > merchant_sessions | 236333 > batch_load_awaiting | 173785 > orders | 92241 If you have not been vacuuming regularly then these relpages figures cannot be trusted too much, but it looks to me like you might need max_fsm_pages nearer to 1 million than 64k. If it's not large enough to cover all (or at least nearly all) pages with free space, then you'll have space-leakage problems. What is the tuple update/deletion rate in these tables, anyway? Also, you should probably think about updating to 7.3.1 sometime soon. There's a performance problem in the 7.2.* FSM code that shows up when a single table has more than ~10000 pages with useful amounts of free space --- VACUUM takes an unreasonable amount of time to record the free space. regards, tom lane