You are not logged in.
I reinstalled Arch recently and the first thing I noticed was slow resolve times on hostname lookups. This didn't happen on all webpages but did on about 50% of them. This also happened on downloads from pacman %100 percent of the time. I have done a good bit of research and most of the points led to nssswich. One website said to try using this in nsswitch.conf:
hosts: files[NOTFOUND=continue UNAVAIL=continue] dns [NOTFOUND=continue UNAVAIL=continue TRYAGAIN=return] nis
With this it appears (after about 20 minutes of testing) that firefox lookups are again behaving normal again. However, pacman is still having slow lookups (about 30 seconds for each package). Does anyone know what could be the problem here. I dont' know much about nsswitch or how it could be the problem. Is there a way to help return pacman to regular lookup times?
Last edited by Gen2ly (2010-11-05 18:13:34)
Setting Up a Scripting Environment | Proud donor to wikipedia - link
Offline
Yeah, no problem.
#
# /etc/hosts: static lookup table for host names
#
#<ip-address> <hostname.domain.org> <hostname>
127.0.0.1 localhost.localdomain localhost pavilion
# End of file
#####################################################################
# The Hosts File Project http://hostsfile.mine.nu
# Global Advert Servers Blocklist - Personal Edition
#####################################################################
# Release 2010-1-26
# Servers Verified as up and running 2010-1-26 (by dns exploration)
# Updated sorted and maintained by Andrew Short (sh0rtie)
# Contact: wduk10@hotmail.com
#####################################################################
# A big thank you to all contributers (too many to mention)
# who really have made this project a success, well done :)
# Licensed under the LGPL a copy of the license may be viewed at
# http://www.gnu.org/licenses/lgpl.txt
######################################################################
# WARNING:
# This file is *extremely comprehensive* and some sites might be
# included here that you wish to visit, if this is the case you can
# deactivate the block on that site by placing a # (octothorpe)symbol
# before its entry, this will deactivate blocking on that server
# so for example #127.0.0.1 foobar.com
# will enable you to visit foobar.com or you can just simply delete
# the line that contains the site you wish to visit.
# NB:
# For some computer software updates you may need to disable
# this file in order to perform the update, if you have problems
# rename this file from "hosts" to "hosts.txt" reboot then perform
# the update and then rename this file back to "hosts" to re-enable it
######################################################################
# You must keep the below lines
127.0.0.1 localhost
######################################################################
127.0.0.1 007arcadegames.com
127.0.0.1 00fun.com
127.0.0.1 00inkjets.com
127.0.0.1 00pro.com
127.0.0.1 00web.com
...
I use the hosts files to to block advertisements which is the stuff trailing on the end and continuing. Think there might be a problemt here?
Setting Up a Scripting Environment | Proud donor to wikipedia - link
Offline
Gen2ly,
perhaps are you using a bad DNS server ?
Thats a quick try, put for example
nameserver 8.8.8.8
nameserver 8.8.4.4
inside /etc/resolv.conf and try again.
Should that help, you will probably have to use /etc/resolv.conf.head because if you are using DHCP it will
overwrite etc/resolv.conf.
Above servers are the Google ones, but there are many other like the Opendns ones.
Mektub
Follow me on twitter: https://twitter.com/johnbina
Offline
I have similiar problems, with websites as with pacman.
Between each package pacman receives there is a long duration where pacman tries do resolv it. The download of the package itself is still going fast.
I already tried the google nameservers as well as the opendns servers.
Offline
I have similiar problems, with websites as with pacman.
Between each package pacman receives there is a long duration where pacman tries do resolv it. The download of the package itself is still going fast.
I already tried the google nameservers as well as the opendns servers.
Another possibility that has helped several people is to disable the ipv6 module:
https://wiki.archlinux.org/index.php/IP … the_Module
Mektub
Follow me on twitter: https://twitter.com/johnbina
Offline
to speed up pacman, add your mirrors to /etc/hosts and use powerpill
Offline
Offline
Try
dig archlinux.org | grep "Query time"
to check how slow your lookups really are, I get between 50 and 60 msec with both my ISP's and google's DNS on my home wlan.
Another workaround would be local DNS caching with dnsmasq.
Last edited by hokasch (2010-10-30 11:27:39)
Offline
Very strange. It looks like only the first lookup takes very long and after that for some time the page is looked up quite fast. There seems to be a kind of timeout. Is that normal?
[root@thinkpad robert]# dig archlinux.org | grep "Query time"
;; Query time: 198 msec
[root@thinkpad robert]# dig archlinux.org | grep "Query time"
;; Query time: 33 msec
[root@thinkpad robert]# dig archlinux.org | grep "Query time"
;; Query time: 25 msec
[root@thinkpad robert]# dig archlinux.org | grep "Query time"
;; Query time: 24 msec
[root@thinkpad robert]# dig archlinux.org | grep "Query time"
;; Query time: 21 msec
[root@thinkpad robert]# dig archlinux.org | grep "Query time"
;; Query time: 28 msec
[root@thinkpad robert]# dig archlinux.org | grep "Query time"
;; Query time: 23 msec
[root@thinkpad robert]# dig archlinux.org | grep "Query time"
;; Query time: 22 msec
Offline
Very strange. It looks like only the first lookup takes very long and after that for some time the page is looked up quite fast. There seems to be a kind of timeout. Is that normal?
You can make the DNS timeout smaller, put a line in resolv.conf:
options timeout:1
You can also disable ipv6 in firefox. Type about:config and in the Filter line type "ipv".
There change
network.dns.disableIPv6;false
to "true".
Apart from that, I support the hokasch opinion about dnsmasq.
This doesn't clarify why DNS has these delays, but dnsmasq in itself has many advantages. I do use it.
Mektub
Follow me on twitter: https://twitter.com/johnbina
Offline
Holy crap thank you for this hint Mektub with DNS timeout. That worked instantly, for both, pacman and website query. I will have to put this in the wiki, this is really great.
Kind regards
Offline
Very strange. It looks like only the first lookup takes very long and after that for some time the page is looked up quite fast. There seems to be a kind of timeout. Is that normal?
Holy crap thank you for this hint Mektub with DNS timeout. That worked instantly, for both, pacman and website query.
If I'm not mistaken, this means the first DNS server is too slow, while the second one is ok - and with lowering the timeout tolerance, it skips to the second one quicker. What is in your /etc/resolv.conf? Try removing the first nameserver...
Last edited by hokasch (2010-10-30 17:52:44)
Offline
orschiro wrote:Very strange. It looks like only the first lookup takes very long and after that for some time the page is looked up quite fast. There seems to be a kind of timeout. Is that normal?
You can make the DNS timeout smaller, put a line in resolv.conf:
options timeout:1
Ahh good tip. With new nameservers from comcast (thanks Mektub) and this did the trick. Appreciate the help.
Last edited by Gen2ly (2010-11-05 18:14:30)
Setting Up a Scripting Environment | Proud donor to wikipedia - link
Offline
I get:
$ dig archlinux.org | grep "Query time"
;; Query time: 260 msec
$ dig archlinux.org | grep "Query time"
;; Query time: 0 msec
$ dig archlinux.org | grep "Query time"
;; Query time: 0 msec
This is with running bind locally with -4 in commandline.
Offline