From: Arnd Bergmann <arnd@arndb.de>
To: Felipe Contreras <felipe.contreras@gmail.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Big I/O latencies, except when iotop is hooked
Date: Wed, 9 May 2012 17:56:15 +0000 [thread overview]
Message-ID: <201205091756.16050.arnd@arndb.de> (raw)
In-Reply-To: <CAMP44s2eVtquLoB6Zjbs4nGVKP6e=Dxse4uicL4s8vmrFeJdTQ@mail.gmail.com>
On Wednesday 09 May 2012, Felipe Contreras wrote:
> I've been noticing big I/O latencies when doing operations with
> notmuch (xapian database), the operations are quite simple and
> probably should not need a lot of I/O, however, they seen to take a
> long time, sometimes even seconds. But when I hook iotop (-p pid), the
> latency goes away, and every operation is reliably instantaneous
> (basically).
>
> Do you have any ideas what might be causing this delay, and why is
> iotop making it go away?
>
> BTW. This is an ext4 encrypted partition on a USB stick, I tried
> different mount options without any noticeable change. I tried to copy
> the data to my SSD drive and do the same operations, while it was much
> faster, it still seemed to have some delays triggered randomly. This
> is with v3.3.5.
USB sticks like most other cheap flash media tend to have long latencies
because of the effects I describe on https://lwn.net/Articles/428584/.
I don't know if you have the chance to run flashbench[1] on it (which
will destroy the data for the partition you are testing), but that
should at least tell you if it's a problem with the drive.
You can also use the information from that and combine it with
a blocktrace log and flashsim[2] to see where the actual latencies
are expected to happen.
The first thing you should check is whether the partitions are
properly aligned, using 'fdisk -l -u /dev/sdX'.
Of course none of this will tell you why iotop makes any difference.
Arnd
[1] http://git.linaro.org/gitweb?p=people/arnd/flashbench.git
[2] http://yxit.co.uk/public/flash-performance/flashsim/
next prev parent reply other threads:[~2012-05-09 17:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-09 16:20 Big I/O latencies, except when iotop is hooked Felipe Contreras
2012-05-09 17:56 ` Arnd Bergmann [this message]
2012-05-09 20:16 ` Felipe Contreras
2012-05-09 20:43 ` Arnd Bergmann
2012-05-09 22:19 ` Felipe Contreras
2012-05-10 10:49 ` Arnd Bergmann
2012-05-14 8:59 ` Arnd Bergmann
2012-05-14 9:08 ` Felipe Contreras
2012-05-10 8:24 ` Felipe Contreras
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=201205091756.16050.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=felipe.contreras@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/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