Re: [patch] Improve documentation around FreeBSD Kernel Tuning

Lists: pgsql-hackers
From: Brad Davis <brd(at)FreeBSD(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: [patch] Improve documentation around FreeBSD Kernel Tuning
Date: 2012-01-03 21:49:51
Message-ID: 20120103214951.GA2646@valentine.liquidneon.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi,

I have a patch that improves the documentation for FreeBSD Kernel Tuning:

- Show a # prompt instead of $ to indicate a root shell is needed
- Remove the -w flag to sysctl since it is not needed anymore and just silently ignored
- Encourage the user to set the read-only sysctls in /boot/loader.conf, instead of setting them manually in the loader.

I have put these in a github fork of the repo, but I am new to git. So I apologize if this is incorrect.

https://github.com/so14k/postgres/commit/12c03bdb2967346e7ad9ce0bdd3db8dfcf81507e

Regards,
Brad Davis


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Brad Davis <brd(at)FreeBSD(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [patch] Improve documentation around FreeBSD Kernel Tuning
Date: 2012-01-03 22:02:57
Message-ID: 4F037B11.6010501@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 01/03/2012 04:49 PM, Brad Davis wrote:
> Hi,
>
> I have a patch that improves the documentation for FreeBSD Kernel Tuning:
>
> - Show a # prompt instead of $ to indicate a root shell is needed
> - Remove the -w flag to sysctl since it is not needed anymore and just silently ignored
> - Encourage the user to set the read-only sysctls in /boot/loader.conf, instead of setting them manually in the loader.
>
> I have put these in a github fork of the repo, but I am new to git. So I apologize if this is incorrect.
>
> https://github.com/so14k/postgres/commit/12c03bdb2967346e7ad9ce0bdd3db8dfcf81507e
>
>

Instead of a URL, please just email us the diff as an attachment.
Normally we prefer these in context diff format, although it doesn't
matter so much for such a small patch.

See

cheers

andrew


From: Brad Davis <brd(at)FreeBSD(dot)org>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Brad Davis <brd(at)FreeBSD(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [patch] Improve documentation around FreeBSD Kernel Tuning
Date: 2012-01-03 23:15:39
Message-ID: 20120103231539.GB2646@valentine.liquidneon.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Tue, Jan 03, 2012 at 05:02:57PM -0500, Andrew Dunstan wrote:
>
>
> On 01/03/2012 04:49 PM, Brad Davis wrote:
> > Hi,
> >
> > I have a patch that improves the documentation for FreeBSD Kernel Tuning:
> >
> > - Show a # prompt instead of $ to indicate a root shell is needed
> > - Remove the -w flag to sysctl since it is not needed anymore and just silently ignored
> > - Encourage the user to set the read-only sysctls in /boot/loader.conf, instead of setting them manually in the loader.
> >
> > I have put these in a github fork of the repo, but I am new to git. So I apologize if this is incorrect.
> >
> > https://github.com/so14k/postgres/commit/12c03bdb2967346e7ad9ce0bdd3db8dfcf81507e
> >
> >
>
> Instead of a URL, please just email us the diff as an attachment.
> Normally we prefer these in context diff format, although it doesn't
> matter so much for such a small patch.

Sorry about that.. it is attached below.

Thanks,
Brad Davis

diff against doc/src/sgml/runtime.sgml

797,799c797,799
< <prompt>$</prompt> <userinput>sysctl -w kern.ipc.shmall=32768</userinput>
< <prompt>$</prompt> <userinput>sysctl -w kern.ipc.shmmax=134217728</userinput>
< <prompt>$</prompt> <userinput>sysctl -w kern.ipc.semmap=256</userinput>
---
> <prompt>#</prompt> <userinput>sysctl kern.ipc.shmall=32768</userinput>
> <prompt>#</prompt> <userinput>sysctl kern.ipc.shmmax=134217728</userinput>
> <prompt>#</prompt> <userinput>sysctl kern.ipc.semmap=256</userinput>
807,815c807,815
< <command>sysctl</command> is concerned, but can be changed
< before boot using the <command>loader</command> prompt:
< <screen>
< <prompt>(loader)</prompt> <userinput>set kern.ipc.semmni=256</userinput>
< <prompt>(loader)</prompt> <userinput>set kern.ipc.semmns=512</userinput>
< <prompt>(loader)</prompt> <userinput>set kern.ipc.semmnu=256</userinput>
< </screen>
< Similarly these can be saved between reboots in
< <filename>/boot/loader.conf</filename>.
---
> <command>sysctl</command> is concerned, but can be set in
> <filename>/boot/loader.conf</filename>:
> <programlisting>
> kern.ipc.semmni=256
> kern.ipc.semmns=512
> kern.ipc.semmnu=256
> </programlisting>
> After modifying these values a reboot is required for the new
> settings to take affect.


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Brad Davis <brd(at)FreeBSD(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [patch] Improve documentation around FreeBSD Kernel Tuning
Date: 2012-01-03 23:29:12
Message-ID: 4F038F48.6000306@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 01/03/2012 06:15 PM, Brad Davis wrote:
> On Tue, Jan 03, 2012 at 05:02:57PM -0500, Andrew Dunstan wrote:
>>
>> On 01/03/2012 04:49 PM, Brad Davis wrote:
>>> Hi,
>>>
>>> I have a patch that improves the documentation for FreeBSD Kernel Tuning:
>>>
>>> - Show a # prompt instead of $ to indicate a root shell is needed
>>> - Remove the -w flag to sysctl since it is not needed anymore and just silently ignored
>>> - Encourage the user to set the read-only sysctls in /boot/loader.conf, instead of setting them manually in the loader.
>>>
>>> I have put these in a github fork of the repo, but I am new to git. So I apologize if this is incorrect.
>>>
>>> https://github.com/so14k/postgres/commit/12c03bdb2967346e7ad9ce0bdd3db8dfcf81507e
>>>
>>>
>> Instead of a URL, please just email us the diff as an attachment.
>> Normally we prefer these in context diff format, although it doesn't
>> matter so much for such a small patch.
> Sorry about that.. it is attached below.
>

But you didn't :-) You just cut and pasted it. And if you're not going
to send a context diff, it should be a unidiff such as git normally
produces. Since I didn't actually tell you that I've made a context diff
for you, and it's attached. I'll let someone with more FBSD-fu than me
actually comment on it.

cheers

andrew

Attachment Content-Type Size
fbsd.patch text/x-patch 2.2 KB

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Brad Davis <brd(at)FreeBSD(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [patch] Improve documentation around FreeBSD Kernel Tuning
Date: 2012-01-03 23:43:52
Message-ID: 29107.1325634232@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> Since I didn't actually tell you that I've made a context diff
> for you, and it's attached. I'll let someone with more FBSD-fu than me
> actually comment on it.

I have no FBSD-fu whatever, but the question this patch raises in my
mind is whether /boot/loader.conf exists in every version of FBSD.
If not, we probably need to say something like "do this in versions >=
whatever, and do the other in versions before that." Likewise, has
it always been true that -w is unnecessary? For other systems
such as Mac OS X, we have recommendations covering quite ancient OS
releases, and I don't see why we'd not hold the FreeBSD section to the
same standard.

regards, tom lane


From: Brad Davis <brd(at)FreeBSD(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Brad Davis <brd(at)FreeBSD(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [patch] Improve documentation around FreeBSD Kernel Tuning
Date: 2012-01-04 00:24:06
Message-ID: 20120104002406.GE2646@valentine.liquidneon.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Tue, Jan 03, 2012 at 06:43:52PM -0500, Tom Lane wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> > Since I didn't actually tell you that I've made a context diff
> > for you, and it's attached. I'll let someone with more FBSD-fu than me
> > actually comment on it.
>
> I have no FBSD-fu whatever, but the question this patch raises in my
> mind is whether /boot/loader.conf exists in every version of FBSD.
> If not, we probably need to say something like "do this in versions >=
> whatever, and do the other in versions before that." Likewise, has
> it always been true that -w is unnecessary? For other systems
> such as Mac OS X, we have recommendations covering quite ancient OS
> releases, and I don't see why we'd not hold the FreeBSD section to the
> same standard.

Well.. The man page appeared somewhere between FreeBSD 3.0 and 4.0.. and
4.0 was released March 14, 2000.

Regards,
Brad Davis


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Brad Davis <brd(at)FreeBSD(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [patch] Improve documentation around FreeBSD Kernel Tuning
Date: 2012-08-27 03:22:02
Message-ID: 20120827032202.GC28780@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Tue, Jan 3, 2012 at 05:24:06PM -0700, Brad Davis wrote:
> On Tue, Jan 03, 2012 at 06:43:52PM -0500, Tom Lane wrote:
> > Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> > > Since I didn't actually tell you that I've made a context diff
> > > for you, and it's attached. I'll let someone with more FBSD-fu than me
> > > actually comment on it.
> >
> > I have no FBSD-fu whatever, but the question this patch raises in my
> > mind is whether /boot/loader.conf exists in every version of FBSD.
> > If not, we probably need to say something like "do this in versions >=
> > whatever, and do the other in versions before that." Likewise, has
> > it always been true that -w is unnecessary? For other systems
> > such as Mac OS X, we have recommendations covering quite ancient OS
> > releases, and I don't see why we'd not hold the FreeBSD section to the
> > same standard.
>
> Well.. The man page appeared somewhere between FreeBSD 3.0 and 4.0.. and
> 4.0 was released March 14, 2000.

Applied to PG 9.3. Sorry for the long delay.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +