linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Luigi Semenzato <semenzato@google.com>
To: Linux Memory Management List <linux-mm@kvack.org>
Subject: extremely long blockages when doing random writes to SSD
Date: Wed, 24 Jun 2015 14:54:09 -0700	[thread overview]
Message-ID: <CAA25o9SCnDYZ6vXWQWEWGDiwpV9rf+S_3Np8nJrWqHJ1x6-kMg@mail.gmail.com> (raw)

Greetings,

we have an app that writes 4k blocks to an SSD partition with more or
less random seeks.  (For the curious: it's called "update engine" and
it's used to install a new Chrome OS version in the background.)  The
total size of the writes can be a few hundred megabytes.  During this
time, we see that other apps, such as the browser, block for seconds,
or tens of seconds.

I have reproduced this behavior with a small program that writes 2GB
worth of 4k blocks randomly to the SSD partition.  I can get apps to
block for over 2 minutes, at which point our hang detector triggers
and panics the kernel.

CPU: Intel Haswell i7
RAM: 4GB
SSD: 16GB SanDisk
kernel: 3.8

>From /proc/meminfo I see that the "Buffers:" entry easily gets over
1GB.  The problem goes away completely, as expected, if I use O_SYNC
when doing the random writes, but then the average size of the I/O
requests goes down a lot, also as expected.

First of all, it seems that there may be some kind of resource
management bug.  Maybe it has been fixed in later kernels?  But, if
not, is there any way of encouraging some in-between behavior?  That
is, limit the allocation of I/O buffers to a smaller amount, which
still give the system a chance to do some coalescing, but perhaps
avoid the extreme badness that we are seeing?

Thank you for any insight!

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

             reply	other threads:[~2015-06-24 21:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-24 21:54 Luigi Semenzato [this message]
2015-06-24 22:25 ` Andrew Morton
2015-06-24 23:43   ` Luigi Semenzato
2015-06-25 18:24     ` Luigi Semenzato
2015-06-26  0:58       ` Sergey Senozhatsky
2015-06-26  1:31         ` Luigi Semenzato
2015-06-26  1:42           ` Sergey Senozhatsky
2015-06-26  1:43             ` Luigi Semenzato
2015-06-26 18:24               ` Luigi Semenzato

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=CAA25o9SCnDYZ6vXWQWEWGDiwpV9rf+S_3Np8nJrWqHJ1x6-kMg@mail.gmail.com \
    --to=semenzato@google.com \
    --cc=linux-mm@kvack.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