Opqrst Ghrst wrote: >> hello, >> >> thanks to reply. >> but by my test, if my cpu not slow when I use buffer >> 32kb to send 50MB file only cost 13Mins, >> with 8kb it must cost almost 20Mins.
Do you have any Anti-Virus life scanner running? Symantec AV i.e. seems to check each block of data read with one API call. So small block size becomes very slow. The SMTP client, that base64-encodes a file by reading very small chunks took lightyears to send a small file and entire system was under heavy load, even the GUI's were not responsive. --- Arno Garrels [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html >> It not always can up to max speed, but maybe better >> for slow cpu works. >> >> >> --- Francois Piette <[EMAIL PROTECTED]> ?: >> >>> Actully, the buffer size you use to transmit receive >>> is not critical at all. It has to be large >>> enoug in orther to not have too much OnDataSent or >>> OnDataAvailable events triggeres which would >>> consume CPU and in case you have a slow CPU, you >>> couldn't sustain the line speed when the line speed >>> is high (such as Gigabit). If the buffer is too >>> large, it is simply a waste on memory. >>> >>> In the http component, the buffer is used in a way >>> that the maximum header line must fit into the >>> receive buffer. A part from that, the buffer could >>> be reduce without significant impact. >>> >>> To send files, it is better to have a buffer which >>> is a multiple of the maximum packet size (MTU). >>> But if you have several physical layers (LAN and PPP >>> for example), it is difficult to adjust the >>> buffer size dynamically. All in all, 4KB is a good >>> value in most situations. >>> >>> -- >>> Contribute to the SSL Effort. Visit >>> http://www.overbyte.be/eng/ssl.html >>> -- >>> [EMAIL PROTECTED] >>> Author of ICS (Internet Component Suite, freeware) >>> Author of MidWare (Multi-tier framework, freeware) >>> http://www.overbyte.be >>> >>> >>> ----- Original Message ----- >>> From: "David A. G." <[EMAIL PROTECTED]> >>> To: <twsocket@elists.org> >>> Sent: Tuesday, January 17, 2006 1:44 AM >>> Subject: [twsocket] Buffer size >>> >>> >>>> Hello all, sorry if this topic was posted some >>> times. >>>> >>>> I making a protocol to transfer files via TCP using a mixed mode >>>> (binary and text). >>>> I searched in ICS Components for the better buffer >>> size: >>>> >>>> in HTTP protocol I found HTTP_SND_BUF_SIZE = 8193 >>>> >>>> I made tests and this value works great for LAN transferences but using >>>> internet I (through some linux routers) got blocks always minor than >>>> 1423 bytes. >>>> I'm doing something bad if I still using 8193 ? >>> (Delphi 7, WinXP) >>>> >>>> thanks >>>> David >>>> >>>> -- >>>> To unsubscribe or change your settings for >>> TWSocket mailing list >>>> please goto >>> http://www.elists.org/mailman/listinfo/twsocket >>>> Visit our website at http://www.overbyte.be >>> >>> -- >>> To unsubscribe or change your settings for TWSocket >>> mailing list >>> please goto >>> http://www.elists.org/mailman/listinfo/twsocket >>> Visit our website at http://www.overbyte.be >>> >> >> >> _______________________________________ >> YM - ???? >> ???????,?????????????,???????????,????????? >> http://messenger.yahoo.com.hk >> > > > >> -- >> To unsubscribe or change your settings for TWSocket mailing list >> please goto http://www.elists.org/mailman/listinfo/twsocket >> Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be