-1

I am using scp to copy a file from remote server to local and it is working as expected.

scp remote_server.com:/data/ar_uw2a_vol_0286036c_2012-04-24-05-35-00 . 

I have 2 questions:

1) Since I am copying file from production server, I do not want to affect the performance if scp takes time. Does this operation affect the performance of remote server?

2) Is there any better / faster way to copy a file? The file is already going to be different (name based on current date and time)

4
  • scp has a limit option to limit the bandwidth used. It also winds up limiting the CPU and disk usage too, but you can use nice/ionice and whatever other tools your platform offers to minimize its impact. Apr 24, 2012 at 5:49
  • 3
    Everything affects performance. You need to be more specific as to what you're concerned about...
    – voretaq7
    Apr 24, 2012 at 5:55
  • You can use rsync if u want to speed up the transfer.
    – Alan
    Apr 24, 2012 at 5:59
  • shantanuo: if your server is such fragile you need to be concerned about single scp instance, you have bigger problems waiting for you. Apr 24, 2012 at 6:24

1 Answer 1

4

Since I am copying file from production server, I do not want to affect the performance if scp takes time. Does this operation affect the performance of remote server?

Define "performance." If we're talking CPU performance, then SCP is going to cost you the price of encrypting with 128-bit AES (I believe that's the default for SSH2, but can't find a reference right now).

If you're talking bandwidth performance, then it will cost you the overhead of your encryption algorithm and strength.

If you're talking throughput performance, then you'll have to rate limit to your needs using either limit in SCP (as David Schwartz mentions in his comment above) or an different tool like perhaps pv.

Is there any better / faster way to copy a file? The file is already going to be different (name based on current date and time)

Define "better" and "faster". Define them very carefully. If you're saturating your CPU (very unlikely) there are different options than if you are saturating your bandwidth. Both involve rate limiting, however, and are fairly straightforward.

You must log in to answer this question.

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