From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 21 13:30:56 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C3A3116A41F for ; Sun, 21 Aug 2005 13:30:56 +0000 (GMT) (envelope-from boris@brooknet.com.au) Received: from bloodwood.hunterlink.net.au (smtp-local.hunterlink.net.au [203.12.144.17]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3912C43D49 for ; Sun, 21 Aug 2005 13:30:55 +0000 (GMT) (envelope-from boris@brooknet.com.au) Received: from ppp2A47.dyn.pacific.net.au (ppp2A47.dyn.pacific.net.au [61.8.42.71]) by bloodwood.hunterlink.net.au (8.12.8/8.12.8) with ESMTP id j7LDSZTh026783; Sun, 21 Aug 2005 23:28:36 +1000 From: Sam Lawrance To: Divacky Roman In-Reply-To: <20050821094849.GA79907@stud.fit.vutbr.cz> References: <20050821094849.GA79907@stud.fit.vutbr.cz> Content-Type: text/plain Date: Sun, 21 Aug 2005 23:31:01 +1000 Message-Id: <1124631061.38048.14.camel@dirk.no.domain> Mime-Version: 1.0 X-Mailer: Evolution 2.2.2 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org Subject: Re: number of simultanously opened files X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Aug 2005 13:30:56 -0000 On Sun, 2005-08-21 at 11:48 +0200, Divacky Roman wrote: > hi > > I wrote this: > witten /tmp# cat x.c > #include > #include > #include > > #define MAX 100000 > main() > { > int i = MAX; > > for (; i>0; i--) { > if (open("/dev/null", O_RDONLY) == -1) { > printf("FUCK: %i\n", MAX-i); > printf("FUCK: %i\n", i); > break; > } > } > getchar(); > } > > set: > > witten ~# sysctl kern.maxfiles=100000 > kern.maxfiles: 100000 -> 100000 > witten ~# sysctl kern.maxfilesperproc=100000 > kern.maxfilesperproc: 100000 -> 100000 > witten ~# > > but I still cannot open more than 7319 files simultaneously. pls can you tell > me why? Possibly because maximum open files is a per-process value that is set at process creation, and also inherited, so you won't see the change in existing processes. Try setting it before boot, or maybe restarting a login on a vty might work. Cheers Sam Sam Lawrance lawrance@FreeBSD.org ph +61 0425 228 579 boris@brooknet.com.au