pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
fsm allocation
4+ messages / 4 participants
[nested] [flat]

* fsm allocation
@ 2005-11-17 13:20  Colton A Smith <smith@cs.utk.edu>
  0 siblings, 2 replies; 4+ messages in thread

From: Colton A Smith @ 2005-11-17 13:20 UTC (permalink / raw)
  To: pgsql-admin

Hi

   I manage a moderately large database (version 8.0.4) that experiences 
about 500 inserts per hour spread over a half dozen tables.  Not many updates or deletions 
(usually).

   My problem involves fsm allocation and the vacuum utility.

   Recently, I vacuumed and the output told me I had 47 relations, 151751 
pages stored, and that I needed 237680 total pages.  My fsm allocation
was for 1000 relations, 150000 pages.

   I took this to mean the vacuum didn't work and that I needed to allocate 
more pages.  So I edited the conf file to allocate 300000 pages.  After 
altering SHMMAX on my system, I was able to restart the database.

    I tried vacuuming again.  This time, the output said I had 47 
relations, 301906 pages and that I now needed 333104 total pages.

   I'm confused.  Does this mean I need to bump up my fsm allocation again?

   By the way, what exactly is the 'free map space' anyway?  And why does
it need so much space?

   As always, your help is greatly appreciated.





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: fsm allocation
@ 2005-11-18 21:11  Andrew Sullivan <ajs@crankycanuck.ca>
  parent: Colton A Smith <smith@cs.utk.edu>
  1 sibling, 1 reply; 4+ messages in thread

From: Andrew Sullivan @ 2005-11-18 21:11 UTC (permalink / raw)
  To: pgsql-admin

On Thu, Nov 17, 2005 at 08:20:12AM -0500, Colton A Smith wrote:
>   By the way, what exactly is the 'free map space' anyway?  And why does
> it need so much space?

There's a useful description in the docs, section 17.4.2 (for 8.1). 
I'd look at that.

Your usage might not be stable right now because your FSM was wrong
to begin with.  My bet is that you need to do either a VACUUM FULL or
a dump and reload before twiddling these settings much more.  You
also maybe want either autovacuum, or to increase the frequency of
your vacuums.  Given the database size you discussed, I can't believe
you really need that much space.

A

-- 
Andrew Sullivan  | ajs@crankycanuck.ca
In the future this spectacle of the middle classes shocking the avant-
garde will probably become the textbook definition of Postmodernism. 
                --Brad Holland



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: fsm allocation
@ 2005-11-18 23:59  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Colton A Smith <smith@cs.utk.edu>
  1 sibling, 0 replies; 4+ messages in thread

From: Tom Lane @ 2005-11-18 23:59 UTC (permalink / raw)
  To: Colton A Smith <smith@cs.utk.edu>; +Cc: pgsql-admin

Colton A Smith <smith@cs.utk.edu> writes:
>    Recently, I vacuumed and the output told me I had 47 relations, 151751 
> pages stored, and that I needed 237680 total pages.  My fsm allocation
> was for 1000 relations, 150000 pages.
>    I took this to mean the vacuum didn't work and that I needed to allocate 
> more pages.  So I edited the conf file to allocate 300000 pages.  After 
> altering SHMMAX on my system, I was able to restart the database.
>     I tried vacuuming again.  This time, the output said I had 47 
> relations, 301906 pages and that I now needed 333104 total pages.
>    I'm confused.  Does this mean I need to bump up my fsm allocation again?

I seem to recall that the FSM's threshold for how much free space is
worth remembering does vary with the number of slots it's got available,
so this increase isn't too surprising.

Without knowing anything about the total size of your database, it's
difficult to say whether these numbers are out of line or not.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: fsm allocation
@ 2005-11-20 17:46  Jim C. Nasby <jnasby@pervasive.com>
  parent: Andrew Sullivan <ajs@crankycanuck.ca>
  0 siblings, 0 replies; 4+ messages in thread

From: Jim C. Nasby @ 2005-11-20 17:46 UTC (permalink / raw)
  To: Andrew Sullivan <ajs@crankycanuck.ca>; +Cc: pgsql-admin

On Fri, Nov 18, 2005 at 04:11:59PM -0500, Andrew Sullivan wrote:
> On Thu, Nov 17, 2005 at 08:20:12AM -0500, Colton A Smith wrote:
> >   By the way, what exactly is the 'free map space' anyway?  And why does
> > it need so much space?
> 
> There's a useful description in the docs, section 17.4.2 (for 8.1). 
> I'd look at that.

There's also a description at
http://www.pervasivepostgres.com/instantkb13/article.aspx?id=10087 that
might help you.
-- 
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2005-11-20 17:46 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-11-17 13:20 fsm allocation Colton A Smith <smith@cs.utk.edu>
2005-11-18 21:11 ` Andrew Sullivan <ajs@crankycanuck.ca>
2005-11-20 17:46   ` Jim C. Nasby <jnasby@pervasive.com>
2005-11-18 23:59 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox