Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
3.1k views
in .NET FTP by (700 points)
Hi,

I am having a strange problem. What I am doing is trying to tweak the Exftpconnection based on the local networ speed. If the user will use LAN connection I set the TransferBufferSize to a very high value to increase the transfer rate. If on WAN I decrease the buffer size. I have my own class which inherits ExFTPConnection.

Here is my code:
Me.Timeout= 60000
 If Me.LowSpeed Then
            'TODO:Low Speed is not attainable
            '==Low Speed Throughput.
            TransferBufferSize = 1024
            TransferNotifyInterval = 2048
        Else
            '==High Speed Throughput.
            TransferBufferSize = 2048000
            TransferNotifyInterval = 2048000
        End If


Now my question is, first: is this the best value for high and slow connections?
Second, if I by mistake leave the high TransferBufferSize value on when using a slow connection, say 256Kbps, I get a an IOException
Unable to read data from the transport connection. What is the best practice in what I am trying to achieve?

Thanks

2 Answers

0 votes
by (162k points)
Unfortunately it is very difficult to be prescriptive with buffer sizes - it will depend on the network, the FTP server and your local machine. Unless it makes a significant difference in test cases, it isn't really worth while changing the value.
0 votes
by (700 points)
Actually, results in test cases does shows significant changes. Especially when being on the same LAN as the server. Changing the values from the default 4096 ro 2048000 increases the transfer rate sinificantly that is from 20Mbps to 90Mbps. What I am trying to do is enhancing the transfer rate as much as I can according to the link speed. I suggest that you run some test cases yourselves to test this.

Thanks

Categories

...