Gnus development mailing list
 help / color / mirror / Atom feed
From: Simon Josefsson <jas@extundo.com>
Cc: ding@hpc.uh.edu
Subject: Re: nnimap slowness
Date: Sun, 30 Mar 2003 21:20:20 +0200	[thread overview]
Message-ID: <ilullywzmob.fsf@latte.josefsson.org> (raw)
In-Reply-To: <ullz7qlun.fsf@boost-consulting.com> (David Abrahams's message of "Sat, 22 Mar 2003 13:48:00 -0500")

David Abrahams <dave@boost-consulting.com> writes:

>> For small data, the cause is much more likely to be server slowness or
>> network latency, so please send try sending a 5MB attachment or
>> something.
>
> OK, here:

Function Name                       Call Count  Elapsed Time  Average Time
==================================  ==========  ============  ============
gnus-summary-reselect-current-group      1           8.132         8.132
gnus-summary-rescan-group                1           8.132         8.132
nnimap-request-group                     2           6.43          3.215
imap-send-command-wait                  14          6.339         0.4527857142
imap-wait-for-tag                       14          6.339         0.4527857142
nnimap-request-update-info-internal      2           6.2989999999  3.1494999999
imap-search                             11          5.927         0.5388181818
gnus-group-get-new-news-this-group       1           4.055         4.055
gnus-summary-read-group                  1           3.586         3.586
gnus-group-read-group                    1           3.586         3.586
gnus-summary-read-group-1                1           3.586         3.586
gnus-select-newsgroup                    1           3.526         3.526
gnus-activate-group                      1           3.465         3.465
gnus-request-group                       1           2.965         2.965
gnus-retrieve-headers                    2           0.58          0.29
...

It seems the IMAP SEARCH command is causing the delay (most of the
nnimap related delay is in imap-search), suggesting that the server
opens large messages when the SEARCH command is invoked.  This is
unnecessary, since Gnus only searches for flags (unseen, seen, ticked,
etc).  Perhaps you could forward this observation (after verifying it
in the source) to the IMAP server administrator/developers to have
them improve searches for flags.

> But I still think the fact that I get the "imap read: ..." dance
> counting up to 27K *twice* when I do `M-G' and receive no messages is
> highly suspicious.

I don't think so -- that is displayed when imap.el waits for feedback
from the server.  M-g causes many commands to be sent to the server,
several of which are SEARCH commands (see *imap-log*), so if more than
one command takes time, that message is displayed.

>> To find out what causes slowness for small data, you must tcpdump or
>> ethereal the stream to see which side is delaying the transfer, or if
>> it is the network that has high latency.  ELP data isn't that useful
>> in this case.
>
> I got myself a copy of Ethereal and captured packets from a `M-G', but
> I have no clue yet as to how to get any useful information from what
> I'm seeing...
>
> ...I hate to keep harping on this, but it really has the look/feel of
> some inefficiency in what GNUs is doing.
>
> Looking at the packets one more time it sure looks very much as though
> GNUs is receiving the same sequence of packets (about 27K worth) twice
> from the IMAP server, though it's pretty hard for me to tell
> anything, especially peering through SSL encoding.

Right, you need to get a protocol dump with timestamps of the IMAP
connection.

Gnus do send several SEARCH commands, and this is quite inefficient,
but I believe fixing this would require changing the Gnus backend
interface, and that means work.  Several servers implement flag
searching without opening all articles though, so many people don't
have this problem.




  reply	other threads:[~2003-03-30 19:20 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-21 21:51 David Abrahams
2003-03-22  0:54 ` Simon Josefsson
2003-03-22  1:21   ` David Abrahams
2003-03-22  3:51     ` Simon Josefsson
2003-03-22 16:55       ` David Abrahams
2003-03-22 17:12         ` Simon Josefsson
2003-03-22 17:18           ` David Abrahams
2003-03-22 17:52             ` Simon Josefsson
2003-03-22 18:48               ` David Abrahams
2003-03-30 19:20                 ` Simon Josefsson [this message]
2003-03-30 22:12                   ` David Abrahams
2003-03-31 12:30                     ` Simon Josefsson
2003-03-31 22:31                       ` David Abrahams
2003-04-01 11:20                         ` Simon Josefsson
2003-03-31  1:13                   ` Krzysztof Jędruczyk
2003-03-31 12:33                     ` Simon Josefsson
2003-03-31 16:51                     ` Lars Magne Ingebrigtsen
2003-03-31 17:18                       ` Lars Magne Ingebrigtsen
2003-03-31 17:25                       ` Simon Josefsson
2003-04-13 13:45                       ` Krzysztof Jędruczyk
2003-04-18 13:50                         ` David Abrahams
2003-04-18 15:16                           ` David Abrahams
2003-04-19 18:34                             ` Kai Großjohann
2003-04-18 15:44                           ` David Abrahams
2003-04-19 18:35                             ` Kai Großjohann
2003-04-20  9:28                               ` David Abrahams
2003-04-18 19:01                           ` A.J. Rossini
2003-04-18 19:19                             ` David Abrahams
2003-04-19  6:28                               ` Steinar Bang
2003-04-19 20:07                               ` Frank Schmitt
2003-03-23  3:20               ` David Abrahams
2003-03-22 18:47         ` Jody Klymak
2003-03-24  9:12           ` Niklas Morberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ilullywzmob.fsf@latte.josefsson.org \
    --to=jas@extundo.com \
    --cc=ding@hpc.uh.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).