From: | Josh Berkus <josh(at)agliodbs(dot)com> |
---|---|
To: | "J(dot)T(dot) Hartzler" <dba(at)wap(dot)ntelos(dot)com>, pgsql-novice(at)postgresql(dot)org |
Subject: | Re: kernel memory parms |
Date: | 2003-03-24 21:47:19 |
Message-ID: | 200303241347.19294.josh@agliodbs.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
J.T.,
> I am running Debian stable with postgresql 7.2.1. My machine has 4 GB of
> RAM and I have configured the kernel to recognize it all. I have the
> following shared mem options set:
First off, if there is a deb package for 7.2.3 or 7.2.4, you should upgrade.
7.2.1 contains several notable bugs.
> Based on what I read in the docs I should be able to use at
> setting of shared_buffers = 454000 in my postgresql.conf file as I want
> to use about 3600MB of memory for my database.
No, you don't.
If you survey the archives of the PGSQL-PERFORMANCE list, you will find lots
of anecdotal evidence that any shared buffer setting beyond 2000-6000
actually decreases performance or at least does not benefit it. Shared
buffers are just a "holding area" while data is being fed to the Kernel
buffer; beyond a certain size, they in fact rob the kernel of resources.
(BTW, you are not a dummy for not knowing this; it is poorly documented if at
all in current docs. We'll fix that in the future, really!)
> However when I try to use that many segments I get the following error:
>
> IpcMemoryCreate: shmat(id=1015811) failed: Invalid argument
>
> The highest number of shared buffers it allows me to use is 258169. After
> starting postgresql with the shared_buffers = 258169 and
> max_connections = 64 ipcs shows the following:
That's because, I believe, that shared_buffers is a 4-byte integer that won't
address more than 2.4 billion bytes. Since settings > 6000 are generally
viewed as counterproductive, this is not widely viewed as a bug.
--
-Josh Berkus
Aglio Database Solutions
San Francisco
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-03-24 21:48:30 | Re: kernel memory parms |
Previous Message | J.T. Hartzler | 2003-03-24 21:37:12 | kernel memory parms |