From: Bill Davidsen <davidsen@tmr.com>
To: Ian Dall <ian@beware.dropbear.id.au>
Cc: Mario <mgiammarco@gmail.com>, linux-raid@vger.kernel.org
Subject: Re: It is possible to put write cache on ssd?
Date: Tue, 08 Jun 2010 15:28:26 -0400 [thread overview]
Message-ID: <4C0E99DA.8010309@tmr.com> (raw)
In-Reply-To: <1275972895.4313.51.camel@sibyl.beware.dropbear.id.au>
Ian Dall wrote:
> On Mon, 2010-06-07 at 15:14 -0400, Bill Davidsen wrote:
>
>> Mario wrote:
>>
>>> [...]
>>> So I ask: if I add a fast (with little size) ssd to a linux server is there a
>>> way for linux md raid to use it as a cache to have safer writes and faster raid?
>>>
>>> Thanks in advance for interest.
>>>
>>>
>> Actually playing with that now. I got an Intel SATA 40GB SSD, and I am
>> trying various combinations of things to put on it. One thing which I
>> hoped would benefit was to put a f/s journal on SSD and then use the
>> option to push all through the journal (data=journal) in hopes that it
>> would then free the RAM needed for cache and thus speed operation.
>>
>> Since none of that has generated the performance I hoped,
>>
>
> Interesting. If its the X25-V that you have, write performance is
> nothing to write home about even compared to a single hard drive, let
> alone a raid. By journaling data as well (as metadata), you just add
> extra write overhead, possibly even a new bottleneck.
>
>
There was a claim that if you use journaled data that the memory buffers
would be released after the journal was written. Looking at the code I
didn't think so, but the idea was that a burst of less than 10GB or so
would get out of memory to the SSD and then be pulled back more slowly
without blowing everything out of memory cache. Always good to actually
try stuff than look at the code and pontificate about what it will do
under dynamic conditions.
The best thing I found was some code I was playing with in 2.6.27 or so,
which limited the cache used by any one fd, so that there was cache for
other programs. This shortened the initial fast write speed (write were
going to buffer, not disk) but didn't hurt 10GB write time, and left the
system working for other programs.
> What happens if you journal only the metadata? The hoped for advantage
> would be to avoid seeks between the areas used for the journal and the
> data.
>
>
I've tried putting the journal (and bitmap) on other devices, even on a
ramdisk, it only helps for certain load.
> The characteristics of these SSD devices seems to be that they get
> faster as they get bigger (like the chips are effectively in a kind of
> raid).
>
>
>> I'm now
>> looking at a kernel patch to overflow the cache in RAM into the SSD,
>> stealing code from the mmap to make some address space on the SSD.
>>
>
> Again, I wonder if write performance is good enough for this to pay off.
> How does that compare with just using the ssd for swap and possibly
> tweaking some parameters to encourage the kernel to use swap more? This
> would effectively free up more ram for buffers.
>
>
>> At
>> the moment that works poorly (ok, doesn't work) and I'm going to have to
>> rethink the way I do things and probably write a whole bunch of code to
>> do it. Not sure if I want to do that, it's unlikely to be a candidate
>> for mainline unless I put a ton of time into learning the corner cases.
>>
>> I also played with mirroring and write mostly, etc. Does provide a
>> general solution, at least in my tests.
>>
>
> Do you mean "does NOT"?
>
>
>
--
Bill Davidsen <davidsen@tmr.com>
"We can't solve today's problems by using the same thinking we
used in creating them." - Einstein
next prev parent reply other threads:[~2010-06-08 19:28 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-04 8:52 It is possible to put write cache on ssd? Mario
2010-06-07 19:14 ` Bill Davidsen
2010-06-08 4:54 ` Ian Dall
2010-06-08 19:28 ` Bill Davidsen [this message]
2010-06-08 22:48 ` David Rees
2010-06-09 9:31 ` Ian Dall
2010-06-08 7:31 ` Mario
2010-06-08 12:23 ` CoolCold
2010-06-09 7:49 ` Mario
2010-06-09 11:06 ` MRK
2010-06-09 16:21 ` Aryeh Gregor
2010-06-10 12:08 ` MRK
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=4C0E99DA.8010309@tmr.com \
--to=davidsen@tmr.com \
--cc=ian@beware.dropbear.id.au \
--cc=linux-raid@vger.kernel.org \
--cc=mgiammarco@gmail.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.