FileZilla가 PSFTP보다 훨씬 빠른 이유는 무엇입니까?

FileZilla가 PSFTP보다 훨씬 빠른 이유는 무엇입니까?

저는 FileZilla 3.10.3 및 PSFTP 0.63(PuTTY)을 사용하고 있습니다. 내가 얻는 처리량이 두 클라이언트 간에 왜 그렇게 크게 다른지 알아내는 데 도움을 줄 수 있는 사람이 있습니까? FileZilla(및 WinSCP)가 훨씬 빠르기 때문에 SFTP 프로토콜의 단점일 수는 없습니다! 미리 감사드립니다.

FileZilla를 사용하여 일부 프로토콜을 사용하여 동일한 서버에 연결할 때 "좋은" 처리량을 얻습니다. 하나의 큰 파일에 대해 ~1.2MBPS입니다. 로그는 다음과 같습니다.

Response: fzSftp started, protocol_version=2
Command: open "[email protected]" 22
Trace: Looking up host "ftp.themcorp.com"
Trace: Connecting to 222.22.111.33 port 22
Trace: We claim version: SSH-2.0-PuTTY_Local:_Mar_29_2015_12:25:15
Trace: Server version: SSH-2.0-9.99 sshlib: 8.1.0.0
Trace: Using SSH protocol version 2
Trace: Doing Diffie-Hellman group exchange
Trace: Doing Diffie-Hellman key exchange with hash SHA-1
Trace: Host key fingerprint is:
Trace: ssh-dss 1024 20:88:a6:92:fe:11:db:b4:9a:b5:9e:8b:5f:50:bb:77
Trace: Initialised AES-256 SDCTR client->server encryption
Trace: Initialised HMAC-SHA1 client->server MAC algorithm
Trace: Initialised AES-256 SDCTR server->client encryption
Trace: Initialised HMAC-SHA1 server->client MAC algorithm
Command: Pass: ********
Trace: Sent password
Trace: Access granted
Trace: Opening session as main channel
Trace: Opened main channel
Trace: Started a shell/command
Status: Connected to ftp.themcorp.com
Trace: CControlSocket::ResetOperation(0)
Status: Starting upload of c:\temp\test.zip
Command: cd "/Home/mecorp"
Response: New directory is: "/Home/mecorp"
Trace: CControlSocket::ResetOperation(0)
Trace: FileTransferSend()
Command: put "c:\temp\test.zip" "test.zip"
Status: local:c:\temp\test.zip => remote:/Home/mecorp/test.zip
Trace: FileTransferParseResponse()
Trace: CControlSocket::ResetOperation(0)
Status: File transfer successful, transferred 27,974,088 bytes in 21 seconds

PSFTP를 사용하여 동일한 프로토콜을 사용하여 동일한 서버에 연결하고 동일한 파일을 전송할 때 처리량이 훨씬 느려집니다. 저는 약 150kbps로 추정합니다(Windows 7 작업 관리자의 I/O 바이트를 보면). 로그는 다음과 같습니다.

C:\temp>c:\d2\trunk\Util\psftp.exe -v -l mecorp -pw topsecret -P 22 ftp.themcorp.com
Looking up host "ftp.themcorp.com"
Connecting to 222.22.111.33 port 22
Server version: SSH-2.0-9.99 sshlib: 8.1.0.0
Using SSH protocol version 2
We claim version: SSH-2.0-PuTTY_Release_0.63
Doing Diffie-Hellman group exchange
Doing Diffie-Hellman key exchange with hash SHA-1
Host key fingerprint is:
ssh-dss 1024 20:88:a6:92:fe:11:db:b4:9a:b5:9e:8b:5f:50:bb:77
Initialised AES-256 SDCTR client->server encryption
Initialised HMAC-SHA1 client->server MAC algorithm
Initialised AES-256 SDCTR server->client encryption
Initialised HMAC-SHA1 server->client MAC algorithm
Using username "mecorp".
Sent password
Access granted
Opening session as main channel
Opened main channel
Started a shell/command
Connected to ftp.themcorp.com
Remote working directory is /Home/mecorp
psftp> put test.zip test.zip
local:test.zip => remote:/Home/mecorp/test.zip
psftp>

답변1

FileZilla는 SFTP 구현을 위해 PuTTY/psftp 소스 코드를 사용합니다. 실제로 FileZilla는 숨겨진 PSFTP 하위 프로세스를 실행합니다.

FzSFtp.exe그러나 다음을 포함하여 몇 가지 최적화(및 기타 수정)를 사용하는 자체 PSFTP( ) 빌드를 사용합니다 .

  • SFTP 전송 대기열은 4MB입니다(PSFTP의 1MB와 비교).
  • 훨씬 더 큰 청크로 메모리를 할당합니다(515B에 비해 32KB).
  • 대규모 네트워크 버퍼(SO_RCVBUF의 경우 4MB, SO_SNDBUF의 경우 동적 크기[SIO_IDEAL_SEND_BACKLOG_QUERY 사용])를 사용합니다. PSFTP는 시스템 기본값을 유지합니다.

FileZilla는 또한 PuTTY(VS)와 다른 컴파일러(mingw)를 사용하므로 이에 기여할 수 있습니다.


WinSCP는 또한 PSFTP 코드를 기반으로 하며(외부 하위 프로세스가 아닌 내부적으로 PSFTP 코드를 사용하지만) 유사한 최적화 세트를 사용합니다.

관련 정보