Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How do FTP, FTPS, SFTP, and SCP compare in terms of transfer rate and how can I compare them through testing?

share|improve this question

closed as off-topic by TheCleaner, mdpc, Ward, cole, ceejayoz Dec 9 '13 at 16:25

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions must be relevant to professional system administration. Server Fault is dedicated to professional system and network administrators. End user and enthusiast questions are off-topic (contact your system administrator or hire a professional to help you out). Please see the Help Center for more information." – TheCleaner, mdpc, Ward, cole, ceejayoz
If this question can be reworded to fit the rules in the help center, please edit the question.

    
Speed isn't the important difference between FTP and the others. –  ceejayoz Dec 9 '13 at 16:25
add comment

4 Answers

Based on encryption overhead, I'd say that plain FTP probably has slightly better performance than the other protocols, but it's probably negligible. I'd use the protocol that provides the security you need first, then worry about throughput.

That being said, you'll have to set up a test to find the real numbers. Everything above is just my opinion. If you're testing performance locally, set up a server on your network. If the end use will be over the internet, test from an external host.

share|improve this answer
add comment

As always, google holds the answers,
FTP v/s SFTP v/s FTPS
Which says FTP > FTPS > SFTP
FTP also appears to be faster than SCP in someone else's test(http://www.lysesoft.com/support/forums/viewtopic.php?f=5&t=542) but I'd recommend trying it for yourself to see.
So just set up SCP and FTP on any random box on your network, then run a typical file transfer and see how long it takes on both

share|improve this answer
    
why do you say FTP is an internet protocol and SCP for the LAN? –  Dan Pritts Dec 5 '13 at 20:04
2  
Ah, I see you got that from the linked eHow article. eHow is wrong. Both protocols were designed for Internet usage. The article has several other errors; the writer clearly doesn't know what he/she is talking about. –  Dan Pritts Dec 5 '13 at 20:14
    
Now that I think about it, you're right, I probably should have checked. –  Slowki Dec 6 '13 at 15:08
    
Sites like eHow never know what they are talking about. –  Frank Thornton Dec 18 '13 at 17:40
add comment

If you have a fast network you will find that sftp and scp are about the same speed, which is slow. They both suffer from performance problems in the underlying openssh.

This is not due to encryption overhead, but rather due to problems with the openssh implementation.

These problems become more obvious on long-distance (higher latency) connections, but I've experienced slowness even on LANs.

These are well-documented, and patches are available to fix the problem. Unfortunately both ends must be patched.

For more info and the patches, see High Performance SSH at Pittsburgh Supercomputer Center.

BTW, encryption overhead can be an issue too, once the windowing problem is solved. The patches have fixes for that too.

Meanwhile, you will find that ftp is woefully insecure; it sends passwords in plain-text.

ftps I think wraps the ftp protocol in SSL. it's probably faster than unpatched SFTP/SCP.

share|improve this answer
    
Finally. Someone who knows what they are talking about. Yes, FTPS is basically FTP in the SSL. SFTP/SCP will always be slower then when using FTP –  Frank Thornton Dec 18 '13 at 17:42
add comment

In general all of the protocols will perform about the same. You are more likely to be limited by the speed of your network or disk than by the protocol.

Older versions of OpenSSH (SFTP/SCP) used a fixed window size that will limit the speed over high latency networks (say trans-atlantic). There is a patch set to fix this problem called HPN (High performance networking) and it is included in most modern installs of OpenSSH.

If you are running in to a situation such as a gigabit or faster LAN link and a slower CPU then SFTP/SCP may run into a bottleneck. You'll be able to tell because the ssh/scp/sftp process will be using 100% of cpu on the sending or receiving hosting. If you are using a newer version of OpenSSH (6.4+) you can enable a threaded version of the AES cipher that will be able to use more than 1 core to handle the encryption and will be less likely to be limited by CPU rather than disk or network bandwidth.

If you control both the sending and receiving side, OpenSSH 6+ also has an optional 'NONECIPHER' mode. This uses the regular encryption/keys etc to login to the remote machine, but then drops to an unencrypted connection for the actual file copying. This will remove that CPU overhead. There are safeguards built in to the NONECIPHER than prevent you from getting a shell that is not encrypted.

In the end the protocol should not be the limitation on speed, although older versions of ssh do have trouble with high latency links.

share|improve this answer
    
Good to know that the defaults are now to have the patches installed, although it looks like redhat has explicitly decided against it (access.redhat.com/site/solutions/53215). Also, Note that trans-atlantic latency isn't really all that much. Current ping rtts: umich -> stanford (california): 89ms. umich -> cambridge (uk) : 134ms. Also, isn't the combination of latency and bandwidth that causes the issue? so lower latency but higher bandwidth links can still have problems. –  Dan Pritts Dec 18 '13 at 18:45
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.