[NETCONF-571] Rework SSHD integration Created: 01/Oct/18 Updated: 31/Jul/23 |
|
| Status: | Confirmed |
| Project: | netconf |
| Component/s: | netconf |
| Affects Version/s: | None |
| Fix Version/s: | 7.0.0 |
| Type: | Improvement | Priority: | Medium |
| Reporter: | Robert Varga | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||||||
| Description |
|
Running scale test of connected 10K instances, we end up consuming 1.2GB heap, which boils down to around ~125kB per session overhead. Drilling down into this, it looks like we are retaining a 32KiB HeapByteBuffer in each session – i.e. 25%, through a read timeout task. Investigate the root cause for this, potentially switching to netty provider instead of nio2. |
| Comments |
| Comment by Robert Varga [ 01/Oct/18 ] |
|
This seems to be related AsyncSshHandler's use of SshClient – which really is the bridge between sshd-core and netty. In order to eliminate this buffer, we really need to thoroughly rework SSH integration, because the "netconf" SSH subsystem needs to be acting as an io.netty.channel.Channel, with the rest of the processing tied in as handler. This in turn requires that TLS/TCP sessions are established differently (directly via Netty) than SSH sessions (established when netconf subsystem is opened) – which means we need to kill the protocol framework. |
| Comment by Robert Varga [ 25/Apr/20 ] |
|
This is a misleading comment. |
| Comment by Robert Varga [ 25/Apr/20 ] |
|
The source of the HeapByteBuffer is actually NIO2 used by Mina. |