From owner-freebsd-questions@FreeBSD.ORG Wed Apr 26 15:40:58 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 1131716A402 for ; Wed, 26 Apr 2006 15:40:58 +0000 (UTC) (envelope-from infofarmer@gmail.com) Received: from nz-out-0102.google.com (nz-out-0102.google.com [64.233.162.192]) by mx1.FreeBSD.org (Postfix) with ESMTP id F09A743D46 for ; Wed, 26 Apr 2006 15:40:56 +0000 (GMT) (envelope-from infofarmer@gmail.com) Received: by nz-out-0102.google.com with SMTP id x3so1870295nzd for ; Wed, 26 Apr 2006 08:40:56 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=QhQPF1nV5YAs2WRPkIyHHp3L8C50i8QulUC9ZTfzz3/hZyJ9gDqSfSqn+s7j6kA7HaGXw87JPyz4i9S58Dsf53FTfwRvKU+6+BZM3aZdEpT92kuar6koNKbkY5NxEzJnsOOEW6pypzpqzYtUOVdthWJuBSaWDPnhhIfsWwuqXhE= Received: by 10.36.33.15 with SMTP id g15mr1713082nzg; Wed, 26 Apr 2006 08:40:56 -0700 (PDT) Received: by 10.37.22.74 with HTTP; Wed, 26 Apr 2006 08:40:56 -0700 (PDT) Message-ID: Date: Wed, 26 Apr 2006 19:40:56 +0400 From: "Andrew Pantyukhin" To: "Dan Nelson" In-Reply-To: <20060426145037.GA6516@dan.emsphone.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <18e02bd30604260709m6a0c33dp972a4f1d0a0e17ea@mail.gmail.com> <20060426145037.GA6516@dan.emsphone.com> Cc: Iantcho Vassilev , FreeBSD Questions Subject: Re: Huge (100k+) number of processes X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Apr 2006 15:40:58 -0000 On 4/26/06, Dan Nelson wrote: > In the last episode (Apr 26), Andrew Pantyukhin said: > > On 4/26/06, Iantcho Vassilev wrote: > > > On 4/26/06, Andrew Pantyukhin wrote: > > > > I was wondering if it's possible to run over 100k processes > > > > simultaneously on a FreeBSD box with sufficient amount > > > > of RAM (and CPU power). > > > > > > Sure,why not? > > > > The problem is that kern.maxproc=3D200000 line in /boot/loader.conf > > only raised the real value to 21576. Is that authoritative, or should > > I just try and run 200k processes? I only have 512Mb of RAM, and I > > wonder if it's enough to run 100k+ of, say, /bin/sleep? > > Make sure you have enough RAM to cover those 100k processes. There's > code that limits maxproc to physpages/12 ("Limit maxproc so that kmap > entries cannot be exhausted by processes"). You can try removing that > code, but each process does require a couple of private pages. > Assuming 5 pages, you'll need 2 GB of RAM just for that overhead, > before you take into account any memory your application will allocate. > > Are you sure you need 100k separate processes running? > > -- > Dan Nelson > dnelson@allantgroup.com > Hmm, I have 2Gb boxes around, but no 4 or 8Gb ones running FreeBSD. I'm just foolishly interested in running 200k of more or less real (but very simple) processes under FreeBSD...