AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-574932

jupiterbjy's questions

Martin Hope
jupiterbjy
Asked: 2024-01-31 01:04:49 +0800 CST

SFTP 如何比 FTPS 快 4 倍的可能解释?

  • 5

问题

  • iperf3 报告942Mbps
  • SFTP 1GB 传输速度为94~100 MB/s
  • 显式 FTPS 1GB 传输速度为19~23 MB/s
  • CPU / IO 负载均低于 20%htop

我在 google 中找到的近 99% 的帖子都说 FTP(无论加密与否)总是比 SFTP 更快,而且我也认为这是合理的。

在过去的几年里,我花了很多天来配置和摸索为什么 FTPS 没有使用完整的带宽,并最终尝试了 SFTP。然后发现,利用几乎全带宽,速度是原来的 4 倍。

是否有任何可能的解释或 vsftpd 配置错误导致 FTPS 比 SFTP 慢?

--

再次澄清一下意图,从现在开始我完全可以使用SFTP。我已经筋疲力尽,没有时间去摆弄 FTPS。SFTP 对我来说完美无缺,因此我不会再尝试使用 FTPS。

我只是很好奇,为什么大多数教程和帖子都说 FTPS 比 SFTP 更快,但我们在这里看到的情况恰恰相反,这肯定是有原因的。


配置

跳过详细的服务器/客户端硬件信息,因为 iperf3 和 SFTP 已经证明这不是服务器/客户端性能问题。

  • 1 个具有2Gbit/s HW NAT的家庭路由器

    • iptime a2003ns-mu(使用RTL8197F)
  • vsftpd 服务器位于路由器后面,链路速度为 1G

    • Debian 12.2.0-14
    • 华擎 J4105m
    • vsftpd 3.0.3
  • 客户端 PC 在路由器后面,链路速度为 1G

    • Win11教育版
    • FileZilla 3.66.4
  • 在 FTP 上使用 TLSv1.2 进行外部连接


情况

  • 从本地网络访问 FTP 服务器的文件

vsftpd 配置

# General
pam_service_name=vsftpd
utf8_filesystem=YES
dirmessage_enable=YES
xferlog_enable=YES


# Connectivity
listen=YES
listen_ipv6=NO
connect_from_port_20=YES


# Security
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022


# chroot
chroot_local_user=YES
secure_chroot_dir=/var/run/vsftpd/empty
allow_writeable_chroot=YES


# Certs
rsa_cert_file=/etc/letsencrypt/live/[REDACTED]/fullchain.pem
rsa_private_key_file=/etc/letsencrypt/live/[REDACTED]/privkey.pem


# Explicit SSL
ssl_enable=YES
force_local_logins_ssl=YES
force_local_data_ssl=YES
allow_anon_ssl=NO
require_ssl_reuse=NO
ssl_tlsv1=YES
ssl_sslv2=NO
ssl_sslv3=NO
ssl_ciphers=HIGH


# Passive mode
pasv_addr_resolve=YES
pasv_address=[REDACTED].com
pasv_enable=YES
pasv_min_port=12000
pasv_max_port=13000


# Preventing error using local address connection
pasv_promiscuous=yes

速度数据

[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   113 MBytes   950 Mbits/sec    0    218 KBytes
[  5]   1.00-2.00   sec   112 MBytes   942 Mbits/sec    0    218 KBytes
[  5]   2.00-3.00   sec   112 MBytes   938 Mbits/sec    0    218 KBytes
[  5]   3.00-4.00   sec   112 MBytes   942 Mbits/sec    0    218 KBytes
[  5]   4.00-5.00   sec   112 MBytes   942 Mbits/sec    0    218 KBytes
[  5]   5.00-6.00   sec   112 MBytes   941 Mbits/sec    0    218 KBytes
[  5]   6.00-7.00   sec   113 MBytes   944 Mbits/sec    0    218 KBytes
[  5]   7.00-8.00   sec   112 MBytes   940 Mbits/sec    0    218 KBytes
[  5]   8.00-9.00   sec   112 MBytes   942 Mbits/sec    0    218 KBytes
[  5]   9.00-10.00  sec   112 MBytes   942 Mbits/sec    0    218 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  1.10 GBytes   942 Mbits/sec    0             sender
[  5]   0.00-10.00  sec  1.10 GBytes   941 Mbits/sec                  receiver

ftp
  • 1 个回答
  • 77 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve