Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Performance > Re: how big shm...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 5 Topic 4161 of 4352
Post > Topic >>

Re: how big shmmax is good for Postgres...

by scott.marlowe@[EMAIL PROTECTED] ("Scott Marlowe") Jul 10, 2008 at 05:23 AM

On Thu, Jul 10, 2008 at 4:53 AM, Jessica Richard <rjessil@[EMAIL PROTECTED]
> wrote:
> On a Linux system,  if the total memory is 4G and the shmmax is set to
4G, I
> know it is bad, but how bad can it be? Just trying to understand the
impact
> the "shmmax" parameter can have  on Postgres  and the entire system
after
> Postgres comes up on this number.

There are two settings, shmmax for the OS, and shared_buffers for
pgsql.  If the OS has a max setting of 4G but pgsql is set to use
512Meg then you'd be safe.

Now, assuming that both the OS and pgsql are set to 4G, and you're
approaching that level of usage, the OS will start swapping out to
make room for the shared memory.  The machine will likely be starved
of memory, and will go into what's often called a swap storm where it
spends all its time swapping stuff in and out and doing little else.

> What is the reasonable setting for shmmax on a 4G total machine?

Keep in mind that postgresql's shared buffers are just one level of
caching / buffering that's going on.  The OS caches file access, and
sometimes the RAID controller and / or hard drive.

Generally the nominal setting is 25% of memory, but that's variable.
If the working set of your data will fit in 10% then there's no need
for setting shared_memory to 25%...

-- 
Sent via pgsql-performance mailing list (pgsql-performance@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
 




 5 Posts in Topic:
how big shmmax is good for Postgres...
rjessil@[EMAIL PROTECTED]  2008-07-10 03:53:40 
Re: how big shmmax is good for Postgres...
wmoran@[EMAIL PROTECTED]   2008-07-10 07:19:19 
Re: how big shmmax is good for Postgres...
scott.marlowe@[EMAIL PROT  2008-07-10 05:23:12 
Re: how big shmmax is good for Postgres...
scott.marlowe@[EMAIL PROT  2008-07-10 09:37:19 
Re: how big shmmax is good for Postgres...
scott.marlowe@[EMAIL PROT  2008-07-10 06:11:47 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Oct 12 14:35:04 CDT 2008.