On 9/16/06, darren kirby <[EMAIL PROTECTED]> wrote:
#  sysctl -p
error: "Invalid argument" setting key "kernel.pid_max"

You can find the answer in /usr/include/linux/threads.h.
PID_MAX_DEFAULT is defined as 0x8000 (32768) for most systems, and
PID_MAX_LIMIT is set to 4194304 *if* longs are larger than 4 bytes, or
PID_MAX_DEFAULT otherwise.

So if you are on a 32-bit system, you cannot set pid_max any larger
than PID_MAX_DEFAULT.

As far as "cool" factor goes, I don't see any coolness there.  All
that really happens when setting this is that the kernel uses more
memory for the process table, and it takes longer for the process IDs
to wrap.  But unless you really need to run more than 32k processes at
the same time, all you are really doing is wasting memory by
increasing this.

Also, assuming you can help me get this sorted does anyone know which programs
this may break?

Well anything compiled assuming pid_t was an unsigned 16-bit integer
value would probably crash.  This is probably unlikely....pid_t is
defined as an int, or a signed 32-bit value on any platform that
matters today.  But if you've got some ancient programs hanging around
or that you brought over from another system, they could have a
problem.

-Richard
--
[email protected] mailing list

Reply via email to