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

Single Thread for KEX Handling Causes Increased SSH Latency with High Concurrent Connections #647

Open
raajeive opened this issue Dec 20, 2024 · 1 comment

Comments

@raajeive
Copy link

Version

2.12.1

Bug description

The issue is related to Apache MINA SSHD #458.

In version 2.12.1, a singleton thread pool was introduced for the Key Exchange (KEX) message handler flushing. This change has led to a significant increase in the time taken to establish SSH connections when a single client frequently connects to multiple servers. With only one thread available for KEX, this architecture becomes a bottleneck.

Our application frequently SSHs to over 10,000 servers to periodically poll specific information. Due to the single-threaded KEX, all 10,000 SSH connections now rely on the same thread, causing the average time to SSH into a server to increase. This directly impacts the application's polling frequency, leading to performance degradation.

Actual behavior

A single thread is used for KEX, leading to increased SSH time when the client handles several thousand SSH connections concurrently.

Expected behavior

Provide a configurable option to set the number of threads for KEX.

Relevant log output

No response

Other information

No response

@tomaswolf
Copy link
Member

I don't understand. This is not a single thread; it's a thread pool. It sizes dynamically between zero and Integer.MAX_VALUE threads; idle threads are kept for one minute. So why are you seeing one thread only?

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