[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [linux-lvm] copy lv from lv?



Dne 31.3.2011 02:27, Stuart D. Gathman napsal(a):
> On Wed, 30 Mar 2011, Ray Morris wrote:
> 
>>> 1..how to pipe two copy  together
>>
>> This is what I use after some experimenting.  I've found
>> it's often far faster than the more obvious use of dd:
>>
>> nice -5 dd if=/dev/clones/from bs=64M iflag=direct |
>>        dd of=/dev/scratch/to bs=64M oflag=direct
>>
>> I use 64 MB extents. For smaller extents, a matching dd
>> block size might be good.
> 
> Thanks for that recipe.  It ought to be in lvm2 as an lvcopy utility
> (dynamically determining extent size, etc).
> 


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.

If it's still faster - then your kernel setting for buffering are most probaly
not tuned for the best performance.

Zdenek


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]