From: | Adam Witney <awitney(at)sghms(dot)ac(dot)uk> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: max_connections/shared_buffers (was Re: Beta4 Tag'd and |
Date: | 2003-10-06 08:06:11 |
Message-ID: | BBA6E103.25CAF%awitney@sghms.ac.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 4/10/03 8:10 pm, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> I said:
>> Hm. The parallel regression tests require at least 20. I deliberately
>> allowed initdb to select values as small as 10 on the theory that
>> installing and not being able to run the parallel regression tests is
>> better than not installing at all.
>
> Actually, after trying to reproduce the problem on my own OS X machine,
> I realize that it's a little more subtle than I thought. The Darwin
> port does not use SysV semaphores at all (it uses Posix semaphores) and
> so the resource restriction you're hitting must actually be the
> max-shared-memory limit, rather than number-of-semaphores as I first
> assumed. max_connections does have an impact on shared memory size,
> though not as large as shared_buffers has.
>
> Therefore, the real problem is that initdb initially probes for a
> workable number of shared_buffers while using max_connections=5, and
> then it selects max_connections while holding shared_buffers constant.
> I was thinking that a small max_connections would prevent us from
> mistakenly choosing tiny shared_buffers when the system's real
> restriction is on number of semaphores. But what we seem to have here
> is that the selected number of buffers was just a little under the
> system's max-shared-memory limit, so that max_connections could be
> raised to 10 but not to 20.
>
> (BTW, on my OS X machine, with out-of-the-box configuration, initdb
> selects shared_buffers 400 and max_connections 20. I'm guessing that
> you had either a nondefault shared memory limit, or some other process
> using shared memory.)
These are my current settings
sysctl -w kern.sysv.shmmax=4194304
sysctl -w kern.sysv.shmmin=1
sysctl -w kern.sysv.shmmni=32
sysctl -w kern.sysv.shmseg=8
sysctl -w kern.sysv.shmall=1024
This is a laptop so I have quite a few other apps running, including my
current PostgreSQL installation (7.2.3), the settings of which are
#max_connections = 32
shared_buffers = 100
Let me know if you need any more info?
Thanks
Adam
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
From | Date | Subject | |
---|---|---|---|
Next Message | Christopher Kings-Lynne | 2003-10-06 08:24:10 | missing COMMENT ON objects |
Previous Message | sad | 2003-10-06 07:52:47 | is the time ?.. |