EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Slowness with SSHBlackBox

Also by EldoS: RawDisk
Access locked and protected files in Windows, read and write disks and partitions and more.
#2101
Posted: 01/28/2007 05:02:57
by Eugene Mayevski (EldoS Corp.)

Then you have the source code, so you can play a bit with it.
Please open SBSSHForwarding.pas and find TElSSHForwardingSession.Execute method there. In this method there's a block, marked as "// running client loop". You will see and if/then/else inside a while loop. Remove the else part (a call to Sleep()).


Sincerely yours
Eugene Mayevski
#2102
Posted: 01/28/2007 08:16:12
by Zeljan Rikalo (Standard support level)
Joined: 01/27/2007
Posts: 9

hm...comment out of Sleep(0) in that routine (also in TElSSHForwardedConnection.Execute ) does nothing, but
I've changed all CanReceive() and CanSend() timeouts to 0, so SBSocket's select() calls are more aggressive, and get approx. 50% better result (bit better than normal connection, but not so fast as with ssh -L).
Only small amount of data is problem, large query results are OK in any case.
#2103
Posted: 01/28/2007 09:13:52
by Eugene Mayevski (EldoS Corp.)

Quote
Zeljan Rikalo wrote:
I've changed all CanReceive() and CanSend() timeouts to 0


This is wrong as you won't be able to shutdown the tunnel.


Sincerely yours
Eugene Mayevski
#2104
Posted: 01/28/2007 09:42:46
by Zeljan Rikalo (Standard support level)
Joined: 01/27/2007
Posts: 9

But I can shut it down w/o any problems (I leaved end else sleep(0) as it is), without sleep(0)...then we have a mess ;) , or if we call CanReceive() or CanSend() with -1 as parameter, then I cannot close the tunnel (select() is called with Nil instead of TTimeVal).
Again tried same code with console app and problem is still here (I thought that gui could make some bottlenecks, but I was wrong).
#2105
Posted: 01/28/2007 11:56:47
by Eugene Mayevski (EldoS Corp.)

Quote
Zeljan Rikalo wrote:
But I can shut it down w/o any problems (I leaved end else sleep(0) as it is), without sleep(0)...then we have a mess ;) , or if we call CanReceive() or CanSend() with -1 as parameter, then I cannot close the tunnel (select() is called with Nil instead of TTimeVal).


Right, it's -1 that causes the problem with shutdown. If you use 0, you get extra CPU load with no speed improvement.


Sincerely yours
Eugene Mayevski
#2106
Posted: 01/28/2007 12:38:31
by Zeljan Rikalo (Standard support level)
Joined: 01/27/2007
Posts: 9

Actually I don't care about CPU load. So, is there any chance to fix this problem ?
#2115
Posted: 01/29/2007 11:21:38
by Ken Ivanov (EldoS Corp.)

Please also try the following:
a) open SBSocket.pas unit,
b) find the implementation of TElSocket.Listen method,
c) replace the line
result := winsock.listen(FSocket, 1);
with
result := winsock.listen(FSocket, SOMAXCONN);

and check if this change results in speed increase.
#2116
Posted: 01/29/2007 12:10:24
by Zeljan Rikalo (Standard support level)
Joined: 01/27/2007
Posts: 9

Nothing changed, same results under WinXP and Linux.
#2120
Posted: 01/29/2007 14:02:27
by Ken Ivanov (EldoS Corp.)

I have created a ticket for you (#11297) to continue the conversation in the Helpdesk (http://www.eldos.com/support/ticket_list.php)
Also by EldoS: CallbackProcess
A component to control process creation and termination in Windows and .NET applications.

Reply

Statistics

Topic viewed 11576 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!