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

Re: [linux-lvm] Migrating LVM

Ray Morris [support bettercgi com] wrote:
>     pvmove is good for when you have to keep the machine
> live during the copy.  dd is about 10 times as fast if you
> can be down during the copy.  This specific dd invocation
> is the fastest I've found for the purpose, running 2-3 times
> faster than a simple dd without arguments:
> dd if=/dev/old_vg/$1 bs=64M iflag=direct | dd of=/dev/new_vg/$1 bs=64M  
> oflag=direct

Interesting! You are doing direct I/O to avoid copying from cache to user
buffer for read and vice-versa for write, but you are losing the ability
to do them parallel! You are doing the next best, that is creating two
"dd" threads -- one for reading and another for writing. Since the pipe
is really implemented in memory, why should this be faster than normal
"dd" that uses page cache? Likely that kswapd is not kicking early

Enhancing "dd" to create a reader and a writer thread would really
help, I believe.

Thanks, Malahal.

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