Re: Slow reading of large dovecot-uidlist files

2016-04-12 Thread Steffen Kaiser
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, 12 Apr 2016, Bostjan Skufca wrote: 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

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

Re: Slow reading of large dovecot-uidlist files

2016-04-12 Thread Timo Sirainen
On 09 Apr 2016, at 21:04, Bostjan Skufca wrote: > > 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"

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

Re: Slow reading of large dovecot-uidlist files

2016-04-12 Thread Steffen Kaiser
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, 12 Apr 2016, Bostjan Skufca wrote: 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,

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

Re: Slow reading of large dovecot-uidlist files

2016-04-12 Thread A.L.E.C
On 04/10/2016 10:27 AM, Adrian Minta wrote: > It will be nice if the "SELECT MyMailbox" command will be "SELECT > mymailbox LIMIT 100" or something, to get the first files since only the > last messages are shown to the user. SELECTing a mailbox has nothing to do with FETCHing messages, so above

Re: Slow reading of large dovecot-uidlist files

2016-04-10 Thread Bostjan Skufca
I tested this by timestamping tcpdump output while issuing this command directly to dovecot (limit 100 works, but does nothing) and there is no difference, it keeps taking ~160ms to respond. b. On 10 April 2016 at 10:27, Adrian Minta wrote: > It will be nice if the

Re: Slow reading of large dovecot-uidlist files

2016-04-10 Thread Adrian Minta
It will be nice if the "SELECT MyMailbox" 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 wrote: Hi there,

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