public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Ellis <jonathan@berkeleydata.net>
To: linux-net@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: datagram queue length
Date: Tue, 09 Aug 2005 07:55:56 -0600	[thread overview]
Message-ID: <42F8B5EC.2090204@berkeleydata.net> (raw)

(Posted a few days ago to c.os.l.networking; no replies there.)

I seem to be running into a limit of 64 queued datagrams.  This isn't a
data buffer size; varying the size of the datagram makes no difference
in the observed queue size.  If more datagrams are sent before some are
read, they are silently dropped.  (By "silently," I mean, "tcpdump
doesn't record these as dropped packets.")

This only happens when the sending and receiving processes are on
different machines, btw.

Can anyone tell me where this magic 64 number comes from, so I can
increase it?

Python demo attached.

-Jonathan

# <receive udp requests>
# start this, then immediately start the other
# _on another machine_
import socket, time

sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.bind(('', 3001))

time.sleep(5)

while True:
     data, client_addr = sock.recvfrom(8192)
     print data

# <separate process to send stuff>
import socket

for i in range(200):
     sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
     sock.sendto('a' * 100, 0, ('***other machine ip***', 3001))
     sock.close()

             reply	other threads:[~2005-08-09 13:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-09 13:55 Jonathan Ellis [this message]
2005-08-09 14:45 ` datagram queue length linux-os (Dick Johnson)
2005-08-09 14:52   ` Jonathan Ellis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42F8B5EC.2090204@berkeleydata.net \
    --to=jonathan@berkeleydata.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-net@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox