From 0fe6859cdad716ef88332c6a11f56bcb116abf67 Mon Sep 17 00:00:00 2001 From: Joel Dahl Date: Thu, 25 Aug 2005 09:01:08 +0000 Subject: [PATCH] Move "maxusers n" from the kernel configuration chapter to the tuning kernel limits chapter. Suggested by: blackend (some time ago) Approved by: brueffer (mentor) --- .../books/handbook/config/chapter.sgml | 50 ++++++++++++++--- .../books/handbook/kernelconfig/chapter.sgml | 53 ------------------- 2 files changed, 44 insertions(+), 59 deletions(-) diff --git a/en_US.ISO8859-1/books/handbook/config/chapter.sgml b/en_US.ISO8859-1/books/handbook/config/chapter.sgml index 65caf19155..c8defb309a 100644 --- a/en_US.ISO8859-1/books/handbook/config/chapter.sgml +++ b/en_US.ISO8859-1/books/handbook/config/chapter.sgml @@ -2046,9 +2046,9 @@ device_probe_and_attach: cbb0 attach returned 12 kind and number of services running concurrently. kern.maxfile's default value is - dictated by the option in your + dictated by the option in your kernel configuration file. kern.maxfiles grows - proportionally to the value of . When + proportionally to the value of . When compiling a custom kernel, it is a good idea to set this kernel configuration option according to the uses of your system. From this number, the kernel is given most of its pre-defined limits. @@ -2056,10 +2056,48 @@ device_probe_and_attach: cbb0 attach returned 12 connected at once, the resources needed may be similar to a high-scale web server. - As of &os; 4.5, setting to - 0 in your kernel configuration file will choose - a reasonable default value based on the amount of RAM present in - your system. + Starting with &os; 4.5, the system will auto-tune + maxusers for you if you explicitly set it to + 0 + The auto-tuning algorithm sets + maxusers equal to the amount of memory in the + system, with a minimum of 32, and a maximum of 384. + . In &os; 5.X and above, maxusers + will default to 0 if not specified. If you + are using an version of &os; earlier than 4.5, or you want to + manage it yourself you will want to set + maxusers to at least 4, especially if you are + using the X Window System or compiling software. The reason is that + the most important table set by maxusers is the + maximum number of processes, which is set to 20 + 16 * + maxusers, so if you set maxusers to 1, + then you can only have 36 simultaneous processes, including the 18 + or so that the system starts up at boot time and the 15 or so you + will probably create when you start the X Window System. Even a + simple task like reading a manual page will start up nine + processes to filter, decompress, and view it. Setting + maxusers to 64 will allow you to have up to 1044 + simultaneous processes, which should be enough for nearly all uses. + If, however, you see the dreaded proc table + full error when trying to start another program, or are + running a server with a large number of simultaneous users (like + ftp.FreeBSD.org), you can always + increase the number and rebuild. + + + maxusers does not + limit the number of users which can log into your machine. It + simply sets various table sizes to reasonable values considering + the maximum number of users you will likely have on your system + and how many processes each of them will be running. One keyword + which does limit the number of simultaneous + remote logins and X terminal windows is pseudo-device pty + 16. With &os; 5.X, you do not have to + worry about this number since the &man.pty.4; driver is + auto-cloning; you simply use the line + device pty in your configuration file. + diff --git a/en_US.ISO8859-1/books/handbook/kernelconfig/chapter.sgml b/en_US.ISO8859-1/books/handbook/kernelconfig/chapter.sgml index 3cc4253516..d6dbd1bda7 100644 --- a/en_US.ISO8859-1/books/handbook/kernelconfig/chapter.sgml +++ b/en_US.ISO8859-1/books/handbook/kernelconfig/chapter.sgml @@ -601,59 +601,6 @@ cpu I686_CPU kernel, so it is useful to give the new kernel a different name if you want to keep it separate from your usual kernel (e.g., you want to build an experimental kernel). - - kernel options - maxusers - - - maxusers n - - The maxusers option sets the size of a number - of important system tables. This number is supposed to be roughly - equal to the number of simultaneous users you expect to have on your - machine. - - Starting with &os; 4.5, the system will auto-tune this setting - for you if you explicitly set it to 0 - The auto-tuning algorithm sets maxusers equal - to the amount of memory in the system, with a minimum of 32, and a - maximum of 384.. - In &os; 5.X and above, maxusers will default to - 0 if not specified. If you are using an - version of &os; earlier than 4.5, or you want to manage it - yourself you will want to set - maxusers to at least 4, especially if you are - using the X Window System or compiling software. The reason is that - the most important table set by maxusers is the - maximum number of processes, which is set to 20 + 16 * - maxusers, so if you set maxusers to 1, - then you can only have 36 simultaneous processes, including the 18 - or so that the system starts up at boot time and the 15 or so you - will probably create when you start the X Window System. Even a - simple task like reading a manual page will start up nine processes to - filter, decompress, and view it. Setting - maxusers to 64 will allow you to have up to 1044 - simultaneous processes, which should be enough for nearly all uses. - If, however, you see the dreaded proc table - full error when trying to start another program, or are - running a server with a large number of simultaneous users (like - ftp.FreeBSD.org), you can always - increase the number and rebuild. - - - maxusers does not - limit the number of users which can log into your machine. It - simply sets various table sizes to reasonable values considering - the maximum number of users you will likely have on your system - and how many processes each of them will be running. One keyword - which does limit the number of simultaneous - remote logins and X terminal windows is pseudo-device pty - 16. With &os; 5.X, you do not have to - worry about this number since the &man.pty.4; driver is - auto-cloning; you simply use the line - device pty in your configuration file. - # Floating point support - do not disable. device npx