All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shaohua Li <shli@fb.com>
To: linux-raid@vger.kernel.org
Cc: neilb@suse.com, songliubraving@fb.com, kernel-team@fb.com
Subject: [PATCH 2/3] md/raid5-cache: bump flush stripe batch size
Date: Fri, 17 Feb 2017 15:32:25 -0800	[thread overview]
Message-ID: <52a5e6f8924b9a19d4ec4ad73f6e7087f36f139d.1487373517.git.shli@fb.com> (raw)
In-Reply-To: <cover.1487373517.git.shli@fb.com>

Bump the flush stripe batch size to 2048. For my 12 disks raid
array, the stripes takes:
12 * 4k * 2048 = 96MB

This is still quite small. A hardware raid card generally has 1GB size,
which we suggest the raid5-cache has similar cache size.

The advantage of a big batch size is we can dispatch a lot of IO in the
same time, then we can do some scheduling to make better IO pattern.

Last patch prioritizes stripes, so we don't worry about a big flush
stripe batch will starve normal stripes.

Signed-off-by: Shaohua Li <shli@fb.com>
---
 drivers/md/raid5-cache.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/raid5-cache.c b/drivers/md/raid5-cache.c
index 3f307be..b25512c 100644
--- a/drivers/md/raid5-cache.c
+++ b/drivers/md/raid5-cache.c
@@ -43,7 +43,7 @@
 /* wake up reclaim thread periodically */
 #define R5C_RECLAIM_WAKEUP_INTERVAL (30 * HZ)
 /* start flush with these full stripes */
-#define R5C_FULL_STRIPE_FLUSH_BATCH 256
+#define R5C_FULL_STRIPE_FLUSH_BATCH 2048
 /* reclaim stripes in groups */
 #define R5C_RECLAIM_STRIPE_GROUP (NR_STRIPE_HASH_LOCKS * 2)
 
-- 
2.9.3


  parent reply	other threads:[~2017-02-17 23:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-17 23:32 [PATCH 0/3]md/raid5: improve IO pattern Shaohua Li
2017-02-17 23:32 ` [PATCH 1/3] md/raid5: prioritize stripes for writeback Shaohua Li
2017-02-17 23:32 ` Shaohua Li [this message]
2017-03-03  3:03   ` [PATCH 2/3] md/raid5-cache: bump flush stripe batch size NeilBrown
2017-03-03 17:41     ` Shaohua Li
2017-03-06  6:23       ` NeilBrown
2017-03-07 20:50         ` Shaohua Li
2017-02-17 23:32 ` [PATCH 3/3] md/raid5: sort bios Shaohua Li
2017-03-03  3:43   ` NeilBrown
2017-03-03 17:59     ` Shaohua Li
2017-03-06  6:40       ` NeilBrown
2017-03-07 20:23         ` Shaohua Li

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=52a5e6f8924b9a19d4ec4ad73f6e7087f36f139d.1487373517.git.shli@fb.com \
    --to=shli@fb.com \
    --cc=kernel-team@fb.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@suse.com \
    --cc=songliubraving@fb.com \
    /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.