From owner-freebsd-questions Mon Apr 9 11:24:40 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mail.utexas.edu (wb1-a.mail.utexas.edu [128.83.126.134]) by hub.freebsd.org (Postfix) with SMTP id 8F7FD37B422 for ; Mon, 9 Apr 2001 11:24:37 -0700 (PDT) (envelope-from oscars@mail.utexas.edu) Received: (qmail 19042 invoked by uid 0); 9 Apr 2001 18:24:36 -0000 Received: from chepe.cc.utexas.edu (HELO chepe.mail.utexas.edu) (128.83.135.25) by umbs-smtp-1 with SMTP; 9 Apr 2001 18:24:36 -0000 Message-Id: <5.0.2.1.2.20010409131651.00acad90@mail.utexas.edu> X-Sender: oscars@mail.utexas.edu X-Mailer: QUALCOMM Windows Eudora Version 5.0.2 Date: Mon, 09 Apr 2001 13:22:59 -0500 To: questions@freebsd.org From: Oscar Ricardo Silva Subject: Maxusers and max open files Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I know that the max number of open files is related to the maxusers number in the kernel config file. /usr/src/sys/conf/param.c indicates: #define NPROC (20 + 16 * MAXUSERS) #ifndef MAXFILES #define MAXFILES (NPROC*2) #endif int maxproc = NPROC; /* maximum # of processes */ int maxprocperuid = NPROC-1; /* maximum # of processes per user */ int maxfiles = MAXFILES; /* system wide open files limit */ int maxfilesperproc = MAXFILES; /* per-process open files limit */ So, that means that if I want to raise the max number of open files, I need to change MAXUSERS in the kernel and recompile. At the same time, I don't want to place to much overhead on the machine to where it becomes unusable. Any thoughts on what the usable limit is for MAXUSERS? The machine I'm asking about is currently running FreeBSD 4.0. acting as a dns cache server for our campus (approx. 50,000 hosts) and is running djbdns-1.05. We had problems this weekend where the dnscache portion of the djbdns package reported that it could not open more files. I would like to raise the number (currently, max number of open files set to 4136, maxusers 128) but don't want to suffer to much of a performance hit. I've tried looking for more information on open files and max number of open files but have only found one or two sentences in the FreeBSD handbook. Any other resources for this kind of information? I found the piece of code above but admit that I'm not a programmer. Any information would be extremely appreciated. Oscar To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message