Many IDLE imap processes but very few connections moved to imap-hibernate

2023-04-26 Thread pierre . alletru
Hi Dovecot community!

I have a strange issue with imap-hibernate. Or more likely it behaves as it's 
supposed to and it's just that I don't really understand it.

I have enabled it, and it works, but for some reason hibernation happens only 
to a tiny amount of connections, whereas I have a lot of IDLE imap processes. 
And I can't find any relevant errors in the logs.

##  config ##
mail_debug = yes
verbose_proctitle = yes

$ doveconf imap_hibernate_timeout
imap_hibernate_timeout = 5 secs
$ doveconf -a | grep -A 21 'service imap-hibernate'
service imap-hibernate {
  chroot = 
  client_limit = 0
  drop_priv_before_exec = no
  executable = imap-hibernate
  extra_groups = 
  group = 
  idle_kill = 0
  privileged_group = 
  process_limit = 0
  process_min_avail = 0
  protocol = imap
  service_count = 0
  type = 
  unix_listener imap-hibernate {
group = $default_internal_group
mode = 0660
user = 
  }
  user = $default_internal_user
  vsz_limit = 18446744073709551615 B
}

## imap processes ##

$ ps aux | grep "dovecot/imap" | wc -l
2214
ps aux | grep "dovecot/imap" | grep IDLE | wc -l
1258
$ ps aux | grep "imap-hibernate"
syslog   1571453  0.0  0.0   4748  3156 ?S15:44   0:00 
dovecot/imap-hibernate [18 connections]

As you can see here I have 1258 IDLE imap processes (out of 2214 in total), and 
only 18 connections in imap-hibernate. I'd like to have all IDLE processes to 
be moved to imap-hibernate in order to save up memory.

Any idea why these 1k+ IDLE imap processes are not moved into imap-hibernate?

Thank you!
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Multiple backends with NFSv4.1 (supports file locking): should work without Director, right?

2023-05-19 Thread pierre . alletru
Hi Dovecot community,

We're looking at running multiple Dovecot backend servers in parallel, all 
using the same shared NFSv4.1 mount to store mailboxes in the maildir format.

We've read in multiple places that running multiple backends with a shared NFS 
can result in issues like index files corruption. The standard solution seems 
to use the Director feature, or some kind of IP based proxy/load balancer.

But:
1 - The Director feature will be removed in future free versions of Dovecot 
(https://dovecot.org/mailman3/archives/list/dovecot@dovecot.org/thread/ILA3C6DF46ETWPCJJLENVHVFNFZFMU2Q/#JC5TRSQEGXVZCSZADHPY3GSXHYEXYAK7).
2 - NFSv4 and above support file locking (flock and fcntl, flock being emulated 
using fcntl).
3 - It looks like Dovecot does use file locking, though we're unsure if it does 
on everything and in particular on index files.

Thus, we are wondering if the need for Director is still relevant with NFSv4? 
Shouldn't it work without Director thanks to file locking? Has anyone tried it? 
We're thinking that the documentation and various threads on the subject may be 
outdated, based on NFSv3 and lower (no file locking).

If it doesn't work, anybody knows why? Isn't file locking there precisely to 
handle concurrency?

Thanks!
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org