On 12/03/2010 04:24 PM, steve beltzer wrote:
> Yes I forgot something in the address - this should be better:
>
> steve@francisco:~$ time dig +short @208.59.247.45 nytimes.com
> 199.239.136.200
>
> real 0m0.035s
> user 0m0.024s
> sys 0m0.000s
> steve@francisco:~$
>
>> steve@francisco:~$ time dig +short @192.168.2.1 nytimes.comcuriouser and curiouser...
>> 199.239.136.200
>>
>> real 0m0.020s
>> user 0m0.004s
>> sys 0m0.012s
>> steve@francisco:~$
i'm now very perplexed that wget would take 15 seconds to resolve the
domain names but a direct lookup with dig takes only a fraction of a second.
dig talks directly to the nameservers by sending and receiving UDP
packets, but wget presumably uses libc's gethostbyname() resolution,
which in turn relies on the system's name service switch.
Could something be amiss with the libc resolver or the name service
switch? can you show me host configuration of your system's name
service switch?
grep '^hosts:' /etc/nsswitch.conf
here's mine:
0 dkg@pip:~$ grep '^hosts:' /etc/nsswitch.conf
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
0 dkg@pip:~$
And can you try this command to test the speed of the resolver via perl?
0 dkg@pip:~$ time perl -e 'gethostbyname("nytimes.com");'
real 0m0.007s
user 0m0.000s
sys 0m0.004s
0 dkg@pip:~$
(you should probably run the perl command twice; if the results vary,
report the second run. This will avoid measuring delays due to loading
perl and its libraries from the disk, because the second time they will
already be cached in RAM)
still puzzled,
--dkg
_______________________________________________
DebianNYC mailing list
DebianNYC@vireo.org
http://lists.vireo.org/cgi-bin/mailman/listinfo/debiannyc
_______________________________________________ DebianNYC mailing list DebianNYC@vireo.org http://lists.vireo.org/cgi-bin/mailman/listinfo/debiannyc