ulimit -n vs client_limit vs process_limit

Joseph Tam jtam.home at gmail.com
Sat Dec 19 05:12:09 EET 2020


On Thu, 17 Dec 2020, Aki Tuomi wrote:

>> What should I set "ulimit -n" relative to client_limit? Or perhaps I've roofed
>
> You need to adjust LimitNOFiles (or ulimit -n).  Dovecot needs more
> file descriptors than just the ones used by imap-login process, so it
> is a good idea to consider setting it to at least 3x time the value.

Thanks, good to know.

Out of curiosity, I did a snapshot of FD usage for dovecot's supervisory
processes:

 	# for p in imap-login config log auth pop3-login stats dovecot anvil; do
 	#	echo "$p \c"; ls /proc/`pgrep -f /$p`/fd | wc -l
 	# done

 	imap-login     357
 	config      14
 	log      38
 	auth      22
 	pop3-login      20
 	stats     193
 	dovecot     221
 	anvil      18

I guess "dovecot" or "stat" are the particular processes that needs to
have FD limits set larger than to the sum of client_limits.

Joseph Tam <jtam.home at gmail.com>


More information about the dovecot mailing list