Request regarding CHAN_INPUT_MAX

Damien Miller djm at mindrot.org
Fri Apr 10 09:05:19 AEST 2026


On Thu, 9 Apr 2026, Chris Rapier wrote:

> Hi all,
> 
> Is there any way that the limit of CHAN_INPUT_MAX could be increased?
> 
> In channels.h it's set to 16MB.
> #define CHAN_INPUT_MAX  (16*1024*1024)
> 
> Which is fine for most implementations of SSH but it's causing performance
> degradation when OpenSSH is sending data to an HPN-SSH instance. I'm currently
> dealing with this by limiting the advertised window to less than 16MB but that
> limits throughput in this situations. While I'd love it if this was increased
> to 128MB an increase to 32MB or more would help out a lot of my users (people
> often install HPN-SSH on the server side as it provides a throughput boost to
> any client sending data). If HPN-SSH advertises more than that to these
> clients the connection might fail or enter a pathological state in terms of
> performance.

That's the pathological state here? INPUT_MAX sets the maximum size of the
buffer for data that has been locally read by not yet put on the wire.

If the server has advertised a larger channel window then I'd assume that
this buffer should pretty much always be empty as it will be drained to
the wire by channel_output_poll_input_open() in maxpacket increments.

-d


More information about the openssh-unix-dev mailing list