Re: [twsocket] FTPClient Put problem
> In case of upload with FTPClient the upload is slow. Pay attention to progress bar or similar GUI gadget. If not programmed correctly, they could slow down transfer a lot. Also, try running the FTP component in a worker thread, maybe with a priority set to something higher than the main trhread. Having a separate thread make the GUI not interfere with the transfer. If you code update the GUI and you use a thread, pay attention on how you do it. Avoid Synchronize as it defeat multithreading. Have you thread update a variable and have the main thread read that variable, using a critical section to avoid contention. Do not poll that variable too fast, use a TTimer to check it once a second for example. If you have a really fast network, disk speed may be the limiting factor. See the FTP component source and change it so that the files are read using much larger buffer. See Arno's message. You may also enlarge winsock buffer and use larger buffer in twsocket used for data channel. -- [EMAIL PROTECTED] The author of the freeware multi-tier middleware MidWare The author of the freeware Internet Component Suite (ICS) http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] FTPClient Put problem
Fias Norbert István wrote: > The problem is that Indy sends a large amount TCP segments as the > received window increasing and as no drop occured while ICS FTP > client does not increase the number of sent segments, so the > unacknowledged amount of bytes is not increasing. I have experienced similar issues when comparing ICS and Indy components. The problem decreased when setting the BufSize property of tWSocket to values between 256k and 1M. Maybe the FTP client of ICS is can be changed to use a larger BufSize values by default (as Indy does, I suppose). /Tobias -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] FTPClient Put problem
> I increased the send buffer to 40k. Of course it works only during > active connections. it does not help. Have you tried to increase BLOCK_SIZE of the DataSocket and BufSize (in TCustomWSocket.Create) of TWsocket's internal send buffer? They both are set to 1460 by default . Means a file is read in chunks of BLOCK_SIZE and BufSize is the maximum amout of data being sent in a single call to socket send(). I think they should be set to a multiple of the optimal MTU value - 28 (protocol data), and lower than the socket send buffer size (default = 4096). The default MTU value of 1500 is often to high in most environments, I use MTU 1492, however wireless may require even a lower value. > No, there is no FW. As I said with a different component on the same > PC using same connection and same server I do not experience the > problem. I don't know how the INDY components work, however they will most likely send the files differently, and they use blocking winsock API which may require different parameters? -- Arno Garrels [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html Fias Norbert István wrote: > No, there is no FW. As I said with a different component on the same > PC using same connection and same server I do not experience the > problem. > > The problem is that Indy sends a large amount TCP segments as the > received window increasing and as no drop occured while ICS FTP > client does not increase the number of sent segments, so the > unacknowledged amount of bytes is not increasing. > > I am using mobile network - HSDPA - RTT is much higher than in a LAN > environment. That's why I thought that if I increase the send buffer > that could help. I tried the following just for test: > > > In procedure TCustomFtpCli.DataSocketPutSessionAvailable > > //original lines > OptLen := SizeOf(SndBufSize); > if WSocket_getsockopt(FDataSocket.HSocket, SOL_SOCKET, > SO_SNDBUF, > @SndBufSize, OptLen) = SOCKET_ERROR then > begin > HandleError('winsock.getsockopt(SO_SNDBUF) failed'); > Exit; > end; > //original ends > > //added these lines > msg := Format('Send buffer Size> %d', [SndBufSize]); > > > if Assigned(FOnDisplay) then FOnDisplay(self, msg); > > SndBufSize := 8192 * 5; > > if (SetSockOpt(FDataSocket.HSocket, SOL_SOCKET, SO_SNDBUF, > @SndBufSize, optlen) <> NO_ERROR) > then begin > HandleError('winsock.getsockopt(SO_SNDBUF) failed'); > Exit; > end; > > if WSocket_getsockopt(FDataSocket.HSocket, SOL_SOCKET, > SO_SNDBUF, > @SndBufSize, OptLen) = SOCKET_ERROR then > begin > HandleError('winsock.getsockopt(SO_SNDBUF) failed'); > Exit; > end; > > msg := Format('Send buffer Size> %d', [SndBufSize]); > //addition ends > > I increased the send buffer to 40k. Of course it works only during > active connections. it does not help. > > > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Arno Garrels > Sent: Wednesday, February 27, 2008 12:16 PM > To: ICS support mailing > Subject: Re: [twsocket] FTPClient Put problem > > I once tested uploading a 2 GB file at 44 Mbits/s in a 100 Mbit/s LAN. > Write ahead cache was disabled at the Server's HDD and the > the disk seemed rather busy, the HDD was probably the bottleneck > that avoided higher speeds. > > Make sure you do not have any anti-virus software or a personal > Firewall running, customers frequently reported that upload speed > increased heavily when they killed their background protection. > > -- > Arno Garrels [TeamICS] > http://www.overbyte.be/eng/overbyte/teamics.html > > > > Fias Norbert István wrote: >> Honestly I did not find the answer for my following question int he >> archieves, buti t can be I missed something. >> >> I have the following problem >> In case of upload with FTPClient the upload is slow. It seems that >> the client does not send enough fast the TCP segments. I mean it is >> waiting for the previous ACK. The receive window size ont he servers >> ide is big enough. No bandwidth limit int he client. Is this problem >> related to winsock, or can I do anything againts? Can I increase the >> send buffer size of the data socket? >> >> I do not experience the problem with Indy FTP client / same machine, >> same connection, same server. >> >> Thanks in advance, >> Norbert >> >> >>
Re: [twsocket] FTPClient Put problem
No, there is no FW. As I said with a different component on the same PC using same connection and same server I do not experience the problem. The problem is that Indy sends a large amount TCP segments as the received window increasing and as no drop occured while ICS FTP client does not increase the number of sent segments, so the unacknowledged amount of bytes is not increasing. I am using mobile network - HSDPA - RTT is much higher than in a LAN environment. That's why I thought that if I increase the send buffer that could help. I tried the following just for test: In procedure TCustomFtpCli.DataSocketPutSessionAvailable //original lines OptLen := SizeOf(SndBufSize); if WSocket_getsockopt(FDataSocket.HSocket, SOL_SOCKET, SO_SNDBUF, @SndBufSize, OptLen) = SOCKET_ERROR then begin HandleError('winsock.getsockopt(SO_SNDBUF) failed'); Exit; end; //original ends //added these lines msg := Format('Send buffer Size> %d', [SndBufSize]); if Assigned(FOnDisplay) then FOnDisplay(self, msg); SndBufSize := 8192 * 5; if (SetSockOpt(FDataSocket.HSocket, SOL_SOCKET, SO_SNDBUF, @SndBufSize, optlen) <> NO_ERROR) then begin HandleError('winsock.getsockopt(SO_SNDBUF) failed'); Exit; end; if WSocket_getsockopt(FDataSocket.HSocket, SOL_SOCKET, SO_SNDBUF, @SndBufSize, OptLen) = SOCKET_ERROR then begin HandleError('winsock.getsockopt(SO_SNDBUF) failed'); Exit; end; msg := Format('Send buffer Size> %d', [SndBufSize]); //addition ends I increased the send buffer to 40k. Of course it works only during active connections. it does not help. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Arno Garrels Sent: Wednesday, February 27, 2008 12:16 PM To: ICS support mailing Subject: Re: [twsocket] FTPClient Put problem I once tested uploading a 2 GB file at 44 Mbits/s in a 100 Mbit/s LAN. Write ahead cache was disabled at the Server's HDD and the the disk seemed rather busy, the HDD was probably the bottleneck that avoided higher speeds. Make sure you do not have any anti-virus software or a personal Firewall running, customers frequently reported that upload speed increased heavily when they killed their background protection. -- Arno Garrels [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html Fias Norbert István wrote: > Honestly I did not find the answer for my following question int he > archieves, buti t can be I missed something. > > I have the following problem > In case of upload with FTPClient the upload is slow. It seems that > the client does not send enough fast the TCP segments. I mean it is > waiting for the previous ACK. The receive window size ont he servers > ide is big enough. No bandwidth limit int he client. Is this problem > related to winsock, or can I do anything againts? Can I increase the > send buffer size of the data socket? > > I do not experience the problem with Indy FTP client / same machine, > same connection, same server. > > Thanks in advance, > Norbert > > > > > Magyar Telekom Távközlési Nyilvánosan Működő Részvénytársaság > Székhely: 1013 Budapest, Krisztina krt. 55. > Cégjegyzékszám: bejegyezve a Fővárosi Bíróság mint > Cégbíróságon Cg. 01-10-041928 szám alatt > > > Magyar Telekom Telecommunications Public Limited Company > Registered office: H-1013 Budapest, Krisztina krt. 55. > Commercial register: The Company was registered > on number 01-10-041928 by the Municipal Court as Court of Registration -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be Magyar Telekom Távközlési Nyilvánosan Működő Részvénytársaság Székhely: 1013 Budapest, Krisztina krt. 55. Cégjegyzékszám: bejegyezve a Fővárosi Bíróság mint Cégbíróságon Cg. 01-10-041928 szám alatt Magyar Telekom Telecommunications Public Limited Company Registered office: H-1013 Budapest, Krisztina krt. 55. Commercial register: The Company was registered on number 01-10-041928 by the Municipal Court as Court of Registration -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] FTPClient Put problem
I once tested uploading a 2 GB file at 44 Mbits/s in a 100 Mbit/s LAN. Write ahead cache was disabled at the Server's HDD and the the disk seemed rather busy, the HDD was probably the bottleneck that avoided higher speeds. Make sure you do not have any anti-virus software or a personal Firewall running, customers frequently reported that upload speed increased heavily when they killed their background protection. -- Arno Garrels [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html Fias Norbert István wrote: > Honestly I did not find the answer for my following question int he > archieves, buti t can be I missed something. > > I have the following problem > In case of upload with FTPClient the upload is slow. It seems that > the client does not send enough fast the TCP segments. I mean it is > waiting for the previous ACK. The receive window size ont he servers > ide is big enough. No bandwidth limit int he client. Is this problem > related to winsock, or can I do anything againts? Can I increase the > send buffer size of the data socket? > > I do not experience the problem with Indy FTP client / same machine, > same connection, same server. > > Thanks in advance, > Norbert > > > > > Magyar Telekom Távközlési Nyilvánosan Működő Részvénytársaság > Székhely: 1013 Budapest, Krisztina krt. 55. > Cégjegyzékszám: bejegyezve a Fővárosi Bíróság mint > Cégbíróságon Cg. 01-10-041928 szám alatt > > > Magyar Telekom Telecommunications Public Limited Company > Registered office: H-1013 Budapest, Krisztina krt. 55. > Commercial register: The Company was registered > on number 01-10-041928 by the Municipal Court as Court of Registration -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] FTPClient Put problem
Hello, I think increasing the buffer size to 16kB would solve the issue. Regards, SZ On 2/27/08, Fias Norbert István <[EMAIL PROTECTED]> wrote: > > Honestly I did not find the answer for my following question int he > archieves, buti t can be I missed something. > > I have the following problem > In case of upload with FTPClient the upload is slow. It seems that the > client does not send enough fast the TCP segments. I mean it is waiting for > the previous ACK. The receive window size ont he servers ide is big enough. > No bandwidth limit int he client. Is this problem related to winsock, or can > I do anything againts? Can I increase the send buffer size of the data > socket? > > I do not experience the problem with Indy FTP client / same machine, same > connection, same server. > > Thanks in advance, > Norbert > > > > > Magyar Telekom Távközlési Nyilvánosan Működő Részvénytársaság > Székhely: 1013 Budapest, Krisztina krt. 55. > Cégjegyzékszám: bejegyezve a Fővárosi Bíróság mint > Cégbíróságon Cg. 01-10-041928 szám alatt > > > Magyar Telekom Telecommunications Public Limited Company > Registered office: H-1013 Budapest, Krisztina krt. 55. > Commercial register: The Company was registered > on number 01-10-041928 by the Municipal Court as Court of Registration > -- > To unsubscribe or change your settings for TWSocket mailing list > please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket > Visit our website at http://www.overbyte.be > -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be