Operations 17 min read

Performance Comparison of Linux File Transfer Tools (scp, ftp, sftp, rsync, tftp, nc, Python SimpleHTTPServer)

This article presents a systematic performance comparison of several Linux file‑transfer utilities—including scp, ftp, sftp, rsync, tftp, nc, and a Python SimpleHTTPServer—by measuring transfer times for a 50 GB single file and 51 GB spread across 51 200 one‑megabyte files, and discusses each tool’s speed, compression, encryption, and typical use cases.

Aikesheng Open Source Community
Aikesheng Open Source Community
Aikesheng Open Source Community
Performance Comparison of Linux File Transfer Tools (scp, ftp, sftp, rsync, tftp, nc, Python SimpleHTTPServer)

The author, a DBA from the iKOS delivery service team, wanted to identify the most efficient data‑transfer tool for Linux servers. After a brief search, six tools were selected: ftp, sftp, scp, rsync, tftp, nc , plus a Python SimpleHTTPServer solution.

Test Environment and Preparation

Two Linux machines were configured with SSH trust. Two test directories were created: one containing a ~50 GB file generated with fallocate -l 50G 50g_file , and another containing 51 200 files of 1 MB each created via seq 51200 | xargs -i dd if=/dev/zero of=1m_file{} bs=1M count=1 . The du command reported 51 GB due to filesystem block allocation.

Tool Tests

SCP

# 1 * 50G file test
[root@yang-02 big]# scp /opt/test/big/50g_file root@yang-01:/opt/test/re/
50g_file                          100%   50GB 135.5MB/s   06:17

# 51200 * 1M file test
[root@yang-02 many]# time scp /opt/test/many/1m_file* root@yang-01:/opt/test/re/
... (output omitted) ...
real    20m43.875s

SCP is widely available, uses SSH encryption, and shows moderate speed; CPU usage is low.

FTP

# 1 * 50G file test
[root@yang-01 re]# ftp yang-02
... (output omitted) ...
53687091200 bytes received in 150 secs (359 MB/s)

# 51200 * 1M file test
[root@yang-01 re]# time ftp yang-02
... (output omitted) ...
real    14m32.032s

FTP works over TCP, offers the fastest transfer for the large file but lacks encryption.

SFTP

# 1 * 50G file test
[root@yang-01 re]# sftp root@yang-02
... (output omitted) ...
100%   50GB 128.7MB/s   06:37
real    19m43.154s

SFTP adds SSH encryption; speed drops roughly 70 % compared with FTP, similar to SCP.

RSYNC

# 1 * 50G file test
[root@yang-02 big]# time rsync -av ./50g_file root@yang-01:/opt/test/re/50g_file
... (output omitted) ...
real    8m17.039s

# 51200 * 1M file test
[root@yang-02 many]# time rsync -av ./1m_file* root@yang-01:/opt/test/re/
... (output omitted) ...
real    15m21.548s

Rsync is slightly faster than SCP, supports compression (-z), and only transfers changed blocks, making it ideal for incremental backups.

TFTP

# 1 * 50G file test
[root@yang-01 re]# time tftp yang-02
... (output omitted) ...
real    10m30.114s (transfer failed, only 1.8 GB received)

TFTP uses UDP, requires additional service setup, and performed poorly for large files.

NC (netcat)

# 1 * 50G file test
[root@yang-02 big]# nc 192.168.88.71 10086 < /opt/test/big/50g_file
[root@yang-01 re]# time nc -l 10086 > 50G_file
real    2m30.663s

# 51200 * 1M file test
[root@yang-01 many]# tar cfz - *|nc 192.168.88.71 10086
... (output omitted) ...
real    11m38.400s

Netcat transfers data with minimal protocol overhead, achieving the fastest speeds among the tested tools.

Python SimpleHTTPServer

# 1 * 50G file test
[root@yang-02 big]# python -m SimpleHTTPServer 10086
... (output omitted) ...
wget http://192.168.88.72:10086/50g_file
... 330 MB/s ...

# 51200 * 1M file test
[root@yang-02 many]# python -m SimpleHTTPServer 10086
... (output omitted) ...
wget -i liu.list
... total 50G in 8m11s (104 MB/s) ...

The built‑in Python HTTP server provides a lightweight solution with good throughput and no extra installation.

Results Summary

Tool

50 GB Transfer Time

51 200 × 1 MB Transfer Time

Compression

Encryption

Speed

SCP

06:17 (377 s)

20m43.875s (1243.9 s)

-C supported

SSH

Fast

FTP

150 s

14m32.032s (872.0 s)

None

None

Fast

SFTP

06:37 (397 s)

19m43.154s (1183.2 s)

None

SSH

Fast

RSYNC

08:17.039s (657.0 s)

15m21.548s (921.5 s)

-z supported

SSH

Fast

TFTP

10m30.114s (test fail)

None

None

Slow

NC

02:30.663s (150.7 s)

11m38.400s (698.4 s)

None

None

Fast

Python HTTP

02:35 (155 s)

09:19 (559 s)

None

None

Fast

Conclusions

Large‑file transfer speed ranking: FTP > NC > Python HTTP > SCP > SFTP > RSYNC .

Small‑file transfer speed ranking: Python HTTP > NC > FTP > RSYNC > SFTP > SCP .

RSYNC excels in incremental synchronization and periodic archiving; FTP is simple but insecure and suited for internal networks.

When SSH is blocked, netcat (nc) provides a fast alternative using raw TCP/UDP.

Transferring many small files incurs higher CPU and I/O overhead compared with a single large file.

Parallelizing transfers (e.g., multiple processes) can better utilize bandwidth for massive file sets.

All tests were conducted on virtual machines; actual performance may vary with network bandwidth, disk I/O, and other environmental factors.

OperationsPerformance TestingLinuxrsyncfile transferscp
Aikesheng Open Source Community
Written by

Aikesheng Open Source Community

The Aikesheng Open Source Community provides stable, enterprise‑grade MySQL open‑source tools and services, releases a premium open‑source component each year (1024), and continuously operates and maintains them.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.