[DOCS] Instructions for Linux ipc config

2005-02-03 Thread Mark Kirkwood
Glancing over these as I was doing the FreeBSD patch, I noticed some
scope for modernization there plus a possible error to correct:
i) we could standardize the change method to use sysctl instead of
echo'ing things into /proc/kernel/* structures (unless there is some
reason for this to be preferable?)
ii) we are recommending setting kernel.shmall equal to kernel.shmmax. I
think this is incorrect or strange anyway :
examining 2.6.10 src I see
./include/linux/shm.h:16: #define SHMALL (SHMMAX/PAGE_SIZE*(SHMMNI/16))
/* max shm system wide (pages) */
i.e. kernel.shmall really is in pages. So our suggested settings of:
kernel.shmall = 134217728
kernel.shmmax = 134217728
allow PAGE_SIZE  128M segments to be created... thats 4096 of 'em on
most common HW. This is probably more than most systems would need or
want (and does setting this value too high have a performance impact?).
One option is to follow what we have said for the BSD's i.e:
kernel.shmall = 32768
or leave shmall at its default (commonly 2097152).
What do people think?
regards
Mark
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


Re: [DOCS] Instructions for Linux ipc config

2005-02-03 Thread Tom Lane
Mark Kirkwood <[EMAIL PROTECTED]> writes:
> Glancing over these as I was doing the FreeBSD patch, I noticed some
> scope for modernization there plus a possible error to correct:

> i) we could standardize the change method to use sysctl instead of
> echo'ing things into /proc/kernel/* structures (unless there is some
> reason for this to be preferable?)

How far back in Linux history does that work?  It would be bad to remove
instructions needed for versions that people are still using.  But yeah,
if we can standardize on describing sysctl that's probably a good thing,
since it applies to more than one platform.

> ii) we are recommending setting kernel.shmall equal to kernel.shmmax. I
> think this is incorrect or strange anyway :

It does make sense for shmall-in-bytes to exceed shmmax-in-bytes, but
probably not by a factor of 4000 ...

regards, tom lane

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


Re: [DOCS] Instructions for Linux ipc config

2005-02-03 Thread Mark Kirkwood
Tom Lane wrote:
Mark Kirkwood <[EMAIL PROTECTED]> writes:
Glancing over these as I was doing the FreeBSD patch, I noticed some
scope for modernization there plus a possible error to correct:

i) we could standardize the change method to use sysctl instead of
echo'ing things into /proc/kernel/* structures (unless there is some
reason for this to be preferable?)

How far back in Linux history does that work?  It would be bad to remove
instructions needed for versions that people are still using.  But yeah,
if we can standardize on describing sysctl that's probably a good thing,
since it applies to more than one platform.

Interesting question (goes away to look at old linux distros...). Some
quite old ones have a sysctl binary - e.g. Redhat 6.2 / linux 2.2.14.
But to be on the safe side, it would make sense to do something similar
to the BSD section, and comment about older distributions maybe needing
to manipulate /proc/kernel/* directly.

regards
Mark
---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?
  http://www.postgresql.org/docs/faq