Re: daemon shutdown time with large zones (bind 9.2.4)

This is a discussion on Re: daemon shutdown time with large zones (bind 9.2.4) within the Bind Users forums, part of the DNS and Related Forums category; >>>>> On Fri, 1 Oct 2004 13:48:42 -0700 (PDT), >>>>> ...


Go Back   Usenet Forums > DNS and Related Forums > Bind Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-01-2004
JINMEI Tatuya / $B?@L@C#:H
 
Posts: n/a
Default Re: daemon shutdown time with large zones (bind 9.2.4)

>>>>> On Fri, 1 Oct 2004 13:48:42 -0700 (PDT),
>>>>> Chris Timmons <cwt@networks.cwu.edu> said:


> Yes - that is right. The daemon shuts down in ~6:36 now.


Hmm, okay. If you have time for an experimental, more-aggressive
solution, could you try the attached patch to see how it works (either
with or without ISC_MEM_USE_INTERNAL_MALLOC)? It will completely skip
freeing actual memory at the shutdown procedure.

JINMEI, Tatuya
Communication Platform Lab.
Corporate R&D Center, Toshiba Corp.
jinmei@isl.rdc.toshiba.co.jp

diff -r -u bind-9.2.4.orig/bin/named/server.c bind-9.2.4/bin/named/server.c
--- bind-9.2.4.orig/bin/named/server.c Fri May 14 10:04:46 2004
+++ bind-9.2.4/bin/named/server.c Sat Oct 2 07:16:24 2004
@@ -2368,6 +2368,7 @@
view = view_next) {
view_next = ISC_LIST_NEXT(view, link);
ISC_LIST_UNLINK(server->viewlist, view, link);
+ isc_mem_setshutdown(view->mctx);
if (flush)
dns_view_flushanddetach(&view);
else
diff -r -u bind-9.2.4.orig/lib/isc/include/isc/mem.h bind-9.2.4/lib/isc/include/isc/mem.h
--- bind-9.2.4.orig/lib/isc/include/isc/mem.h Tue Mar 9 15:11:58 2004
+++ bind-9.2.4/lib/isc/include/isc/mem.h Sat Oct 2 07:16:24 2004
@@ -410,6 +410,8 @@
* limit > 0
*/

+void
+isc_mem_setshutdown(isc_mem_t *ctx);

/*
* Pseudo-private functions for use via macros. Do not call directly.
diff -r -u bind-9.2.4.orig/lib/isc/mem.c bind-9.2.4/lib/isc/mem.c
--- bind-9.2.4.orig/lib/isc/mem.c Tue Mar 9 15:11:48 2004
+++ bind-9.2.4/lib/isc/mem.c Sat Oct 2 07:16:24 2004
@@ -146,6 +146,8 @@
#endif

unsigned int memalloc_failures;
+
+ isc_boolean_t shuttingdown;
};

#define MEMPOOL_MAGIC ISC_MAGIC('M', 'E', 'M', 'p')
@@ -616,7 +618,8 @@
#else
UNUSED(size);
#endif
- (ctx->memfree)(ctx->arg, mem);
+ if (!ctx->shuttingdown)
+ (ctx->memfree)(ctx->arg, mem);
}

/*
@@ -1723,4 +1726,13 @@
UNLOCK(mpctx->lock);

return (fillcount);
+}
+
+void
+isc_mem_setshutdown(isc_mem_t *ctx) {
+ REQUIRE(VALID_CONTEXT(ctx));
+
+ LOCK(&ctx->lock);
+ ctx->shuttingdown = ISC_TRUE;
+ UNLOCK(&ctx->lock);
}

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:56 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0