List-Archive: MIME-Version: 1.0 List-Post: X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DCC_CHECK, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD autolearn=ham autolearn_force=no version=3.4.0 In-Reply-To: Errors-To: bind-workers-bounces@isc.org List-Help: X-Cam-Antivirus: no malware found X-Mailman-Version: 2.1.20 References: content-type: text/plain; charset="utf-8" Message-ID: Replied: Tue, 24 Jan 2017 06:55:16 +1100 Replied: Tony Finch Replied: bind-workers@isc.org Received: from rock.dv.isc.org (localhost [IPv6:::1]) by rock.dv.isc.org (Postfix) with ESMTP id 41470602D2E3 for ; Tue, 24 Jan 2017 06:38:47 +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:38:47 +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:34:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by zmx1.isc.org (Postfix) with ESMTP id A7BC616006D for ; Mon, 23 Jan 2017 19:34:43 +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 ak1NU8Sv4yA8 for ; Mon, 23 Jan 2017 19:34:43 +0000 (UTC) Received: from mx.ams1.isc.org (mx.ams1.isc.org [199.6.1.65]) by zmx1.isc.org (Postfix) with ESMTPS id 5F5AE160052 for ; Mon, 23 Jan 2017 19:34:43 +0000 (UTC) Received: from lists.isc.org (lists.isc.org [149.20.1.60]) by mx.ams1.isc.org (Postfix) with ESMTP id E60701FCC6A for ; Mon, 23 Jan 2017 19:34:39 +0000 (UTC) Received: from lists.isc.org (localhost [127.0.0.1]) by lists.isc.org (Postfix) with ESMTP id 65B5C67ED5E; Mon, 23 Jan 2017 19:34:20 +0000 (UTC) Received: from mx.pao1.isc.org (mx.pao1.isc.org [149.20.64.53]) by lists.isc.org (Postfix) with ESMTP id D09AA67ED44 for ; Mon, 23 Jan 2017 19:34:17 +0000 (UTC) Received: from ppsw-43.csi.cam.ac.uk (ppsw-43.csi.cam.ac.uk [131.111.8.143]) by mx.pao1.isc.org (Postfix) with ESMTP id 99B1F3494EF for ; Mon, 23 Jan 2017 19:34:15 +0000 (UTC) Received: from grey.csi.cam.ac.uk ([131.111.57.57]:52596) by ppsw-43.csi.cam.ac.uk (ppsw.cam.ac.uk [131.111.8.139]:25) with esmtps (TLSv1:ECDHE-RSA-AES256-SHA:256) id 1cVkNZ-0008Hp-nb (Exim 4.88) for bind-workers@lists.isc.org (return-path ); Mon, 23 Jan 2017 19:34:13 +0000 Delivered-To: marka@localhost.dv.isc.org Delivered-To: bind-workers@lists.isc.org Subject: ISC_MEM_TRACKLINES is accidentally quadratic, was Re: support for large batch jobs with mdig User-Agent: Alpine 2.11 (DEB 23 2013-08-11) Return-Path: X-Original-To: marka@localhost X-Original-To: bind-workers@lists.isc.org List-Subscribe: , Sender: "bind-workers" Date: Mon, 23 Jan 2017 19:34:13 +0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mx.ams1.isc.org Precedence: list X-Beenthere: bind-workers@lists.isc.org List-ID: BIND Workers Mailing List To: bind-workers@isc.org Content-Transfer-Encoding: 7bit List-Unsubscribe: , X-Cam-Scannerinfo: http://help.uis.cam.ac.uk/email-scanner-virus From: "Tony Finch" X-RT-Original-Encoding: ascii Content-Length: 1224 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! 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