daemon shutdown time with large zones (bind 9.2.4)

Chris Timmons cwt at networks.cwu.edu
Tue Sep 28 23:03:25 UTC 2004


I'm making the transition from 8.x and noticed that it takes a really long
time to shutdown named (9.2.4) when zones are extremely large.

I have a named instance which loads and redistributes locally the rbl-plus
zone, which is about 81mb in size.

Running on an otherwise lightly loaded FreeBSD 4.10 machine with
dual-xeons, 4GB physical memory and lots of fast disk storage, it takes
about 38 seconds to load the zone.  That seems normal for such a large
zone:

Sep 28 13:40:38.813 zone rbl-plus.mail-abuse.org/IN: starting load
Sep 28 13:41:16.580 zone rbl-plus.mail-abuse.org/IN: loaded

However, when I send named a SIGTERM, it takes about 7:38 to exit normally
- all the while in a compute bound loop:

	Sep 28 13:41:16.585 mgr_destroy
	Sep 28 13:41:16.585 calling free_rbtdb(.)
	Sep 28 13:41:16.585 done free_rbtdb(.)
	Sep 28 13:41:16.585 calling free_rbtdb(.)
	Sep 28 13:41:16.585 done free_rbtdb(.)
	Sep 28 13:48:54.535 done free_rbtdb(rbl-plus.mail-abuse.org)

To see what it was doing, I attached with GDB (more info below) and
discovered it was traversing a data structure in a while loop - ostensibly
making sure that the integrity of the structure is intact as the daemon
exits.  Even at an 81mb zone size, I would think that this would go
faster.

I was wondering if there is a configure-time or run-time configuration
technique that I could use to speed this up?

Regards,
-Chris




(gdb) bt
#0  0x80a8fbf in dns_rbt_deletetreeflat (rbt=0x81dc9c0, nodep=0x81dc9c8)
at rbt.c:1706
#1  0x80a5cfa in dns_rbt_destroy2 (rbtp=0x822e298, quantum=5) at rbt.c:318
#2  0x80a9ee9 in free_rbtdb (rbtdb=0x822e200, log=isc_boolean_true,
event=0x81dc200) at rbtdb.c:374
#3  0x80a9e37 in free_rbtdb_callback (task=0x81d4500, event=0x81dc200) at
rbtdb.c:356
#4  0x814c89e in dispatch (manager=0x81dc140) at task.c:855
#5  0x814cf4c in isc__taskmgr_dispatch () at task.c:1248
#6  0x814cec9 in isc_taskmgr_destroy (managerp=0x81bbda8) at task.c:1224
#7  0x80520b5 in destroy_managers () at ./main.c:462
#8  0x8052276 in cleanup () at ./main.c:566
#9  0x805247e in main (argc=8, argv=0xbfbff974) at ./main.c:741


Attaching to program: /home/cwt/rcvs/src/sysutils/bind9/bin/named/named,
process 67444
0x80a8fbf in dns_rbt_deletetreeflat (rbt=0x81dc9c0, nodep=0x81dc9c8) at
rbt.c:1706
1706               }
(gdb) s
1704                     INSIST(HASHNEXT(bucket_node) != NULL);
(gdb) s
1705                     bucket_node = HASHNEXT(bucket_node);
(gdb) s
1706               }
(gdb) s



More information about the bind-users mailing list