From: Gordan Bobic <gordan-UpbECiGlrmGsTnJN9+BGXg@public.gmane.org>
To: linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Write-only Caching Without Backing
Date: Fri, 06 Jan 2012 09:50:32 +0000 [thread overview]
Message-ID: <4F06C3E8.3040001@bobich.net> (raw)
Hi,
I'm looking at whether Bcache can be used (or easily modified to be
used) for rectifying the poor random write performance of cheap flash media.
I am aware of the following projects that provide similar functionality
to what I require:
Managed Flash (MFT) (not OSS, purely commercial, requires a substantial
amount of RAM for mapping)
ReSSD (research paper, requires less RAM than MFT, no code available)
Unfortunately, I am specifically interested in this for ARM machines
that frequently don't have SATA ports but only SD card ports. Most SD
cards have exceptionally poor random-write performance, and since the
only semi-solution (MFT requires a substantial amount of RAM which is
also an issue on a 256MB ARM machine) doesn't support ARM, I'm looking
for alternatives.
So what I envisage (hope for?) is using Bcache in a way that does
random-write caching by linearizing writes into sequential writes. My
performance tests indicate that even with small blocks (4KB) and even on
some of the best SD cards, sequential writes are still at least 3-4x
faster than random writes. On the worst SD cards, the difference can be
as much as 100x.
Note that this would involve having a "cache" partition on the same SD card.
However, the random read performance on these is very good (as good as
any flash), and typical measurements are 500-1500 IOPS on random reads.
Therefore, there is no point in caching data for reading, since the read
performance from the cache partition would be the same as the read
performance off the real data source.
The other use case I envisage is for things like swap that don't need to
be persisted across reboots, and thus don't need to be committed back to
backing storage from cache (i.e. it is OK for them to disappear on
reboot). In this use-case, I would like to use Bcache without the
backing storage - simply use it in write-back caching mode without
committing anything back, and re-using blocks as and when they get
over-written (or perhaps use a discard feature for early pruning?).
So to summarize:
1) Can Bcache be configured or relatively easily modified to only do
random-write caching with no read caching (except in cases where there
is a request for written data that hasn't yet been committed to the
backing storage)?
2) Can Bcache be used in full write-back-only mode without backing data
store for non-persistent data?
Thanks.
Gordan
next reply other threads:[~2012-01-06 9:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-06 9:50 Gordan Bobic [this message]
[not found] ` <4F06C3E8.3040001-UpbECiGlrmGsTnJN9+BGXg@public.gmane.org>
2012-01-06 10:56 ` Write-only Caching Without Backing Kent Overstreet
[not found] ` <CAH+dOxKZs7HRqXtvgfO4M3GQTUS078OOwf0jtTM1Gefp05XCRQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-01-06 11:57 ` Gordan Bobic
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=4F06C3E8.3040001@bobich.net \
--to=gordan-upbeciglrmgstnjn9+bgxg@public.gmane.org \
--cc=linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.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.