From owner-freebsd-questions@FreeBSD.ORG Sat Mar 19 14:14:58 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 36CAE16A4CE for ; Sat, 19 Mar 2005 14:14:58 +0000 (GMT) Received: from pi.codefab.com (pi.codefab.com [199.103.21.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id E7E7D43D31 for ; Sat, 19 Mar 2005 14:14:57 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from localhost (localhost [127.0.0.1]) by pi.codefab.com (Postfix) with ESMTP id 447D75E85; Sat, 19 Mar 2005 09:14:57 -0500 (EST) Received: from pi.codefab.com ([127.0.0.1]) by localhost (pi.codefab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 20678-10; Sat, 19 Mar 2005 09:14:56 -0500 (EST) Received: from [192.168.1.3] (pool-68-161-53-96.ny325.east.verizon.net [68.161.53.96]) by pi.codefab.com (Postfix) with ESMTP id 323BF5DBB; Sat, 19 Mar 2005 09:14:56 -0500 (EST) Message-ID: <423C3436.2030501@mac.com> Date: Sat, 19 Mar 2005 09:16:22 -0500 From: Chuck Swiger Organization: The Courts of Chaos User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041217 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Ryan J. Cavicchioni" References: <423B8314.1000606@confabulator.net> In-Reply-To: <423B8314.1000606@confabulator.net> X-Enigmail-Version: 0.90.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at codefab.com cc: FreeBSD Questions Subject: Re: How to avoid forkbomb? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Mar 2005 14:14:58 -0000 Ryan J. Cavicchioni wrote: > Am I looking at the correct values? Yes. > Which is the actual process limit? The lower number, 3632, is the max processes permitted per user. > What would you recommend that I set it to in order to have my machine > shrug off the fork bomb sooner? Probably around 300. > What would be a good process limit for a LAMP webserver? The # of Apache children you want to run + 50 or so... > How would I set the process limits? You could change login.conf (be sure to run "cap_mkdb /etc/login.conf"), or you could change the limits seen all processes by changing /etc/profile, or for specific user accounts by changing that user's startup scripts: # Set reasonable soft process limits. ulimit -Sc 100000 ulimit -Sd 512000 ulimit -Ss 65536 ulimit -Sn 512 ulimit -Su 256 -- -Chuck