linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zkabelac@redhat.com>
To: Ray Morris <support@bettercgi.com>
Cc: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] copy lv from lv?
Date: Tue, 05 Apr 2011 23:10:20 +0200	[thread overview]
Message-ID: <4D9B853C.9040506@redhat.com> (raw)
In-Reply-To: <20110405112527.367a0bff@bettercgi.com>

Dne 5.4.2011 18:25, Ray Morris napsal(a):
>> Isn't this already done in a better way by 'dd' using 'zero' copy
>> mechanism ?? (assuming it is already using either  'mmap()' ->
>> 'write()' or 'splice()'  as your proposed piped copy is doing a lot
>> of pointless memory copies and cache trashing.
> 
> No, with directio there isn't "a lot of pointless memory copies 
> and cache trashing". There are in fact fewer mempoy copies than 
> there would be with a simple:
> dd if=thing of=thing
> 
> See:
> http://www.ukuug.org/events/linux2001/papers/html/AArcangeli-o_direct.html
> 

Seem like 10 years old paper for 2.4.6 kernel - so I do not think it still
applies to upstream 2.6.38 - thought I've not made any recent measuring myself.

> The proof of the pudding is in the eating, and in fact that 
> recipe is extremely fast, for this application (sequential 
> copy of GBs from one device to another). I spent a couple 
> of hours testing before spending hundreds of hours copying.
> My bottom line was speed, so I didn't even look at memory
> usage or CPU.  I would't mind using an extra 64 MB in order
> to get my copying done 30 hours faster.

The kernel should be able to use as much free memory as you have - and
when it's properly configured - disk flushing running in separate thread
should ensure maximal throughput.

If you are experiencing significant performance degradation with usage of
single  'dd'  with two different driver compared with 2 piped 'dd' - you
should probably make a report on lkml list - There is something broken if you
gain 'hours' like you said by piping 2 dd commands.

(I don't have fast enough arrays myself for such playing)

Zdenek

  reply	other threads:[~2011-04-05 21:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-29 12:53 [linux-lvm] copy lv from lv? yue
2011-03-29 17:48 ` Ray Morris
2011-03-30 13:49 ` yue
2011-03-30 18:28   ` Ray Morris
2011-03-31  0:27     ` Stuart D. Gathman
2011-03-31 12:15       ` Zdenek Kabelac
2011-04-05 16:25         ` Ray Morris
2011-04-05 21:10           ` Zdenek Kabelac [this message]
2011-04-05 21:29             ` [linux-lvm] Taking it off list - " Ray Morris
2011-04-01  2:46     ` [linux-lvm] " yue

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=4D9B853C.9040506@redhat.com \
    --to=zkabelac@redhat.com \
    --cc=linux-lvm@redhat.com \
    --cc=support@bettercgi.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;
as well as URLs for NNTP newsgroup(s).