CC: bind-workers@isc.org
List-Archive:
MIME-Version: 1.0
List-Post:
X-Spam-Status: No, score=-3.2 required=5.0 tests=ALL_TRUSTED,BAYES_00, DCC_CHECK,RP_MATCHES_RCVD autolearn=unavailable autolearn_force=no version=3.4.0
In-Reply-To: Your message of "Mon, 23 Jan 2017 19:34:13 -0000."
Errors-To: bind-workers-bounces@isc.org
List-Help:
X-Mailman-Version: 2.1.20
References:
content-type: text/plain; charset="utf-8"
Message-ID: <20170123195516.1CC9E602D6CE@rock.dv.isc.org>
Received: from rock.dv.isc.org (localhost [IPv6:::1]) by rock.dv.isc.org (Postfix) with ESMTP id BB808602D751 for ; Tue, 24 Jan 2017 06:59:07 +1100 (EST)
Received: from zimbra.isc.org [149.20.0.17] by rock.dv.isc.org with IMAP (fetchmail-6.3.22) for (single-drop); Tue, 24 Jan 2017 06:59:07 +1100 (EST)
Received: from zmx1.isc.org (LHLO zmx1.isc.org) (149.20.0.20) by zmail1.isc.org with LMTP; Mon, 23 Jan 2017 19:55:37 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1]) by zmx1.isc.org (Postfix) with ESMTP id 7BA9F160072 for ; Mon, 23 Jan 2017 19:55:37 +0000 (UTC)
Received: from zmx1.isc.org ([127.0.0.1]) by localhost (zmx1.isc.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id z7jP7KFIyhen for ; Mon, 23 Jan 2017 19:55:37 +0000 (UTC)
Received: from mx.pao1.isc.org (mx.pao1.isc.org [149.20.64.53]) by zmx1.isc.org (Postfix) with ESMTPS id 5632B16006D for ; Mon, 23 Jan 2017 19:55:37 +0000 (UTC)
Received: from lists.isc.org (lists.isc.org [149.20.1.60]) by mx.pao1.isc.org (Postfix) with ESMTP id BC78834951E for ; Mon, 23 Jan 2017 19:55:34 +0000 (UTC)
Received: from lists.isc.org (localhost [127.0.0.1]) by lists.isc.org (Postfix) with ESMTP id E08F467EE4D; Mon, 23 Jan 2017 19:55:30 +0000 (UTC)
Received: from mx.ams1.isc.org (mx.ams1.isc.org [199.6.1.65]) by lists.isc.org (Postfix) with ESMTP id 3FD0D67ED65 for ; Mon, 23 Jan 2017 19:55:28 +0000 (UTC)
Received: from zmx1.isc.org (zmx1.isc.org [149.20.0.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx.ams1.isc.org (Postfix) with ESMTPS id 068981FCC65; Mon, 23 Jan 2017 19:55:21 +0000 (UTC)
Received: from zmx1.isc.org (localhost [127.0.0.1]) by zmx1.isc.org (Postfix) with ESMTPS id B6929160052; Mon, 23 Jan 2017 19:55:19 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1]) by zmx1.isc.org (Postfix) with ESMTP id 9B79A16006D; Mon, 23 Jan 2017 19:55:19 +0000 (UTC)
Received: from zmx1.isc.org ([127.0.0.1]) by localhost (zmx1.isc.org [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id J1u4EOi5mzzU; Mon, 23 Jan 2017 19:55:19 +0000 (UTC)
Received: from rock.dv.isc.org (c27-253-115-14.carlnfd2.nsw.optusnet.com.au [27.253.115.14]) by zmx1.isc.org (Postfix) with ESMTPSA id 445DF160052; Mon, 23 Jan 2017 19:55:19 +0000 (UTC)
Received: from rock.dv.isc.org (localhost [IPv6:::1]) by rock.dv.isc.org (Postfix) with ESMTP id 1CC9E602D6CE; Tue, 24 Jan 2017 06:55:16 +1100 (EST)
Delivered-To: marka@localhost.dv.isc.org
Delivered-To: bind-workers@lists.isc.org
Subject: Re: ISC_MEM_TRACKLINES is accidentally quadratic, was Re: support for large batch jobs with mdig
Return-Path:
X-Original-To: marka@localhost
X-Original-To: bind-workers@lists.isc.org
List-Subscribe: ,
Sender: "bind-workers"
Date: Tue, 24 Jan 2017 06:55:16 +1100
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mx.pao1.isc.org
Precedence: list
X-Beenthere: bind-workers@lists.isc.org
List-ID: BIND Workers Mailing List
To: "Tony Finch"
Content-Transfer-Encoding: 7bit
List-Unsubscribe: ,
From: "Mark Andrews"
X-RT-Original-Encoding: ascii
Content-Length: 1959
In message , Tony Finch writes:
> Tony Finch wrote:
> >
> > If I give mdig more than a few hundred thousand queries it seems to hang
> > at the end of the job. On further investigation, there is something
> > accidentally quadratic in the cleanup code!
Remove "isc_mem_debugging = ISC_MEM_DEBUGRECORD;" from the start
of main in mdig.c. It got left in from developement. The flag is very
good at reporting what memory is leaking but it isn't the fastest
code.
mdig needs dig's preparse args to set isc_mem_debugging.
Mark
> This accidentally quadratic performance is to do with ISC_MEM_TRACKLINES -
> turn that off and freeing is instant! But it needs a fix...
>
> ---
> lib/dns/openssl_link.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/lib/dns/openssl_link.c b/lib/dns/openssl_link.c
> index 29facf3..4e0976e 100644
> --- a/lib/dns/openssl_link.c
> +++ b/lib/dns/openssl_link.c
> @@ -122,10 +122,17 @@ id_callback(void) {
> #endif
>
> #if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
> -#define FLARG_PASS , __FILE__, __LINE__
> +
> #define FLARG
> #define FILELINE
> +#if ISC_MEM_TRACKLINES
> +#define FLARG_PASS , __FILE__, __LINE__
> #else
> +#define FLARG_PASS
> +#endif
> +
> +#else
> +
> #define FLARG , const char *file, int line
> #define FILELINE , __FILE__, __LINE__
> #if ISC_MEM_TRACKLINES
> --
> 2.10.1.445.g3cdd5d1
>
> _______________________________________________
> bind-workers mailing list
> bind-workers@lists.isc.org
> https://lists.isc.org/mailman/listinfo/bind-workers
--
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742 INTERNET: marka@isc.org
_______________________________________________
bind-workers mailing list
bind-workers@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-workers