Thread: max_fsm_pages >800k ... ?

max_fsm_pages >800k ... ?

From
"Marc G. Fournier"
Date:
Without more information to provide at this time, does the following seem 
"unusual"?

INFO:  free space map: 252 relations, 411494 pages stored; 738640 total pages needed
DETAIL:  Allocated FSM size: 2000 relations + 400000 pages = 2463 kB shared memory.

I know there are alot of factors involved in the above, which I'm looking 
into, but when I first saw the above, I just about had a heartattack, only 
because i've never seen such high #s for total pages needed ...

... Is this something that others are seeing as relatively normal?




----
Marc G. Fournier           Hub.Org Networking Services (http://www.hub.org)
Email: scrappy@hub.org           Yahoo!: yscrappy              ICQ: 7615664


Re: max_fsm_pages >800k ... ?

From
Josh Berkus
Date:
Marc,

> Without more information to provide at this time, does the following
> seem "unusual"?
>
> INFO:  free space map: 252 relations, 411494 pages stored; 738640 total
> pages needed DETAIL:  Allocated FSM size: 2000 relations + 400000 pages
> = 2463 kB shared memory.

Looks like you haven't run VACUUM in a few days.   Or like you deleted and 
re-loaded a large table multiple times.

BTW, this is really more of a pgsql-performance question ...

-- 
--Josh

Josh Berkus
Aglio Database Solutions
San Francisco


Re: max_fsm_pages >800k ... ?

From
"John Hansen"
Date:
INFO:  analyzing "pg_catalog.pg_depend"
INFO:  "pg_depend": 27 pages, 3866 rows sampled, 3866 estimated total
rows
INFO:  free space map: 423 relations, 88475 pages stored; 431200 total
pages needed
DETAIL:  Allocated FSM size: 4000 relations + 80000 pages = 705 kB
shared memory.

This, on a database with a moderate amount of rows (<10 Million)
So,.. I'd say fairly normal.

... John
> -----Original Message-----
> From: pgsql-hackers-owner@postgresql.org
> [mailto:pgsql-hackers-owner@postgresql.org] On Behalf Of Marc
> G. Fournier
> Sent: Thursday, June 16, 2005 3:57 AM
> To: pgsql-hackers@postgresql.org
> Subject: [HACKERS] max_fsm_pages >800k ... ?
>
>
> Without more information to provide at this time, does the
> following seem "unusual"?
>
> INFO:  free space map: 252 relations, 411494 pages stored;
> 738640 total pages needed
> DETAIL:  Allocated FSM size: 2000 relations + 400000 pages =
> 2463 kB shared memory.
>
> I know there are alot of factors involved in the above, which
> I'm looking into, but when I first saw the above, I just
> about had a heartattack, only because i've never seen such
> high #s for total pages needed ...
>
> ... Is this something that others are seeing as relatively normal?
>
>
>
>
> ----
> Marc G. Fournier           Hub.Org Networking Services
> (http://www.hub.org)
> Email: scrappy@hub.org           Yahoo!: yscrappy
>  ICQ: 7615664
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 8: explain analyze is your friend
>
>


Re: max_fsm_pages >800k ... ?

From
Tom Lane
Date:
"Marc G. Fournier" <scrappy@postgresql.org> writes:
> Without more information to provide at this time, does the following seem 
> "unusual"?

> INFO:  free space map: 252 relations, 411494 pages stored; 738640 total pages needed
> DETAIL:  Allocated FSM size: 2000 relations + 400000 pages = 2463 kB shared memory.

What this is saying is that you'd need 738640 fsm_pages slots to
remember every single page that has a useful amount of free space.
However, you don't necessarily have to remember all those pages.
If you remember enough pages to satisfy insert/update requests
until the next VACUUM happens, then you're good.

I think the bottom-line question is "are you seeing any database
bloat?"  If yes, increase max_fsm_pages; if no, worry not.
        regards, tom lane