0

I am running a raw block copy of one ec2 instance to another ec2 instance over a local ssh connection using a large block size of 16MB.

ssh -i ~/.ssh/id_rsa [email protected] 'sudo dd if=/dev/xvda1 bs=16M' | dd of=./monolithic.image.raw

When it starts, I am getting over 700 Mbit/s... Very good, but suddenly about 30 seconds into the copy, it slows down dramatically and reduces to little blurbs/blocks of data:

enter image description here

Any ideas why? Any ideas how to improve network throughput and keep it consistent?

1 Answer 1

1

Using ssh for this is notoriously terrible, unless you're using a custom build of ssh and sshd, like HPN-SSH, which supports encryption of the data stream across multiple cores... Otherwise you'll probably find that one core of the CPU is maxed on one system of the other. Check with "top" or "htop." The latter will make the issue obvious.

If the instance is a t2-class, then performance will deteriorate over time because all of that encryption overhead will deplete your CPU credit balance. Check this too, though it seems unlikely the onset of the deterioration would be so rapid -- depletion of CPU credits from a high initial starting balance takes a few hours.

It's also possible that a contributing factor is that your source volume was never properly warmed up. This is particularly true if the source volume was, at one time, restored from a snapshot.

Speaking of snapshots, of course, an EBS snapshot would be the simplest way of doing a block copy.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .