Re: FSM - per database or per installation? - Mailing list pgsql-performance

From Craig James
Subject Re: FSM - per database or per installation?
Date
Msg-id 4B32C628.1020202@emolecules.com
Whole thread Raw
In response to Re: FSM - per database or per installation?  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: FSM - per database or per installation?  (Scott Marlowe <scott.marlowe@gmail.com>)
Re: FSM - per database or per installation?  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-performance
Heikki Linnakangas wrote:
> Craig James wrote:
>> Are the FSM parameters for each database, or the entire Postgres
>> system?  In other words, if I have 100 databases, do I need to increase
>> max_fsm_pages and max_fsm_relations by a factor of 100, or keep them the
>> same as if I just have one database?
>>
>> I suspect they're per-database, i.e. as I add databases, I don't have to
>> increase the FSM parameters, but the documentation isn't 100% clear on
>> this point.
>
> It's per cluster, ie *not* per-database.

Hmmm ... it seems I have an impossible problem.  I have ~250 databases each with about 2500 relations (as in "select
count(1)from pg_class where relname not like 'pg_%'").  That makes roughly 625,000 relations. 

But ... for max_fsm_pages, the Postgres manual says, "This setting must be at least 16 * max_fsm_relations. The default
ischosen by initdb depending on the amount of available memory, and can range from 20k to 200k pages." 

So max_fsm_pages should be 16*625000, or 10,000,000 ... except that the limit is 200,000.  Or is it only the *default*
thatcan be 200,000 max, but you can override and set it to any number you like? 

It appears that Postgres 8.3 and earlier can't do garbage collection on a configuration like mine.  Do I misunderstand
something?

> The parameter is gone in 8.4, BTW.

Both max_fsm_relations and max_fsm_pages?

Thanks,
Craig


pgsql-performance by date:

Previous
From: Greg Smith
Date:
Subject: Re: hardware priority for an SSD database?
Next
From: Scott Marlowe
Date:
Subject: Re: FSM - per database or per installation?