Alexander Vodomerov wrote:
On Wed, Aug 30, 2006 at 02:39:55PM -0700, David Miller wrote:
Expecting any performance with one byte write's is silly.
This is absolutely true.  TCP_NODELAY can only save you when you are
sending a small amount of data "in aggregate", such as in an SSH or
telnet session, whereas in the case being shown here a large amount of
data is being sent in small chunks which will always get bad
performance.

Information is sent with one byte write's because it is not available at
the moment of sending (it may be read from hardware device or user). If
I change 1 to 10 or 100 nothing changes. I'm afraid there is a bit of
misunderstanding here. Only very small amount of data is being sent over
network. The total traffic for example I sent is only 10 bytes/s. After
every 10th packet program does usleep(100000) to simulate pause before
next available data.

There are really 3 factors:
1) total size of information is small
2) data for transferring is arrived by small portions from external
source
3) it is very important that any portion should be delivered to receiver
as soon as possible.
Is TCP is good choice for such transfer or some other protocol is better
suited?
If message boundary preservation is a useful feature for your app, you could try SCTP.
You should be able to do this by replacing IPPROTO_TCP with IPPROTO_SCTP and
TCP_NODELAY with SCTP_NODELAY.

Thanks
Sridhar
With best regards,
   Alexander.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to