Date: Mon, 09 Apr 2001 13:22:59 -0500 From: Oscar Ricardo Silva <oscars@mail.utexas.edu> To: questions@freebsd.org Subject: Maxusers and max open files Message-ID: <5.0.2.1.2.20010409131651.00acad90@mail.utexas.edu>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5.0.2.1.2.20010409131651.00acad90>