Re: Slow name-server lookups

Richard B. Johnson (root@chaos.analogic.com)
Mon, 1 Mar 1999 14:03:51 -0500 (EST)


On Mon, 1 Mar 1999, Alan Cox wrote:

> > This is what glibc-2.0.6 gethostbyname() does.
> >
> > socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3
> > connect(3, {sin_family=AF_INET, sin_port=htons(53),
> > sin_addr=inet_addr("204.178.40.210")}, 16) = 0
>
>
> > It takes time to establish a connection. Looking at the glibc-2.0.6 code
> > I see that the 'connection' is a trick to get a 'connection-refused'
>
> The UDP connect code is just internal book-keeping not a connection over
> a network. So its one, fast, syscall
>

Yes, I see it normally takes 23 microseconds on this machine except
when there are the long pauses, at which time it takes about 500
milliseconds.

Cheers,
Dick Johnson
***** FILE SYSTEM WAS MODIFIED *****
Penguin : Linux version 2.2.2 on an i686 machine (400.59 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.
Wisdom : It's not a Y2K problem. It's a Y2Day problem.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/