bclark_hyperic
Enthusiast
Enthusiast

Increase max_fsm_pages in bundled PostgreSQL DB?

Hello,

I recently ran a vacuum analyze on the bundled HQDB (Postgres 8.1.2) on my HQ 4.0.2 installation and, after doing its thing, it came back with these log entries:

2009-02-22 22:00:02.823 ] LOG: number of page slots needed (20016) exceeds max_fsm_pages (20000)
2009-02-22 22:00:02.823 ] HINT: Consider increasing the configuration parameter "max_fsm_pages" to a value over 20016.

I went ahead and increased the max_fsm_pages value in the postgresql.conf to 20100 and restarted Postgres. Is this unique to my environment, or should this be something that everyone running HQ on a Postgres DB consider doing?

Brian
0 Kudos
2 Replies
excowboy
Virtuoso
Virtuoso

Hi Brian,

depending on the number of platforms, metrics and other settings in Hyperic HQ the default settings for the bundled database are not sufficient.
The parameter max_fsm_pages is described here
http://www.postgresql.org/docs/8.2/static/runtime-config-resource.html#RUNTIME-CONFIG-RESOURCE-FSM

As you can see 20000 is the recommended minimum. In order to save you server restarts I recommend you to either calculate the value or use a much higher value than 20100.

Cheers,
Mirko
bclark_hyperic
Enthusiast
Enthusiast

Ok. Interesting.

max_fsm_pages (integer)
Sets the maximum number of disk pages for which free space will be tracked in the shared free-space map. Six bytes of shared memory are consumed for each page slot. This setting must be at least 16 * max_fsm_relations. The default is chosen by initdb depending on the amount of available memory, and can range from 20k to 200k pages. This parameter can only be set at server start.

max_fsm_relations (integer)
Sets the maximum number of relations (tables and indexes) for which free space will be tracked in the shared free-space map. Roughly seventy bytes of shared memory are consumed for each slot. The default is one thousand relations. This parameter can only be set at server start.

I've increased these values as seen here. Hopefully this
max_fsm_pages = 30000 # min max_fsm_relations*16, 6 bytes each
max_fsm_relations = 1500

This seems to meet the criteria. Hopefully nothing will blow up on me.
0 Kudos