Slow reading of large dovecot-uidlist files

2016-04-09 Thread Bostjan Skufca
Hi there, (context: I was optimizing Roundcube mailbox list server response, and in that 300-400ms response time, around 170ms is spent on single fgets() call which is waiting IMAP repsonse to "SELECT MyMailbox" command) I straced dovecot and of the whole request/response process, around 30ms is

Re: Slow reading of large dovecot-uidlist files

2016-04-10 Thread Bostjan Skufca
quot; command will be "SELECT > mymailbox LIMIT 100" or something, to get the first files since only the > last messages are shown to the user. > I don't know if "Limit" clause is available over IMAP. > > > > > On 04/09/2016 09:04 PM, Bostjan Skufca wr

Re: Slow reading of large dovecot-uidlist files

2016-04-12 Thread Bostjan Skufca
On 12 April 2016 at 10:23, A.L.E.C wrote: > I don't know dovecot's code, but I suppose it uses uidlist file to get > mailbox statistics that it returns as EXISTS, RECENT, UNSEEN, UIDNEXT, > UIDVALIDITY, etc, which are required by IMAP standard. I don't know, > maybe they could be stored in more o

Re: Slow reading of large dovecot-uidlist files

2016-04-12 Thread Bostjan Skufca
On 12 April 2016 at 14:04, Steffen Kaiser wrote: > > You could try to trace Dovecot and see if there are a lot of syscalls when > a new connection starts up, e.g. with strace or dtruss. Not that many, if I exclude reading the uidlist file contents. See the trace below. does your mailboxes chan

Re: Slow reading of large dovecot-uidlist files

2016-04-12 Thread Bostjan Skufca
On 12 April 2016 at 23:16, Timo Sirainen wrote: > > On 09 Apr 2016, at 21:04, Bostjan Skufca wrote: > > (context: I was optimizing Roundcube mailbox list server response, and in > > that 300-400ms response time, around 170ms is spent on single fgets() call > > which is