From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1GOz1a-0002KD-5G for garchives@archives.gentoo.org; Sun, 17 Sep 2006 15:57:42 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.8/8.13.6) with SMTP id k8HFuFD9018278; Sun, 17 Sep 2006 15:56:15 GMT Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.191]) by robin.gentoo.org (8.13.8/8.13.6) with ESMTP id k8HFmogt027252 for ; Sun, 17 Sep 2006 15:48:50 GMT Received: by nf-out-0910.google.com with SMTP id p46so3333712nfa for ; Sun, 17 Sep 2006 08:48:50 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=fH1JjAP6oeqifHoa7B070wb3hPtug6v5Y8zotchzgEj5hLQRGIW01yRBJ6+CeQ3a9lF7LVLa5MI/3EjBuRbO45MtONPhnHA3ezZfZuX4AJKeh0WpYyw4Uf13NmN1dOflbe38yU7UVcr1PtrYFyYzFmTFokUK1fge2/YzLQ0qX/8= Received: by 10.82.122.17 with SMTP id u17mr69466buc; Sun, 17 Sep 2006 08:48:49 -0700 (PDT) Received: by 10.82.126.14 with HTTP; Sun, 17 Sep 2006 08:48:49 -0700 (PDT) Message-ID: <7573e9640609170848v390d8384kf71fda69c26475b7@mail.gmail.com> Date: Sun, 17 Sep 2006 08:48:49 -0700 From: "Richard Fish" Sender: richard.j.fish@gmail.com To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] kernel.pid_max In-Reply-To: <200609162353.56602.bulliver@badcomputer.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200609162353.56602.bulliver@badcomputer.org> X-Google-Sender-Auth: 722b71efacd46b3f X-Archives-Salt: 93c79576-5ed4-4c84-a793-5623ed2a0c40 X-Archives-Hash: 353c127c85983f15255f8b3b9294be8b On 9/16/06, darren kirby 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 -- gentoo-user@gentoo.org mailing list