All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stan Hoeppner <stan@hardwarefreak.com>
To: CoolCold <coolthecold@gmail.com>
Cc: Linux RAID <linux-raid@vger.kernel.org>
Subject: Re: raid(1) and block caching
Date: Sat, 29 Oct 2011 00:20:12 -0500	[thread overview]
Message-ID: <4EAB8D0C.90908@hardwarefreak.com> (raw)
In-Reply-To: <CAGqmV7p+GP-Ou-zUhq2rBb_9_tAEX6PRtQatvLCG9=FuOPNsow@mail.gmail.com>

On 10/28/2011 11:49 PM, CoolCold wrote:
> Hello!
> 
> There is holywar once again on nginx maillist about standalone drives
> vs raid1 arrays for serving static files. By standalone drives it is
> assumed that file "Filename1" exist on /mnt/disk1, /mnt/disk2,
> /mnt/diskN where /mnt/diskX is mountpoint for drives /dev/sdY.
> 
> As there are some pros and cons on both sides (at least theoretically)
>  I have dumb question - let's say our array md1 consists on 3 drives -
> /dev/sd{a,b,c} - and when data read from md1 occurs, which block is
> cached in VFS (or may be other cache in system, it would be nice to
> know which part of system is doing caching)  - the block from md1
> itself or from certain drive? If it is drive-based block cache, it's
> gonna be potentially memory wasting to keep 3 similar data copies, so
> I assume md does data reads with something like O_DIRECT flag, but as
> I 1) don't know C 2) don't know kernel, I'm asking this on the list to
> make this clean for myself.

If this is for a single web server, who cares?  If this is a farm,
again, who cares?  In the case of a single server you're not concerned
with performance or you'd have a farm.  In the case of a farm, one will
store all of the static content on a central NFS/SMB server for easy
administration of content.  In the NFS/SMB case you can even PXE boot
diskless farm servers.  Now, does it make a difference where the cached
files/blocks reside, or simply that we've cached them in RAM for faster
access?  And does it make a difference which kernel component is doing
the caching, and whether it's block or file level caching?  I say it
doesn't matter one bit in the real world.

If one is *that* concerned with file access latency one will pre-load
all the static files into a RAMdisk anyway, eliminating this argument
altogether.

-- 
Stan

  reply	other threads:[~2011-10-29  5:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-29  4:49 raid(1) and block caching CoolCold
2011-10-29  5:20 ` Stan Hoeppner [this message]
2011-10-29  6:26 ` NeilBrown
2011-10-30 11:07   ` CoolCold
2011-10-30 12:36   ` John Robinson
2011-10-31 18:53     ` CoolCold

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=4EAB8D0C.90908@hardwarefreak.com \
    --to=stan@hardwarefreak.com \
    --cc=coolthecold@gmail.com \
    --cc=linux-raid@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.