From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [PATCHES] default resource limits |
Date: | 2006-01-02 00:59:06 |
Message-ID: | 43B87ADA.1080709@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Tom Lane wrote:
>Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>
>
>>In experimenting I needed to set this at 20 for it to bite much. If we
>>wanted to fine tune it I'd be inclined to say that we wanted
>>20*connections buffers for the first, say, 50 or 100 connections and 10
>>or 16 times for each connection over that. But that might be getting a
>>little too clever - something we should leave to a specialised tuning
>>tool. After all, we try these in fairly discrete jumps anyway. Maybe a
>>simple factor around 20 would be sufficient.
>>
>>
>
>I think 10 is probably a good compromise value. If we set it to 20
>we'll find "make check" failing on Darwin because Apple's standard
>SHMMAX value doesn't allow more than about 300 buffers ... and the
>regression tests want max_connections to be at least 20.
>
>
Well, we could do something like:
#define MIN_BUFS_FOR_CONNS(nconns) ((nconns) <= 20 ? (nconns) * 10 : 200
+ (((nconns) - 20) * 20))
But I'm happy just to live with 10 :-)
>I noticed while fooling with this on my laptop that initdb was selecting
>a shared_buffers value less than the value it had just proved would work
>:-(. This is because the list of shared_buffers values it was probing
>did not include all the values corresponding to values tried during the
>max_connections scan. I've added documentation about that gotcha.
>
>
>
>
That's easily fixed, I think. We just need to remember what we have
proved works.
I can apply the attached patch if you think that's worth doing.
Thanks for cleaning this up. The remaining question is whether to leave
the max connections tried at 100 on all platforms or bump it for those
that won't hurt from extra semaphore use. I can see arguments both ways
- I'm less concerned about this than the shared buffers numbers.
cheers
andrew
Attachment | Content-Type | Size |
---|---|---|
buf-fix.patch | text/x-patch | 1.6 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-01-02 01:03:05 | Re: Checks for command string |
Previous Message | Doug Royer | 2006-01-02 00:58:54 | Re: EINTR error in SunOS |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-01-02 01:03:05 | Re: Checks for command string |
Previous Message | Bruce Momjian | 2006-01-02 00:55:15 | Re: Checks for command string |