[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: PNG File 10K_sshd220.png     PNG File 10K_sshd220_bytearray.png    
Issue Links:
Blocks
is blocked by NETCONF-590 Refactor NETCONF transport layer Resolved
is blocked by NETCONF-674 Eliminate use of AsyncSshHandlerReader Resolved
is blocked by NETCONF-699 Eliminate use of AsyncSshHandlerReade... Resolved
is blocked by NETCONF-1069 Refactor AbstractNetconfTopology inte... Resolved
is blocked by NETCONF-1070 Rework client reconnection logic Resolved

 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. NETCONF-674 deals with that.

Comment by Robert Varga [ 25/Apr/20 ]

The source of the HeapByteBuffer is actually NIO2 used by Mina. 

Generated at Wed Feb 07 20:15:21 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.