From: Pierre Beck <debian-bugs@pierre-beck.de>
To: dm-devel@redhat.com
Subject: dm-cache policy mq: promotion very picky?
Date: Mon, 13 May 2013 23:23:04 +0200 [thread overview]
Message-ID: <519159B7.3030205@pierre-beck.de> (raw)
Hi,
experimenting with dm-cache, I came across the following issue:
Having a rather large SSD available, I wanted to promote sequential I/O
just like random I/O. Recurring sequential I/O is just as bad in a
multi-user scenario, especially with unpromoted random I/O mixed in. So
my dmsetup line looks like this:
# dmsetup create hybridStorage --table "0 7771064048 cache
/dev/disk/by-id/xxx-part4 /dev/disk/by-id/yyy-part3 /dev/md/zzz 512 1
writethrough mq 4 sequential_threshold 4294967295 random_threshold 0";
(I would appreciate a parameter to just turn random I/O detection off, btw.)
On top of "hybridStorage" an ext4 with external journal. Then, I repeat:
# echo 1 > /proc/sys/vm/drop_caches; pv smallwrite.0 > /dev/null
And watch a dstat with all relevant partitions. The 70 MB file
"smallwrite.0" is always being read from HDD and never gets promoted.
Only a few blocks got promoted at some point in the past.
# echo 1 > /proc/sys/vm/drop_caches; ioping -R smallwrite.0
This doesn't promote blocks, either, although it is random I/O.
# echo 1 > /proc/sys/vm/drop_caches; ioping -s 1m -R smallwrite.0
This does promote a few blocks every iteration.
# dd if=/dev/zero of=testfile bs=4096 count=100000; sync
This file was promoted halfway. Again, just piping it with pv doesn't
promote any blocks. Piping with "cat" does promote a few blocks every
iteration.
All in all, dm-cache policy mq seems to be very hesitant (way too
hesitant for my taste) promoting blocks, even with sequential I/O allowed.
Maybe I'm misunderstanding how the heuristics work - what makes mq pick
a block for promotion?
Regards,
Pierre Beck
next reply other threads:[~2013-05-13 21:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-13 21:23 Pierre Beck [this message]
2013-05-14 13:44 ` dm-cache policy mq: promotion very picky? Joe Thornber
2013-05-14 18:16 ` Darrick J. Wong
2013-05-15 10:26 ` Joe Thornber
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=519159B7.3030205@pierre-beck.de \
--to=debian-bugs@pierre-beck.de \
--cc=dm-devel@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox