Gentoo Archives: gentoo-server

From: Alexander Zimmerling <Alexander.Zimmerling@××××.org>
To: gentoo-server@l.g.o
Subject: [gentoo-server] Slow nameresolution with bind
Date: Fri, 05 Mar 2010 07:05:05
Message-Id: 1267771348.4504.18.camel@Ur
1 Hi guys,
2
3 I am sitting here with my new gentoo server. At the moment I struggle
4 with bind. The problem is known, but I cannot solve it without help.
5
6 I've googled first of cause, and found a lot of reports, blogs and so so
7 on, telling me, that the source of my problem is the ipv6 support in
8 bind. My new server does not support ipv6. I've set USE="-ipv6", which
9 seems to be ignored.
10
11 I've got this in my /var/log/messages after named is started:
12
13 <snip>
14 Mar 5 08:30:50 Tartessos named[18050]: loading configuration from
15 '/etc/bind/named.conf'
16 Mar 5 08:30:50 Tartessos named[18050]: using default UDP/IPv4 port
17 range: [1024, 65535]
18 Mar 5 08:30:50 Tartessos named[18050]: using default UDP/IPv6 port
19 range: [1024, 65535]
20 Mar 5 08:30:50 Tartessos named[18050]: listening on IPv4 interface lo,
21 127.0.0.1#53
22 Mar 5 08:30:50 Tartessos named[18050]: listening on IPv4 interface
23 eth0, 192.168.0.5#53
24 <snap>
25
26 As you can see, named tries to listen on ipv6 ports.
27
28 I've read, that passing "-4" to bind forces ipv4 mode only, but
29 cat /etc/conf.d/named
30 # Set various named options here.
31 #
32 OPTIONS="-4"
33
34 this does not help.
35
36 To give you an example what slow means:
37 <snip>
38 Tartessos ~ # dig www.gentoo.org
39
40 ; <<>> DiG 9.4.3-P4 <<>> www.gentoo.org
41 ;; global options: printcmd
42 ;; Got answer:
43 ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 55705
44 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2
45
46 ;; QUESTION SECTION:
47 ;www.gentoo.org. IN A
48
49 ;; ANSWER SECTION:
50 www.gentoo.org. 300 IN A 89.16.167.134
51
52 ;; AUTHORITY SECTION:
53 gentoo.org. 86400 IN NS udns2.ultradns.net.
54 gentoo.org. 86400 IN NS udns1.ultradns.net.
55
56 ;; ADDITIONAL SECTION:
57 udns1.ultradns.net. 86389 IN A 204.69.234.1
58 udns2.ultradns.net. 86389 IN A 204.74.101.1
59
60 ;; Query time: 3990 msec
61 ;; SERVER: 127.0.0.1#53(127.0.0.1)
62 ;; WHEN: Fri Mar 5 08:35:36 2010
63 ;; MSG SIZE rcvd: 132
64 <snap>
65
66 And seconds after (query is cached)
67
68 <snip>
69 Tartessos ~ # dig www.gentoo.org
70
71 ; <<>> DiG 9.4.3-P4 <<>> www.gentoo.org
72 ;; global options: printcmd
73 ;; Got answer:
74 ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 4233
75 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2
76
77 ;; QUESTION SECTION:
78 ;www.gentoo.org. IN A
79
80 ;; ANSWER SECTION:
81 www.gentoo.org. 297 IN A 89.16.167.134
82
83 ;; AUTHORITY SECTION:
84 gentoo.org. 86397 IN NS udns2.ultradns.net.
85 gentoo.org. 86397 IN NS udns1.ultradns.net.
86
87 ;; ADDITIONAL SECTION:
88 udns1.ultradns.net. 86386 IN A 204.69.234.1
89 udns2.ultradns.net. 86386 IN A 204.74.101.1
90
91 ;; Query time: 3 msec
92 ;; SERVER: 127.0.0.1#53(127.0.0.1)
93 ;; WHEN: Fri Mar 5 08:35:39 2010
94 ;; MSG SIZE rcvd: 132
95 <snap>
96
97 I've tried the latest stable version of bind, and all unstable versions
98 in the tree.
99
100 Here's my emerge --info
101
102 Tartessos ~ # emerge --info
103 Portage 2.1.7.17 (default/linux/amd64/10.0/server, gcc-4.1.2,
104 glibc-2.10.1-r1, 2.6.30-gentoo-r5 x86_64)
105 =================================================================
106 System uname:
107 Linux-2.6.30-gentoo-r5-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_5200+-with-gentoo-1.12.13
108 Timestamp of tree: Thu, 04 Mar 2010 17:45:02 +0000
109 app-shells/bash: 4.0_p35
110 dev-lang/python: 2.4.4-r13, 2.5.4-r3, 2.6.4
111 dev-python/pycrypto: 2.0.1-r6
112 dev-util/cmake: 2.6.4-r3
113 sys-apps/baselayout: 1.12.13
114 sys-apps/sandbox: 1.6-r2
115 sys-devel/autoconf: 2.63-r1
116 sys-devel/automake: 1.9.6-r2, 1.10.2
117 sys-devel/binutils: 2.18-r3
118 sys-devel/gcc: 4.1.2, 4.3.4
119 sys-devel/gcc-config: 1.4.1
120 sys-devel/libtool: 2.2.6b
121 virtual/os-headers: 2.6.30-r1
122 ACCEPT_KEYWORDS="amd64"
123 ACCEPT_LICENSE="* -@EULA"
124 CBUILD="x86_64-pc-linux-gnu"
125 CFLAGS="-march=athlon64 -O2 -pipe"
126 CHOST="x86_64-pc-linux-gnu"
127 CONFIG_PROTECT="/etc /var/bind"
128 CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
129 CXXFLAGS="-march=athlon64 -O2 -pipe"
130 DISTDIR="/usr/portage/distfiles"
131 FEATURES="assume-digests distlocks fixpackages news parallel-fetch
132 protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans
133 userfetch"
134 GENTOO_MIRRORS="ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo
135 http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ "
136 LDFLAGS="-Wl,-O1"
137 MAKEOPTS="-j3"
138 PKGDIR="/usr/portage/packages"
139 PORTAGE_CONFIGROOT="/"
140 PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times
141 --compress --force --whole-file --delete --stats --timeout=180
142 --exclude=/distfiles --exclude=/local --exclude=/packages"
143 PORTAGE_TMPDIR="/var/tmp"
144 PORTDIR="/usr/portage"
145 SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
146 USE="acl amd64 apache2 bzip2 cli cracklib crypt cups cxx dri fortran
147 gdbm gpm iconv ldap mmx modules mudflap multilib mysql ncurses nls nptl
148 nptlonly openmp pam pcre perl python readline reflection samba session
149 snmp spl sse sse2 ssl sysfs truetype unicode xml zlib"
150 ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug
151 file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw
152 multi null plug rate route share shm softvol" APACHE2_MODULES="actions
153 alias auth_basic authn_alias authn_anon authn_dbm authn_default
154 authn_file authz_dbm authz_default authz_groupfile authz_host
155 authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir
156 disk_cache env expires ext_filter file_cache filter headers include info
157 log_config logio mem_cache mime mime_magic negotiation rewrite setenvif
158 speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc"
159 INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad
160 cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text"
161 RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel
162 mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa via
163 vmware voodoo"
164 Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK,
165 LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS,
166 PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
167
168 P.S.: I've found a similar "bug" in bugzilla
169 (http://bugs.gentoo.org/show_bug.cgi?id=269202) but w/o resolution.
170
171 looking forward to hearing from you soon
172
173 Alex

Replies

Subject Author
Re: [gentoo-server] Slow nameresolution with bind Christian Bricart <christian@×××××××.de>