* Question: socket communication: Linux to OSF/1 or Ultrix
@ 1996-03-29 5:00 David Soleau Lum
1996-04-01 5:00 ` Curt Smith
0 siblings, 1 reply; 3+ messages in thread
From: David Soleau Lum @ 1996-03-29 5:00 UTC (permalink / raw)
Hi.
My goal is to send data (via a TCP stream socket) from a Pentium Linux
machine to a DEC Alpha running Digital Unix ("formerly OSF/1", as they
say).
I'm sending a small amount of data (about 50 bytes) every 10
milliseconds. It is crucial that the process on the alpha read()s the
data as soon as it is written by the Linux box.
The problem I am having is that the write()s to the Linux socket go out
every 10 msec (as verified by gettimeofday), but the read()s on the
alpha return with inter-arrival times like this (in msec):
0, 200, 0, 0, 0, 200, 0, 0, 0, 0, 200, 0, ...
I *have* set the TCP_NODELAY socket option on the sender's side of the
connection, and I used a packet sniffer to verify that the data are
written across the network one at a time. The Linux box is definitely
not coalescing packets into larger chunks.
When I attempt the same procedure from one Linux machine to another,
there is no problem (interarrival times are 0, 10, 9, 11, 10, 10, ...).
Things are also OK when the *sender* is the alpha and the *receiver* is
Linux. I tried sending to the alpha from an Ultrix machine, and things
were also fine. Ditto sending from the alpha to the Ultrix machine.
Sending from Linux to Ultrix is problematic in the same way I described
above.
The bottom line is that I am dying to fix this problem, because I *must*
send data from a Linux machine to the alpha. Has anyone heard of
situations like this? Personal email is welcomed, although I will be
monitoring this news group.
--
========================================================================
David Lum || davknav@mit.edu
34 Harris Street Apt. #5 || 617-253-2538 (work)
Brookline, MA 02146 || 617-566-1923 (home)
========================================================================
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Question: socket communication: Linux to OSF/1 or Ultrix
1996-03-29 5:00 Question: socket communication: Linux to OSF/1 or Ultrix David Soleau Lum
@ 1996-04-01 5:00 ` Curt Smith
1996-04-05 5:00 ` Ravi Cheema
0 siblings, 1 reply; 3+ messages in thread
From: Curt Smith @ 1996-04-01 5:00 UTC (permalink / raw)
David Soleau Lum (davknav@mit.edu) wrote:
: Hi.
:
: My goal is to send data (via a TCP stream socket) from a Pentium Linux
: machine to a DEC Alpha running Digital Unix ("formerly OSF/1", as they
: say).
:
: I'm sending a small amount of data (about 50 bytes) every 10
: milliseconds. It is crucial that the process on the alpha read()s the
: data as soon as it is written by the Linux box.
:
: The problem I am having is that the write()s to the Linux socket go out
: every 10 msec (as verified by gettimeofday), but the read()s on the
: alpha return with inter-arrival times like this (in msec):
:
: 0, 200, 0, 0, 0, 200, 0, 0, 0, 0, 200, 0, ...
:
: I *have* set the TCP_NODELAY socket option on the sender's side of the
: connection, and I used a packet sniffer to verify that the data are
: written across the network one at a time. The Linux box is definitely
: not coalescing packets into larger chunks.
A suggestion is to re-impliment your design using UDP. This will deliver
pkts faster, with no delay. But, you'll have to design for potential
dropped packets and the theoretical pkts out of order scenario.
Curt Smith
curts@compgen.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Question: socket communication: Linux to OSF/1 or Ultrix
1996-04-01 5:00 ` Curt Smith
@ 1996-04-05 5:00 ` Ravi Cheema
0 siblings, 0 replies; 3+ messages in thread
From: Ravi Cheema @ 1996-04-05 5:00 UTC (permalink / raw)
In article <4jokr5$e71@nntp.atlanta.com>, Curt Smith <curts@compgen.com>
writes
>
>:
>: I *have* set the TCP_NODELAY socket option on the sender's side of the
>: connection, and I used a packet sniffer to verify that the data are
>: written across the network one at a time. The Linux box is definitely
>: not coalescing packets into larger chunks.
This may not be the case since your using TCP/IP stream sockets. The
TCP/IP stack in the kernel will wait for a short amount of time for a
packet window to be full before sending the data out to the network
device. This is how TCP/IP works, so there may not be much you can do
about it. Since your only sending small data packets your not using
utilising the TCP/IP protocol effectivly. You could try increasing the
size of data you send out i.e. coalescing the packets in the program
before you issue the write() or try padding the data into larger chunks
- however the latter will nodoubt increase network traffic.
>A suggestion is to re-impliment your design using UDP. This will deliver
>pkts faster, with no delay. But, you'll have to design for potential
>dropped packets and the theoretical pkts out of order scenario.
I'd stick to the stream sockets since they guarantee delivery of packets
in the correct sequence. UDP doesn't guarantee delivery nor correct
sequencing of packets.
____________________________________________________________________________
Ravi Cheema "We take a handful of sand from the
<ravi@ruthless.demon.co.uk> endless landscape of awareness around us
<ravi@osm.co.uk> and call that handful of sand the world."
____________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1996-04-05 5:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-03-29 5:00 Question: socket communication: Linux to OSF/1 or Ultrix David Soleau Lum
1996-04-01 5:00 ` Curt Smith
1996-04-05 5:00 ` Ravi Cheema
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox