EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Dynamic SSH Tunnel Forwarding Latency

Also by EldoS: BizCrypto
Components for BizTalk® and SQL Server® Integration Services that let you securely store and transfer information in your business automation solutions.
Posted: 09/02/2011 09:16:24
by ivo machado (Standard support level)
Joined: 07/18/2011
Posts: 12

Hello there,

I have created a dynamic forwarding program to create a tunnel for proxify games into a ssh server, to decrease the latency in the game.

The problem is, when I connect through the program tunnel, the latency value are increased a lot.


When I connect to the SSH server using PuTTy, the latency stay in 190~200 ms.
At the same server, when I connect using the SSHBlackBox the latency grows up to 700 ms.

There are some values that I can change to improve this ? Like MaxSSHPacketSize, MinWindowSize ?
Posted: 09/02/2011 09:47:14
by Ken Ivanov (EldoS Corp.)

Thank you for contacting us.

Generally speaking, there are several "best practice" rules that might help to increase the speed of tunneling:

1) Omit using OnConnection* events. As these events are invoked too often during the session, handling them (or, what is much worse, using them to display the "real-time" picture of the forwarding status) significantly slows the speed down.

2) Turn off SynchronizeGUI. This will allow the component throw events outside of the main thread of the application. Still, using this mode sets a requirement for your code to be careful with the GUI controls.

3) Set Priority to sfpHigh.
Posted: 09/02/2011 09:47:55
by Ken Ivanov (EldoS Corp.)

4) And, of course, one of the first things to do - enable Compression
Posted: 09/02/2011 10:16:04
by ivo machado (Standard support level)
Joined: 07/18/2011
Posts: 12

Thanks for the reply.

For sure this will helps a lot.
Just one more question. There is some CompressionLevel value that could help this out?
Posted: 09/02/2011 11:04:21
by Ken Ivanov (EldoS Corp.)

The simple rule here is that there's always a trade-off between the speed of compression and its quality (ratio) - better compression ratio requires more time for data processing. Compression level (1 to 9) corresponds to compression quality. Setting level to 1 will result in faster processing but lower compression quality.

Still, considering the correlation between CPU and network speeds today, in most of the cases setting compression level to 9 will result in the best productivity.
Posted: 09/05/2011 10:44:52
by ivo machado (Standard support level)
Joined: 07/18/2011
Posts: 12

Thanks for the help. This really help me to improve the quality in the tunnel connection. But the latency still much higher instead of the Putty.exe.

Doing some labs I noticed that, my client with SBSSHForwarding have exactly same behavior of Putty when I enable the "Nagle´s Algorithm".

In Putty when I connect and do the tunneling forwaring, then enable "Nagle´s Algorith" (disable the TPC_NODELAY) option of putty, the latency stay at same value of my client.

In SBSSHForwarding component has some implementation of TCP_NODELAY ? How can I use it to decrease the Tunneling latency?
Posted: 09/05/2011 11:18:23
by Ken Ivanov (EldoS Corp.)

There is no way to configure low-level socket properties in simple forwarding components at the moment. We'll give public access to the underlying socket objects in the next SBB build update.
Also by EldoS: RawDisk
Access locked and protected files in Windows, read and write disks and partitions and more.



Topic viewed 3435 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!