On my 2.6.7 kernel (no tweaks to this value):
> cat /proc/sys/kernel/pid_max 32768
Since I'd expect databases to align such stuff to 32 bit anyway, I think a 2^32 is a safe bet. And using this virtual file will give you the correct answer for the current system.
Ref: proc(5):
/proc/sys/kernel/pid_max This file (new in Linux 2.5) specifies the value at which PIDs wrap around (i.e., the value in this file is one greater than the maximum PID). The default value for this file, 32768, results in the same range of PIDs as on earlier kernels. The value in this file can be set to any value up to 2^22 (PID_MAX_LIMIT, approximately 4 million).
Cheers,
--Amos
Michael Kraus wrote:
G'day...
I'm developing a database application that uses the inserting processes
pid. Problem is that I'm wondering how big this pid should be?
(OK, if I was a true guru, I'd know this magic number off the top of my
head...)
Is the maximum value of a pid on a UN*X system 65,535? (At least
generally speaking - I think on FreeBSD for example its at 30,000 by
default.)
I've been looking at a lot of web pages, but mostly they seem to deal
with the maximum number of concurrent processes. (Which is rather
defined by memory and sits at about 33,000 for modified Linux with an
average process -excluding the OS-being 30K, but only 4,090 unmodified.)
Regards,
Michael S. E. Kraus
Software Developer/Technical Support Specialist
Wild Technology Pty Ltd
[EMAIL PROTECTED]
Direct Line 02-8306-0007 ________________________________
ABN 98 091 470 692
Level 4 Tiara, 306/9 Crystal Street, Waterloo NSW 2017, Australia
Telephone 1300-13-9453 | Facsimile 1300-88-9453
http://www.wildtechnology.net <blocked::http://www.wildtechnology.net/>
The information contained in this email message and any attachments may be confidential information and may also be the subject of client legal - legal professional privilege. If you are not the intended recipient, any use, interference with, disclosure or copying of this material is unauthorised and prohibited. This email and any attachments are also subject to copyright. No part of them may be reproduced, adapted or transmitted without the written permission of the copyright owner. If you have received this email in error, please immediately advise the sender by return email and delete the message from your system.
-- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html