Date: 11 Apr 2001 10:05:53 -0400 From: Lowell Gilbert <lowell@world.std.com> To: freebsd-questions@freebsd.org, oscars@mail.utexas.edu Subject: Re: Maxusers and max open files Message-ID: <44zodn351a.fsf@lowellg.ne.mediaone.net> In-Reply-To: oscars@mail.utexas.edu's message of "9 Apr 2001 20:24:50 %2B0200" References: <5.0.2.1.2.20010409131651.00acad90@mail.utexas.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
oscars@mail.utexas.edu (Oscar Ricardo Silva) writes: > 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 > 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. No, actually. It means that if you define MAXFILES in your configuration file, that value will override the one calculated from NPROC. Also note that maxfiles (and several related values) can now be adjusted dynamically at runtime, via a sysctl(8). A quick check of the history of the man page for sysctl makes me think this was the case in 4.0 also. > At the same time, I don't > want to place to much overhead on the machine to where it becomes unusable. Very wise, although a maxusers setting of 128 is still well short of causing that sort of problem. > Any thoughts on what the usable limit is for MAXUSERS? I'm sorry not to offer more help, but I'm afraid that it really depends on your application mix. This sort of thing is generally determined by trial and error. It seems that running out of file slots is your *only* problem, so some judicious experiments with adjusting those dynamically will probably tune your system quite well. Good luck. - Lowell Gilbert -- Everything you know is wrong -- but some of it is a useful approximation! 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?44zodn351a.fsf>