Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance Disparity Between Apache Mina and JSCH #478

Open
VHelpYou opened this issue Mar 19, 2024 · 2 comments
Open

Performance Disparity Between Apache Mina and JSCH #478

VHelpYou opened this issue Mar 19, 2024 · 2 comments

Comments

@VHelpYou
Copy link

Version

2.11.0

Bug description

We are currently transitioning from using JSCH to Apache Mina for our SFTP calls. My application requires high scalability and performance, as it handles teh transmission over 50,000 files totaling 5 TB in size.
Previously we utilized JSCH but we have now adopted to Apache Mina.
However, we have observed the degradation in the throughput of file transmission.

Actual behavior

We noticed Approximately 3 to 4 X times slowdown in Apache Mina compared to JSCH. However, I'm unsure if there are other factors contributing the to the issue. I'm curious if there have been any parallel benchmarking or testing conducted to similar style.
On a side note, we are expecting logging is set to DEBUG and that is contributing to some slowness.

Expected behavior

We expected Apache mina is much faster than any older sftp java libraries.

Relevant log output

No response

Other information

No response

@tomaswolf
Copy link
Member

Why should a newer library be much faster? It's the same protocol. If both are programmed correctly, they should have about the same performance.

My local tests show that with INFO logging Apache MINA SSHD has about the same performance for uploads and downloads of small or large files as JSch, and both are competitive with OpenSSH. In all three timing is linear with file size.

DEBUG logging does slow down things quite a bit. In particular I would expect Apache MINA SSHD to log much more than JSch.

It's not a good idea to run a production application with DEBUG logging on by default.

@tomaswolf
Copy link
Member

Also see #485. The transfer speed may also depend on how exactly your code transfers files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants