On 9/21/2012 4:32 AM, Tomáš Randa wrote:
Hello,
I still cannot get dovecot running with more then 1000 processes, but hard limit is 8192 per user in box. I tried everything, including modifying startup script of dovecot to set ulimit -u 8192.
What is your value for kern.maxusers? Did you try increasing it? Note in the 2nd paragraph below the relationship between kern.maxusers and process limit. From what you describe it would seem you have a process limit of 1044, thus a kern.maxusers value of 64. Considering your manual setting of 8192 processes is apparently being ignored, it would seem the kern.maxusers value is causing it to be overridden. From:
http://www.pl.freebsd.org/doc/handbook/configtuning-kernel-limits.html
As of FreeBSD 4.5, kern.maxusers is automatically sized at boot based on the amount of memory available in the system, and may be determined at run-time by inspecting the value of the read-only kern.maxusers sysctl. Some sites will require larger or smaller values of kern.maxusers and may set it as a loader tunable; values of 64, 128, and 256 are not uncommon. We do not recommend going above 256 unless you need a huge number of file descriptors; many of the tunable values set to their defaults by kern.maxusers may be individually overridden at boot-time or run-time in /boot/loader.conf (see the loader.conf(5) man page or the /boot/defaults/loader.conf file for some hints) or as described elsewhere in this document. Systems older than FreeBSD 4.4 must set this value via the kernel config(8) option maxusers instead.
In older releases, the system will auto-tune maxusers for you if you explicitly set it to 0[1]. When setting this option, 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.
-- Stan