[
https://issues.apache.org/jira/browse/SSHD-253?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael Heemskerk updated SSHD-253:
-----------------------------------
Description:
SshServer performs auth and idle timeout checks by scheduling a Runnable to
disconnect the session when the timeout occurs. Every time new data is
received, the task is canceled and a new Runnable is scheduled.
As a result ScheduledExecutorService.schedule is called very frequently and
pops up in the profiling hotspots. I've created an alternative implementation
that uses a single thread to periodically checks (once every second) all active
sessions whether they've timed out.
The performance impact of this change depends on the type of SSH usage. For
operations that transfer a lot of data in a short time, the improvement is
significant (about 8% in my test).
Pull request: https://github.com/apache/mina-sshd/pull/1
was:
SshServer performs auth and idle timeout checks by scheduling a Runnable to
disconnect the session when the timeout occurs. Every time new data is
received, the task is canceled and a new Runnable is scheduled.
As a result ScheduledExecutorService.schedule is called very frequently and
pops up in the profiling hotspots. I've created an alternative implementation
that uses a single thread to periodically checks (once every second) all active
sessions whether they've timed out.
The performance impact of this change depends on the type of SSH usage. For
operations that transfer a lot of data in a short time, the improvement is
significant (about 8% in my test).
I'll open a PR on github shortly
> Improve performance of auth and idle timeout checking
> -----------------------------------------------------
>
> Key: SSHD-253
> URL: https://issues.apache.org/jira/browse/SSHD-253
> Project: MINA SSHD
> Issue Type: Improvement
> Reporter: Michael Heemskerk
> Priority: Minor
>
> SshServer performs auth and idle timeout checks by scheduling a Runnable to
> disconnect the session when the timeout occurs. Every time new data is
> received, the task is canceled and a new Runnable is scheduled.
> As a result ScheduledExecutorService.schedule is called very frequently and
> pops up in the profiling hotspots. I've created an alternative
> implementation that uses a single thread to periodically checks (once every
> second) all active sessions whether they've timed out.
> The performance impact of this change depends on the type of SSH usage. For
> operations that transfer a lot of data in a short time, the improvement is
> significant (about 8% in my test).
> Pull request: https://github.com/apache/mina-sshd/pull/1
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira