Building bind 9.19.24 on Openwrt w/ MUSL
Hi, Having some more issues building 9.19.24 on MUSL. configure.ac isn't correctly detecting the following: ac_cv_func_setresuid=yes ac_cv_type_size_t=yes ac_cv_type_ssize_t=yes ac_cv_type_uintptr_t=yes And even passing this manually via ./configure's environment isn't causing it to work... it's showing as the wrong value and not "(cached)". I wouldn't have noticed except that the included replacement for setresuid() dies in compilation with a warning about it being declared as static and then later defined as non-static or some such. Anyone else had problems with autoconf and cross-compilation w/ MUSL? I wanted to do a bump on bind to pick up this fix: https://gitlab.isc.org/isc-projects/bind9/-/issues/3152 Thanks, -Philip -- Visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information. bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users
Re: Building bind 9.19.24 on Openwrt w/ MUSL
Finally got it done. Sorry for taking so long. Had a lot of travel. > On Jun 2, 2024, at 2:37 AM, Ondřej Surý wrote: > > Hi Philip, > > we'll need more. Ideally fill an issue, follow the bug template and attach > config.log as a bare minimum. > -- > Ondřej Surý — ISC (He/Him) > > My working hours and your working hours may be different. Please do not feel > obligated to reply outside your normal working hours. > >> On 1. 6. 2024, at 23:19, Philip Prindeville via bind-users >> wrote: >> >> Hi, >> >> Having some more issues building 9.19.24 on MUSL. configure.ac isn't >> correctly detecting the following: >> >> ac_cv_func_setresuid=yes >> ac_cv_type_size_t=yes >> ac_cv_type_ssize_t=yes >> ac_cv_type_uintptr_t=yes >> >> And even passing this manually via ./configure's environment isn't causing >> it to work... it's showing as the wrong value and not "(cached)". >> >> I wouldn't have noticed except that the included replacement for setresuid() >> dies in compilation with a warning about it being declared as static and >> then later defined as non-static or some such. >> >> Anyone else had problems with autoconf and cross-compilation w/ MUSL? >> >> I wanted to do a bump on bind to pick up this fix: >> >> https://gitlab.isc.org/isc-projects/bind9/-/issues/3152 >> >> Thanks, >> >> -Philip >> >> -- >> Visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from >> this list >> >> ISC funds the development of this software with paid support subscriptions. >> Contact us at https://www.isc.org/contact/ for more information. >> >> >> bind-users mailing list >> bind-users@lists.isc.org >> https://lists.isc.org/mailman/listinfo/bind-users > -- Visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information. bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users
Significant memory usage
Hi, I’ve been running 9.20.7 on OpenWRT for over a year without issues. Yesterday, however, it died because of OOM (out-of-memory) kill from the kernel. I use it with isc-dhcp service for IPv4, and do split horizon for internal domains. What I’ve noticed is that at startup I’m using about 33K pages as the VSZ (per top on x86_64 hardware). Within a minute, however, that’s doubled to 72600+ pages. More than double. This is a small network with 1 domain (plus two rDNS domains), and not more than 400 RR’s total. If I do an “rndc flush” is drops about 3000 pages, but slowly starts creeping up again. I updated to 9.20.8 a few minutes ago but I’m still seeing the same issue. root@OpenWrt:~# named -V BIND 9.20.8 (Stable Release) running on Linux x86_64 6.6.41 #0 SMP Sat Jul 27 03:38:57 2024 built by make with '--target=x86_64-openwrt-linux' '--host=x86_64-openwrt-linux' '--build=x86_64-pc-linux-gnu' '--disable-dependency-tracking' '--program-prefix=' '--program-suffix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--libexecdir=/usr/lib' '--sysconfdir=/etc' '--datadir=/usr/share' '--localstatedir=/var' '--mandir=/usr/man' '--infodir=/usr/info' '--disable-geoip' '--with-openssl=/home/philipp/lede/staging_dir/target-x86_64_musl/usr' '--without-lmdb' '--without-readline' '--sysconfdir=/etc/bind' '--with-json-c=no' '--with-libxml2=no' '--enable-doh' '--without-gssapi' 'build_alias=x86_64-pc-linux-gnu' 'host_alias=x86_64-openwrt-linux' 'target_alias=x86_64-openwrt-linux' 'CC=x86_64-openwrt-linux-musl-gcc' 'CFLAGS=-Os -pipe -g3 -fno-caller-saves -fno-plt -fhonour-copts -fmacro-prefix-map=/home/philipp/lede/build_dir/target-x86_64_musl/bind-9.20.8=bind-9.20.8 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro ' 'LDFLAGS=-L/home/philipp/lede/staging_dir/toolchain-x86_64_gcc-14.2.0_musl/usr/lib -L/home/philipp/lede/staging_dir/toolchain-x86_64_gcc-14.2.0_musl/lib -fuse-ld=bfd -znow -zrelro -Wl,--gc-sections,--as-needed ' 'CPPFLAGS=-I/home/philipp/lede/staging_dir/toolchain-x86_64_gcc-14.2.0_musl/usr/include -I/home/philipp/lede/staging_dir/toolchain-x86_64_gcc-14.2.0_musl/include -I/home/philipp/lede/staging_dir/toolchain-x86_64_gcc-14.2.0_musl/include/fortify ' 'PKG_CONFIG=/home/philipp/lede/staging_dir/host/bin/pkg-config' 'PKG_CONFIG_PATH=/home/philipp/lede/staging_dir/target-x86_64_musl/usr/lib/pkgconfig:/home/philipp/lede/staging_dir/target-x86_64_musl/usr/share/pkgconfig' 'PKG_CONFIG_LIBDIR=/home/philipp/lede/staging_dir/target-x86_64_musl/usr/lib/pkgconfig:/home/philipp/lede/staging_dir/target-x86_64_musl/usr/share/pkgconfig' compiled by GCC 14.2.0 compiled with OpenSSL version: OpenSSL 3.0.16 11 Feb 2025 linked to OpenSSL version: OpenSSL 3.0.14 4 Jun 2024 compiled with libuv version: 1.48.0 linked to libuv version: 1.48.0 compiled with liburcu version: 0.15.2 compiled with libnghttp2 version: 1.63.0 linked to libnghttp2 version: 1.62.1 compiled with zlib version: 1.3.1 linked to zlib version: 1.3.1 threads support is enabled DNSSEC algorithms: RSASHA1 NSEC3RSASHA1 RSASHA256 RSASHA512 ECDSAP256SHA256 ECDSAP384SHA384 ED25519 ED448 DS algorithms: SHA-1 SHA-256 SHA-384 HMAC algorithms: HMAC-MD5 HMAC-SHA1 HMAC-SHA224 HMAC-SHA256 HMAC-SHA384 HMAC-SHA512 TKEY mode 2 support (Diffie-Hellman): no TKEY mode 3 support (GSS-API): no default paths: named configuration: /etc/bind/named.conf rndc configuration: /etc/bind/rndc.conf nsupdate session key: /var/run/named/session.key named PID file: /var/run/named/named.pid root@OpenWrt:~# What would explain the sudden increase in memory usage when the environment has been relatively static? Thanks, -Philip -- Visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information. bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users
Re: Significant memory usage
> On May 21, 2025, at 3:38 PM, Ben Scott wrote: > > - Original Message - >> From: "Philip Prindeville via bind-users" >> To: "bind-users" >> Sent: Sunday, May 18, 2025 5:20:59 PM >> Subject: Significant memory usage > >> What I’ve noticed is that at startup I’m using about 33K pages as the VSZ >> (per >> top on x86_64 hardware). > > VSZ (virtual size) just counts the number of virtual memory pages associated > with the process in some way. That includes RAM, but also memory mapped > files, devices, sparse pages that will never be backed by anything, etc. You > need to look at RSS (resident size) to monitor actual RAM usage. > > The results of "rdnc stats" and/or the "statistics-channels" will provide > BIND-specific statistics. The former can be run without preparation; the > latter is a bit friendlier but needs a config change. > > https://kb.isc.org/docs/monitoring-recommendations-for-bind-9 > > https://kb.isc.org/docs/aa-00769 > > https://kb.isc.org/docs/aa-01123 > > — Ben > I’m currently doing an “rndc flush” every hour to stop my system from getting exhausted. I’ll disable that and report back in a few hours. Also trying to port jemalloc to Openwrt and rebuild Bind against that. Would have done this sooner but there was a Strongswan issue that took precedence. But for now I’m seeing: +++ Statistics Dump +++ (1749414883) ++ Incoming Requests ++ 202350 QUERY 866925 UPDATE ++ Incoming Queries ++ 100752 A 726 NS 11 CNAME 3286 SOA 2040 PTR 287 MX 4243 TXT 59691 3938 SRV 1112 NAPTR 2 DNSKEY 5043 SVCB 21219 HTTPS ++ Outgoing Rcodes ++ 713834 NOERROR 1146 SERVFAIL 52791 NXDOMAIN 25 REFUSED 288430 YXDOMAIN ++ Outgoing Queries ++ [View: default] 102499 A 53762 NS 281 CNAME 95 SOA 266 PTR 189 MX 1581 TXT 21112 233 SRV 227 NAPTR 9372 DS 2623 DNSKEY 17076 HTTPS [View: _bind] ++ Name Server Statistics ++ 1069275 IPv4 requests received 24143 requests with EDNS(0) received 868523 requests with TSIG received 3377 TCP requests received 2 TCP connection high-water 25 update requests rejected 1056226 responses sent 415 truncated responses sent 24143 responses with EDNS(0) sent 868523 responses with TSIG sent 117485 queries resulted in successful answer 42841 queries resulted in authoritative answer 145314 queries resulted in non authoritative answer 17879 queries resulted in nxrrset 1146 queries resulted in SERVFAIL 52791 queries resulted in NXDOMAIN 90820 queries caused recursion 13049 duplicate queries received 578470 updates completed 288430 updates failed 288430 updates rejected due to prerequisite failure 105 Recursive clients high-water 199789 UDP queries received 1809 TCP queries received 1 COOKIE option received 1 COOKIE - client only 199 synthesized a NXDOMAIN response 2 synthesized a no-data response 1377 queries triggered prefetch ++ Zone Maintenance Statistics ++ 2 IPv4 notifies sent ++ Resolver Statistics ++ [Common] [View: default] 209316 IPv4 queries sent 208247 IPv4 responses received 14032 NXDOMAIN received 2 SERVFAIL received 6 FORMERR received 6 EDNS(0) query failures 449 truncated responses received 66912 query retries 1003 query timeouts 32195 IPv4 NS address fetches 30 IPv4 NS address fetch failed 143548 DNSSEC validation attempted 91201 DNSSEC validation succeeded 52343 DNSSEC NX validation succeeded 4 DNSSEC validation failed 198192 queries with RTT 10-100ms 10027 queries with RTT 100-500ms 8 queries with RTT 500-800ms 13 queries with RTT 800-1600ms 7 queries with RTT > 1600ms
Re: Significant memory usage
> On Jun 8, 2025, at 3:07 PM, Philip Prindeville via bind-users > wrote: > > > >> On May 21, 2025, at 3:38 PM, Ben Scott wrote: >> >> - Original Message ----- >>> From: "Philip Prindeville via bind-users" >>> To: "bind-users" >>> Sent: Sunday, May 18, 2025 5:20:59 PM >>> Subject: Significant memory usage >> >>> What I’ve noticed is that at startup I’m using about 33K pages as the VSZ >>> (per >>> top on x86_64 hardware). >> >> VSZ (virtual size) just counts the number of virtual memory pages associated >> with the process in some way. That includes RAM, but also memory mapped >> files, devices, sparse pages that will never be backed by anything, etc. >> You need to look at RSS (resident size) to monitor actual RAM usage. >> >> The results of "rdnc stats" and/or the "statistics-channels" will provide >> BIND-specific statistics. The former can be run without preparation; the >> latter is a bit friendlier but needs a config change. >> >> https://kb.isc.org/docs/monitoring-recommendations-for-bind-9 >> >> https://kb.isc.org/docs/aa-00769 >> >> https://kb.isc.org/docs/aa-01123 >> >> —Ben > > > > Dumb question… how do you turn on statistics-channel when building bind? I’m > not seeing an option for it in ./configure Found it by digging around: —-with-openssl --with-libxml2 —-enable-threads -- Visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information. bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users
Re: Significant memory usage
> On May 21, 2025, at 3:38 PM, Ben Scott wrote: > > - Original Message - >> From: "Philip Prindeville via bind-users" >> To: "bind-users" >> Sent: Sunday, May 18, 2025 5:20:59 PM >> Subject: Significant memory usage > >> What I’ve noticed is that at startup I’m using about 33K pages as the VSZ >> (per >> top on x86_64 hardware). > > VSZ (virtual size) just counts the number of virtual memory pages associated > with the process in some way. That includes RAM, but also memory mapped > files, devices, sparse pages that will never be backed by anything, etc. You > need to look at RSS (resident size) to monitor actual RAM usage. > > The results of "rdnc stats" and/or the "statistics-channels" will provide > BIND-specific statistics. The former can be run without preparation; the > latter is a bit friendlier but needs a config change. > > https://kb.isc.org/docs/monitoring-recommendations-for-bind-9 > > https://kb.isc.org/docs/aa-00769 > > https://kb.isc.org/docs/aa-01123 > > —Ben Dumb question… how do you turn on statistics-channel when building bind? I’m not seeing an option for it in ./configure -- Visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information. bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users
Re: Significant memory usage
Working on it: https://github.com/openwrt/packages/pull/26721 Here’s my statistics-channel output: named-stats.xml Description: XML document > On May 18, 2025, at 10:30 PM, Ondřej Surý wrote: > > Well, you’ve provided basically nothing as leads, so it is hard to tell > what’s going on with just output of named -V. > > I would suggest to recompile names with jemalloc enabled and then use > jemalloc profiling to see where the memory goes. > > See https://www.isc.org/blogs/2023-BIND-memory-management-explained/ for more > details (search for jeprof for tldr). > > Ondrej > -- > Ondřej Surý — ISC (He/Him) -- Visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information. bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users
Re: Significant memory usage
22 DNSKEY 3 HTTPS 70 !NS 4 !TXT 13 ! 1 !NAPTR 71 !DS 25 !HTTPS 58 NXDOMAIN [View: _bind (Cache: _bind)] ++ ADB stats ++ [View: default] 1174 Addresses in hash table 1316 Names in hash table [View: _bind] ++ Socket I/O Statistics ++ 1398 UDP/IPv4 sockets opened 22 TCP/IPv4 sockets opened 1382 UDP/IPv4 sockets closed 6 TCP/IPv4 sockets closed 2 UDP/IPv4 socket connect failures 1 TCP/IPv4 socket connect failures 1381 UDP/IPv4 connections established 3 TCP/IPv4 connections established 3 TCP/IPv4 connections accepted 20 UDP/IPv4 sockets active 25 TCP/IPv4 sockets active ++ Per Zone Query Statistics ++ ++ Per Zone Glue Cache Statistics ++ [redfish-solutions.com] [168.192.in-addr.arpa] [localhost] [127.in-addr.arpa] [0.in-addr.arpa] [255.in-addr.arpa] [tiktok.com] [.] [10.IN-ADDR.ARPA] [16.172.IN-ADDR.ARPA] [17.172.IN-ADDR.ARPA] [18.172.IN-ADDR.ARPA] [19.172.IN-ADDR.ARPA] [20.172.IN-ADDR.ARPA] [21.172.IN-ADDR.ARPA] [22.172.IN-ADDR.ARPA] [23.172.IN-ADDR.ARPA] [24.172.IN-ADDR.ARPA] [25.172.IN-ADDR.ARPA] [26.172.IN-ADDR.ARPA] [27.172.IN-ADDR.ARPA] [28.172.IN-ADDR.ARPA] [29.172.IN-ADDR.ARPA] [30.172.IN-ADDR.ARPA] [31.172.IN-ADDR.ARPA] [64.100.IN-ADDR.ARPA] [65.100.IN-ADDR.ARPA] [66.100.IN-ADDR.ARPA] [67.100.IN-ADDR.ARPA] [68.100.IN-ADDR.ARPA] [69.100.IN-ADDR.ARPA] [70.100.IN-ADDR.ARPA] [71.100.IN-ADDR.ARPA] [72.100.IN-ADDR.ARPA] [73.100.IN-ADDR.ARPA] [74.100.IN-ADDR.ARPA] [75.100.IN-ADDR.ARPA] [76.100.IN-ADDR.ARPA] [77.100.IN-ADDR.ARPA] [78.100.IN-ADDR.ARPA] [79.100.IN-ADDR.ARPA] [80.100.IN-ADDR.ARPA] [81.100.IN-ADDR.ARPA] [82.100.IN-ADDR.ARPA] [83.100.IN-ADDR.ARPA] [84.100.IN-ADDR.ARPA] [85.100.IN-ADDR.ARPA] [86.100.IN-ADDR.ARPA] [87.100.IN-ADDR.ARPA] [88.100.IN-ADDR.ARPA] [89.100.IN-ADDR.ARPA] [90.100.IN-ADDR.ARPA] [91.100.IN-ADDR.ARPA] [92.100.IN-ADDR.ARPA] [93.100.IN-ADDR.ARPA] [94.100.IN-ADDR.ARPA] [95.100.IN-ADDR.ARPA] [96.100.IN-ADDR.ARPA] [97.100.IN-ADDR.ARPA] [98.100.IN-ADDR.ARPA] [99.100.IN-ADDR.ARPA] [100.100.IN-ADDR.ARPA] [101.100.IN-ADDR.ARPA] [102.100.IN-ADDR.ARPA] [103.100.IN-ADDR.ARPA] [104.100.IN-ADDR.ARPA] [105.100.IN-ADDR.ARPA] [106.100.IN-ADDR.ARPA] [107.100.IN-ADDR.ARPA] [108.100.IN-ADDR.ARPA] [109.100.IN-ADDR.ARPA] [110.100.IN-ADDR.ARPA] [111.100.IN-ADDR.ARPA] [112.100.IN-ADDR.ARPA] [113.100.IN-ADDR.ARPA] [114.100.IN-ADDR.ARPA] [115.100.IN-ADDR.ARPA] [116.100.IN-ADDR.ARPA] [117.100.IN-ADDR.ARPA] [118.100.IN-ADDR.ARPA] [119.100.IN-ADDR.ARPA] [120.100.IN-ADDR.ARPA] [121.100.IN-ADDR.ARPA] [122.100.IN-ADDR.ARPA] [123.100.IN-ADDR.ARPA] [124.100.IN-ADDR.ARPA] [125.100.IN-ADDR.ARPA] [126.100.IN-ADDR.ARPA] [127.100.IN-ADDR.ARPA] [254.169.IN-ADDR.ARPA] [2.0.192.IN-ADDR.ARPA] [100.51.198.IN-ADDR.ARPA] [113.0.203.IN-ADDR.ARPA] [255.255.255.255.IN-ADDR.ARPA] [0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA] [1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA] [D.F.IP6.ARPA] [8.E.F.IP6.ARPA] [9.E.F.IP6.ARPA] [A.E.F.IP6.ARPA] [B.E.F.IP6.ARPA] [8.B.D.0.1.0.0.2.IP6.ARPA] [EMPTY.AS112.ARPA] [HOME.ARPA] [RESOLVER.ARPA] [version.bind (view: _bind)] [hostname.bind (view: _bind)] [authors.bind (view: _bind)] [id.server (view: _bind)] --- Statistics Dump --- (1749440599) > On Jun 8, 2025, at 8:48 PM, Ondřej Surý wrote: > > Does the named report proper max-cache-size into the log when starting? > > Something like: > > 'max-cache- > size 90%' - setting to 86522MB (out of 96136MB) > > Ondrej > -- > Ondřej Surý — ISC (He/Him) > > My working hours and your working hours may be different. Please do not feel > obligated to reply outside your normal working hours. > >> On 8. 6. 2025, at 22:45, Philip Prindeville via bind-users >> wrote: >> >> I’m currently doing an “rndc flush” every hour to stop my system from >> getting exhausted. I’ll disable that and report back in a few hours. > -- Visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information. bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users
Re: Significant memory usage
I’ve been running for 12+ hours with a max-cache-size of 256M (since I’m on a machine with 2GB that does a lot of data reduction as it’s a honeypot firewall). This is what I’ve collected. +++ Statistics Dump +++ (1749514002) ++ Incoming Requests ++ 203077 QUERY 12014 UPDATE ++ Incoming Queries ++ 108935 A 2020 NS 24 CNAME 2290 SOA 1407 PTR 701 MX 18025 TXT 39666 1462 SRV 1181 NAPTR 2 DNSKEY 5967 SVCB 21397 HTTPS ++ Outgoing Rcodes ++ 152520 NOERROR 189 SERVFAIL 41017 NXDOMAIN 45 YXDOMAIN 11623 NOTAUTH ++ Outgoing Queries ++ [View: default] 92795 A 42799 NS 241 CNAME 1 SOA 357 PTR 332 MX 2529 TXT 29075 248 SRV 236 NAPTR 8493 DS 1498 DNSKEY 13084 HTTPS [View: _bind] ++ Name Server Statistics ++ 215091 IPv4 requests received 72199 requests with EDNS(0) received 12276 requests with TSIG received 11623 requests with invalid signature 622 TCP requests received 2 TCP connection high-water 205394 responses sent 192 truncated responses sent 72199 responses with EDNS(0) sent 12276 responses with TSIG sent 130275 queries resulted in successful answer 9979 queries resulted in authoritative answer 183212 queries resulted in non authoritative answer 21899 queries resulted in nxrrset 189 queries resulted in SERVFAIL 41017 queries resulted in NXDOMAIN 105274 queries caused recursion 9693 duplicate queries received 4 queries dropped 346 updates completed 45 updates failed 45 updates rejected due to prerequisite failure 89 Recursive clients high-water 202597 UDP queries received 366 TCP queries received 2203 synthesized a NXDOMAIN response 107 synthesized a no-data response 1036 queries triggered prefetch ++ Zone Maintenance Statistics ++ 2 IPv4 notifies sent ++ Resolver Statistics ++ [Common] [View: default] 191688 IPv4 queries sent 190652 IPv4 responses received 33532 NXDOMAIN received 1 SERVFAIL received 6 FORMERR received 6 EDNS(0) query failures 149 truncated responses received 9 lame delegations received 51499 query retries 1040 query timeouts 8083 IPv4 NS address fetches 53 IPv4 NS address fetch failed 173129 DNSSEC validation attempted 97820 DNSSEC validation succeeded 75297 DNSSEC NX validation succeeded 12 DNSSEC validation failed 182275 queries with RTT 10-100ms 8354 queries with RTT 100-500ms 2 queries with RTT 500-800ms 1 queries with RTT 800-1600ms 2 queries with RTT > 1600ms 4 bucket size 149 REFUSED received 187740 COOKIE send with client cookie only 3942 COOKIE sent with client and server cookie 9016 COOKIE replies received 7837 COOKIE client ok 91 bad cookie rcode 4 spilled due to clients per query quota 18 waited for next item 1 priming queries [View: _bind] 4 bucket size ++ Cache Statistics ++ [View: default] 1235195 cache hits 26 cache misses 309936 cache hits (from query) 152645 cache misses (from query) 0 cache records deleted due to memory exhaustion 95115 cache records deleted due to TTL expiration 90472 covering nsec returned 8227 cache database nodes 160 cache NSEC auxiliary database nodes 0 cache database hash buckets 4145226 cache tree memory in use 131296 cache heap memory in use [View: _bind (Cache: _bind)] 0 cache hits 0 cache misses 0 cache hits (from query) 0 cache misses (from query) 0 cache re
Re: Significant memory usage
I take it back, it does at the beginning of the manual. It would be helpful if all references to had links back to the explanation. Odd that when you specify a percentage the effective amount is logged by named, but when you specify an absolute amount it’s not. > On Jun 8, 2025, at 10:46 PM, Philip Prindeville via bind-users > wrote: > > I read: > > https://bind9.readthedocs.io/en/v9.20.9/reference.html#namedconf-statement-max-cache-size > > and it doesn’t explain the notation for . > > > > >> On Jun 8, 2025, at 10:39 PM, Ondřej Surý wrote: >> >> What If you actually read the manual that I sent you - syntax of sizeval is >> explained there. >> -- >> Ondřej Surý — ISC (He/Him) >> >> My working hours and your working hours may be different. Please do not feel >> obligated to reply outside your normal working hours. >> >>> On 9. 6. 2025, at 6:34, Philip Prindeville >>> wrote: >>> >>> Maybe GB is the only unit it groks. >>> >>> >>> Jun 8 22:31:52 OpenWrt named[19145]: /etc/bind/named.conf:42: expected >>> integer and optional unit or percent near ‘1536MB’ >>> >>> Nope: >>> >>> Jun 8 22:32:48 OpenWrt named[19609]: /etc/bind/named.conf:43: expected >>> integer and optional unit or percent near ‘2GB' >>> >>> >>> >>>> On Jun 8, 2025, at 10:29 PM, Ondřej Surý wrote: >>>> >>>> It does have the effect. >>>> >>>> Also there’s BIND 9 ARM at https://bind9.readthedocs.io/en/v9.20.9/ >>>> -- >>>> Ondřej Surý — ISC (He/Him) >>>> >>>> My working hours and your working hours may be differentw . Please do not >>>> feel obligated to reply outside your normal working hours. >>>> >>>>>> On 9. 6. 2025, at 6:20, Philip Prindeville >>>>>> wrote: >>>>> >>>>> but doesn’t explain the syntax of “sizeval”. >>>>> >>>>> I tried “1638M” but that doesn’t seem to have an effect. >>> >>> >> > > -- > Visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from > this list > > ISC funds the development of this software with paid support subscriptions. > Contact us at https://www.isc.org/contact/ for more information. > > > bind-users mailing list > bind-users@lists.isc.org > https://lists.isc.org/mailman/listinfo/bind-users -- Visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information. bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users
Re: Significant memory usage
Jun 8 22:22:10 OpenWrt named[15142]: /etc/bind/named.conf:42: expected integer and optional unit or percent near '1638MB' > On Jun 8, 2025, at 10:17 PM, Ondřej Surý wrote: > > Yes, there's no math involved, it just honors the limit. > > FTR you can also say: > > max-cache-size 2GB; > > You don't have to specify it to the last byte. > > Ondrej > -- > Ondřej Surý (He/Him) > ond...@isc.org > > My working hours and your working hours may be different. Please do not feel > obligated to reply outside your normal working hours. > >> On 9. 6. 2025, at 6:12, Philip Prindeville >> wrote: >> >> Odd. I tried: >> >> max-cache-size 1717986918; >> >> and restarted and I don’t see anything in the logs about it. But I did when >> I used a percentage. >> >> >> >>> On Jun 8, 2025, at 10:02 PM, Ondřej Surý wrote: >>> >>> The 1.7GB is what the system is reporting. That’s why I asked as I’ve seen >>> OpenWRT reporting weird or no values before. >>> >>> 171MB cache is little on a low side and negative effects from overmem LRU >>> cleaning will going to hurt the performance. >>> >>> I would suggest to set a fixed size for the cache - 1.6GB-2GB should be >>> more than enough for your purposes. >>> >>> Ondrej >>> -- >>> Ondřej Surý — ISC (He/Him) >>> >>> My working hours and your working hours may be different. Please do not >>> feel obligated to reply outside your normal working hours. >>> On 9. 6. 2025, at 5:45, Philip Prindeville wrote: Jun 8 21:34:08 OpenWrt named[8106]: /etc/bind/named.conf:42: 'max-cache-size 10%' - setting to 171MB (out of 1714MB) but no idea where the 1741MB that it is basing that off of is coming from. >>> >> > -- Visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information. bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users
Re: Significant memory usage
I read: https://bind9.readthedocs.io/en/v9.20.9/reference.html#namedconf-statement-max-cache-size and it doesn’t explain the notation for . > On Jun 8, 2025, at 10:39 PM, Ondřej Surý wrote: > > What If you actually read the manual that I sent you - syntax of sizeval is > explained there. > -- > Ondřej Surý — ISC (He/Him) > > My working hours and your working hours may be different. Please do not feel > obligated to reply outside your normal working hours. > >> On 9. 6. 2025, at 6:34, Philip Prindeville >> wrote: >> >> Maybe GB is the only unit it groks. >> >> >> Jun 8 22:31:52 OpenWrt named[19145]: /etc/bind/named.conf:42: expected >> integer and optional unit or percent near ‘1536MB’ >> >> Nope: >> >> Jun 8 22:32:48 OpenWrt named[19609]: /etc/bind/named.conf:43: expected >> integer and optional unit or percent near ‘2GB' >> >> >> >>> On Jun 8, 2025, at 10:29 PM, Ondřej Surý wrote: >>> >>> It does have the effect. >>> >>> Also there’s BIND 9 ARM at https://bind9.readthedocs.io/en/v9.20.9/ >>> -- >>> Ondřej Surý — ISC (He/Him) >>> >>> My working hours and your working hours may be differentw . Please do not >>> feel obligated to reply outside your normal working hours. >>> > On 9. 6. 2025, at 6:20, Philip Prindeville > wrote: but doesn’t explain the syntax of “sizeval”. I tried “1638M” but that doesn’t seem to have an effect. >> >> > -- Visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information. bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users
Re: Significant memory usage
Odd. I tried: max-cache-size 1717986918; and restarted and I don’t see anything in the logs about it. But I did when I used a percentage. > On Jun 8, 2025, at 10:02 PM, Ondřej Surý wrote: > > The 1.7GB is what the system is reporting. That’s why I asked as I’ve seen > OpenWRT reporting weird or no values before. > > 171MB cache is little on a low side and negative effects from overmem LRU > cleaning will going to hurt the performance. > > I would suggest to set a fixed size for the cache - 1.6GB-2GB should be more > than enough for your purposes. > > Ondrej > -- > Ondřej Surý — ISC (He/Him) > > My working hours and your working hours may be different. Please do not feel > obligated to reply outside your normal working hours. > >> On 9. 6. 2025, at 5:45, Philip Prindeville >> wrote: >> >> Jun 8 21:34:08 OpenWrt named[8106]: /etc/bind/named.conf:42: >> 'max-cache-size 10%' - setting to 171MB (out of 1714MB) >> >> but no idea where the 1741MB that it is basing that off of is coming from. > -- Visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information. bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users
Re: Significant memory usage
I’ll try to get a smoking gun. How do you configure an explicit number of bytes with max-cache-size? The manpage says: max-cache-size ( default | unlimited | | ); but doesn’t explain the syntax of “sizeval”. I tried “1638M” but that doesn’t seem to have an effect. > On Jun 8, 2025, at 10:16 PM, Ondřej Surý wrote: > > I don't see anything wrong with the memory in the attached file - 13MB > doesn't seem to be causing any havoc. > > And it roughly matches what I am seeing here with fresh named instance on > 64-bit machine: > > $ smem -P name[d] > PID User Command Swap USS PSS RSS > 61387 ondrej /home/ondrej/Projects/bind90 96841194418628 > > Can you send one when you think there's a runaway memory problem? Because > this one seems to be sane: > > /statistics/memory/contexts/context/name=OpenSSL > /statistics/memory/contexts/context/inuse=517912 > /statistics/memory/contexts/context/name=uv > /statistics/memory/contexts/context/inuse=4864 > /statistics/memory/contexts/context/name=libxml2 > /statistics/memory/contexts/context/inuse=401336 > /statistics/memory/contexts/context/name=named_log > /statistics/memory/contexts/context/inuse=9512 > /statistics/memory/contexts/context/name=main > /statistics/memory/contexts/context/inuse=1796991 > /statistics/memory/contexts/context/name=loop- > /statistics/memory/contexts/context/inuse=2037860 > /statistics/memory/contexts/context/name=loop-0001 > /statistics/memory/contexts/context/inuse=2005796 > /statistics/memory/contexts/context/name=helper- > /statistics/memory/contexts/context/inuse=0 > /statistics/memory/contexts/context/name=helper-0001 > /statistics/memory/contexts/context/inuse=0 > /statistics/memory/contexts/context/name=zonemgr-mctxpoo > /statistics/memory/contexts/context/inuse=370549 > /statistics/memory/contexts/context/name=zonemgr-mctxpoo > /statistics/memory/contexts/context/inuse=341440 > /statistics/memory/contexts/context/name=clientmgr > /statistics/memory/contexts/context/inuse=836648 > /statistics/memory/contexts/context/name=clientmgr > /statistics/memory/contexts/context/inuse=962224 > /statistics/memory/contexts/context/name=cache > /statistics/memory/contexts/context/inuse=1513124 > /statistics/memory/contexts/context/name=cache_heap > /statistics/memory/contexts/context/inuse=49264 > /statistics/memory/contexts/context/name=ADB > /statistics/memory/contexts/context/inuse=1848966 > /statistics/memory/contexts/context/name=ADB_dynamic > /statistics/memory/contexts/context/inuse=147632 > /statistics/memory/contexts/context/name=cache > /statistics/memory/contexts/context/inuse=38586 > /statistics/memory/contexts/context/name=cache_heap > /statistics/memory/contexts/context/inuse=112 > /statistics/memory/contexts/context/name=ADB > /statistics/memory/contexts/context/inuse=664 > /statistics/memory/contexts/context/name=ADB_dynamic > /statistics/memory/contexts/context/inuse=196784 > /statistics/memory/summary/InUse=13080208 > > Ondrej > -- > Ondřej Surý (He/Him) > ond...@isc.org > > My working hours and your working hours may be different. Please do not feel > obligated to reply outside your normal working hours. > >> Here’s my statistics-channel output: >> >> -- Visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information. bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users
Re: Significant memory usage
Maybe GB is the only unit it groks. Jun 8 22:31:52 OpenWrt named[19145]: /etc/bind/named.conf:42: expected integer and optional unit or percent near ‘1536MB’ Nope: Jun 8 22:32:48 OpenWrt named[19609]: /etc/bind/named.conf:43: expected integer and optional unit or percent near ‘2GB' > On Jun 8, 2025, at 10:29 PM, Ondřej Surý wrote: > > It does have the effect. > > Also there’s BIND 9 ARM at https://bind9.readthedocs.io/en/v9.20.9/ > -- > Ondřej Surý — ISC (He/Him) > > My working hours and your working hours may be differentw . Please do not > feel obligated to reply outside your normal working hours. > >> On 9. 6. 2025, at 6:20, Philip Prindeville >> wrote: >> >> but doesn’t explain the syntax of “sizeval”. >> >> I tried “1638M” but that doesn’t seem to have an effect. -- Visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information. bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users