From: Wu Fengguang <fengguang.wu@intel.com>
To: Fernando Silveira <fsilveira@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: I/O and pdflush
Date: Sun, 12 Jul 2009 16:04:10 +0800 [thread overview]
Message-ID: <20090712080410.GA8512@localhost> (raw)
In-Reply-To: <6afc6d4a0907111027w76234c8fv11ab77864515fdb0@mail.gmail.com>
On Sat, Jul 11, 2009 at 02:27:25PM -0300, Fernando Silveira wrote:
> Hi.
>
> I'm having a hard time with an application that writes sequentially
> 250GB of non-stop data directly to a solid state disk (OCZ SSD CORE
> v2) device and I hope you can help me. The command "dd if=/dev/zero
> of=/dev/sdc bs=4M" reproduces the same symptoms I'm having and writes
> exactly as that application does.
>
> The problem is that after some time of data writing at 70MB/s, it
> eventually falls down to about 25MB/s and does not get up again until
> a loooong time has passed (from 1 to 30 minutes). This happens much
> more often when "vm.dirty_*" settings are default (30 secs to expire,
> 5 secs for writeback, 10% and 40% for background and normal ratio),
> and when I set them to 1 second or even 0, the problem happens much
> less often and the sticking period of 25MB/s is much lower.
>
> In one of my experiences, I could see that writing some blocks of of
> data (aprox. 48 blocks of 4MB each time) at a random position of the
> "disk" increases the chances of decreasing the writing rate to 25MB/s.
> You can see at this graph[1] that after the 7th random big write (at
> 66 GB) it falls down to 25MB/s. The writes happened at the following
> positions (in GB): 10, 20, 30, 39, 48, 57, 66, 73, 80, 90, 100, 109,
> 118, 128, 137, 147, and 156 GB.
>
> As I don't know much about kernel internals, IMHO it might be the SSD
> might be "hiccuping" and some kind of kernel I/O scheduler or pdflush
> decreases its rate to avoid write errors, I don't know.
>
> Could somebody tell me how could I debug the kernel and any of its
> modules to understand exactly why the writing is behaving this way?
> Maybe I could do it just by logging write errors or something, I don't
> know. Telling me which part I should start analyzing would be a huge
> hint, seriously.
>
> Thanks.
>
> 1. http://rootshell.be/~swrh/ssd-tests/ssd-no_dirty_buffer_with_random_192mb_writes.png
>
> PS: This is used with two A/D converters which provide 25MB/s of data
> each, leading my writing software to need at least 50MB/s of
> sequential writing rate.
Hi Fernando,
What's your kernel version? Can the following patch help?
Thanks,
Fengguang
---
fs/fs-writeback.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- mm.orig/fs/fs-writeback.c
+++ mm/fs/fs-writeback.c
@@ -325,7 +325,8 @@ __sync_single_inode(struct inode *inode,
* soon as the queue becomes uncongested.
*/
inode->i_state |= I_DIRTY_PAGES;
- if (wbc->nr_to_write <= 0) {
+ if (wbc->nr_to_write <= 0 ||
+ wbc->encountered_congestion) {
/*
* slice used up: queue for next turn
*/
next prev parent reply other threads:[~2009-07-12 8:04 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-11 17:27 I/O and pdflush Fernando Silveira
2009-07-12 8:04 ` Wu Fengguang [this message]
2009-08-28 21:48 ` Fernando Silveira
2009-08-29 10:12 ` Wu Fengguang
2009-08-29 10:21 ` Wu Fengguang
2009-08-31 13:24 ` Fernando Silveira
2009-08-31 14:00 ` Wu Fengguang
2009-08-31 14:01 ` Wu Fengguang
2009-08-31 14:07 ` Wu Fengguang
2009-08-31 14:33 ` Fernando Silveira
2009-09-01 8:14 ` Wu Fengguang
[not found] ` <6afc6d4a0909010710l2cf77fbbmb1ab192ed12a7efc@mail.gmail.com>
2009-09-02 3:05 ` Wu Fengguang
[not found] ` <6afc6d4a0909020429l2bfecee9xd00527fcaa323751@mail.gmail.com>
[not found] ` <20090902125057.GA7982@localhost>
[not found] ` <6afc6d4a0909031346qda0b17coe4c60250fcac827f@mail.gmail.com>
2009-09-04 2:21 ` Wu Fengguang
2009-09-04 2:34 ` Wu Fengguang
[not found] <cWOyL-3Ys-15@gated-at.bofh.it>
2009-08-31 21:57 ` Daniel J Blueman
2009-09-01 14:33 ` Fernando Silveira
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=20090712080410.GA8512@localhost \
--to=fengguang.wu@intel.com \
--cc=fsilveira@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.