Re: Sendto(2) Never Reaches Wire
From: Barry Margolin (barmar_at_alum.mit.edu)
Date: 02/19/05
- Next message: Paul Pluzhnikov: "Re: Disabling command output in a Makefile"
- Previous message: pocm_at_sat.inesc-id.pt: "Disabling command output in a Makefile"
- In reply to: Michael B Allen: "Sendto(2) Never Reaches Wire"
- Next in thread: Michael B Allen: "Re: Sendto(2) Never Reaches Wire"
- Reply: Michael B Allen: "Re: Sendto(2) Never Reaches Wire"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 19 Feb 2005 11:41:31 -0500
In article <pan.2005.02.19.00.16.59.510514.19230@ioplex.com>,
Michael B Allen <mba2000@ioplex.com> wrote:
> I'm writing some async dns client code. I've noticed that if I send a
> quick succession of 5 requests sometimes [1] the first two never reach
> the wire even though sendto(2) correctly reports the number of bytes written
> and select(2) claims the socket is writeable for each call. This isn't
> a problem because the retry code can compensate but it happends pretty
> consistently on my Linux 2.4.28 x86 laptop so I'm wondering if there's a
> way to avoid it. Is this normal for a sendto implementation? Can someone
> recommend a technique to maybe ensure a little higher success rate?
>
> Thanks,
> Mike
>
> [1] If I run tests back to back within a few seconds all requests are
> sent successfully but if I wait a few minutes the first two packets
> never reach the wire.
My guess is the destination address isn't in the ARP cache when you send
the first request. And that the OS will only buffer one packet while
waiting for the ARP response, so if you send additional packets in quick
succession they replace each other.
-- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me ***
- Next message: Paul Pluzhnikov: "Re: Disabling command output in a Makefile"
- Previous message: pocm_at_sat.inesc-id.pt: "Disabling command output in a Makefile"
- In reply to: Michael B Allen: "Sendto(2) Never Reaches Wire"
- Next in thread: Michael B Allen: "Re: Sendto(2) Never Reaches Wire"
- Reply: Michael B Allen: "Re: Sendto(2) Never Reaches Wire"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|