Unix Technical Forum

shared buffers

This is a discussion on shared buffers within the Pgsql Performance forums, part of the PostgreSQL category; --> Hi, I´ve configured postgresql to use 1GB of shared buffers but meminfo and "top" are indicanting 0 shared buffers ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql Performance

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-18-2008, 12:19 PM
Carlos Henrique Reimer
 
Posts: n/a
Default shared buffers

Hi,

I´ve configured postgresql to use 1GB of shared buffers but meminfo and "top" are indicanting 0 shared buffers page. Why?

It´s a Linux Redhat 9 box with 4GB RAM and postgresql 7.3.

Thanks in advance!

Reimer


---------------------------------
Yahoo! Acesso Grátis: Internet rápida e grátis. Instale o discador agora!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-18-2008, 12:19 PM
Christopher Kings-Lynne
 
Posts: n/a
Default Re: shared buffers

> I´ve configured postgresql to use 1GB of shared buffers but meminfo and
> "top" are indicanting 0 shared buffers page. Why?


1GB shared buffers is far too much. Set it back to like 30000 buffers
max...

Chris


---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-18-2008, 12:19 PM
Carlos Henrique Reimer
 
Posts: n/a
Default Re: shared buffers

I forgot to say that it´s a 12GB database...

Ok, I´ll set shared buffers to 30.000 pages but even so "meminfo" and "top" shouldn´t show some shared pages?

I heard something about that Redhat 9 can´t handle very well RAM higher than 2GB. Is it right?

Thanks in advance!

Reimer

Christopher Kings-Lynne <chriskl@familyhealth.com.au> escreveu:
> I´ve configured postgresql to use 1GB of shared buffers but meminfo and
> "top" are indicanting 0 shared buffers page. Why?


1GB shared buffers is far too much. Set it back to like 30000 buffers
max...

Chris



---------------------------------
Yahoo! Acesso Grátis: Internet rápida e grátis. Instale o discador agora!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-18-2008, 12:19 PM
Christopher Kings-Lynne
 
Posts: n/a
Default Re: shared buffers

> I forgot to say that it´s a 12GB database...

That's actually not that large.

> Ok, I´ll set shared buffers to 30.000 pages but even so "meminfo" and
> "top" shouldn´t show some shared pages?


Yeah. The reason for not setting buffers so high is because PostgreSQL
cannot efficiently manage huge shared buffers, so you're better off
giving the RAM to Linux's disk cache.

Chris


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-18-2008, 12:19 PM
Tom Lane
 
Posts: n/a
Default Re: shared buffers

Carlos Henrique Reimer <carlosreimer@yahoo.com.br> writes:
> I heard something about that Redhat 9 can´t handle very well RAM higher than 2GB. Is it right?


RHL 9 is certainly pretty long in the tooth. Why aren't you using a
more recent distro?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-18-2008, 12:19 PM
William Yu
 
Posts: n/a
Default Re: shared buffers

Carlos Henrique Reimer wrote:
> I forgot to say that it´s a 12GB database...
>
> Ok, I´ll set shared buffers to 30.000 pages but even so "meminfo" and
> "top" shouldn´t show some shared pages?
>
> I heard something about that Redhat 9 can´t handle very well RAM higher
> than 2GB. Is it right?
> Thanks in advance!


RH9, like any 32-bit OS, is limited to 2GB address space w/o special
tricks. However, it can access > 2GB for the OS disk cache using PAE if
you are running the bigmem kernel.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 04-18-2008, 12:22 PM
Martin Nickel
 
Posts: n/a
Default Re: shared buffers

Chris,
Would you say that 30000 pages is a good maximum for a Postgres install?
We're running 8.0.3 on 64-bit SUSE on a dual Opteron box with 4G and have
shared_buffers set at 120000. I've moved it up and down (it was 160000
when I got here) without any measurable performance difference.

The reason I ask is because I occasionally see large-ish queries take
forever (like cancel-after-12-hours forever) and wondered if this could
result from shared_buffers being too large.

Thanks for your (and anyone else's) help!
Martin Nickel

On Tue, 30 Aug 2005 10:08:21 +0800, Christopher Kings-Lynne wrote:

>> I forgot to say that it´s a 12GB database...

>
> That's actually not that large.
>
>> Ok, I´ll set shared buffers to 30.000 pages but even so "meminfo" and
>> "top" shouldn´t show some shared pages?

>
> Yeah. The reason for not setting buffers so high is because PostgreSQL
> cannot efficiently manage huge shared buffers, so you're better off
> giving the RAM to Linux's disk cache.
>
> Chris
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 04-18-2008, 12:23 PM
John A Meinel
 
Posts: n/a
Default Re: shared buffers

Martin Nickel wrote:
> Chris,
> Would you say that 30000 pages is a good maximum for a Postgres install?
> We're running 8.0.3 on 64-bit SUSE on a dual Opteron box with 4G and have
> shared_buffers set at 120000. I've moved it up and down (it was 160000
> when I got here) without any measurable performance difference.


What I've read on the mailing list, is that usually the sweet spot is
actually around 10k pages. 120k seems far too high.

I believe that the major fixes to the buffer manager are more in 8.1
rather than 8.0, so you probably are hitting some problems. (The biggest
problem was that there were places that require doing a complete scan
through shared memory looking for dirty pages, or some such).

>
> The reason I ask is because I occasionally see large-ish queries take
> forever (like cancel-after-12-hours forever) and wondered if this could
> result from shared_buffers being too large.


There are lots of possibilities for why these take so long, perhaps you
would want to post them, and we can try to help.
For instance, if you have a foreign key reference from one table to
another, and don't have indexes on both sides, then deleting from the
referenced table, will cause a sequential scan on the referring table
for *each* deleted row. (IIRC).

John
=:->

>
> Thanks for your (and anyone else's) help!
> Martin Nickel


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Darwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDJCStJdeBCYSNAAMRAhSqAJ4rj5xXBOPOXHaVFoe+Aq T9Cr/TIgCdFWIZ
InLHDRTxNp/zVWS5NybgoV0=
=I6fd
-----END PGP SIGNATURE-----

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:16 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com