From owner-freebsd-current@freebsd.org Sun May 19 02:47:15 2019 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E23E015A0424 for ; Sun, 19 May 2019 02:47:14 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from CAN01-QB1-obe.outbound.protection.outlook.com (mail-eopbgr660085.outbound.protection.outlook.com [40.107.66.85]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "GlobalSign Organization Validation CA - SHA256 - G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6DB327339F; Sun, 19 May 2019 02:47:13 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from YQXPR0101MB2055.CANPRD01.PROD.OUTLOOK.COM (52.132.77.144) by YQXPR0101MB1384.CANPRD01.PROD.OUTLOOK.COM (52.132.81.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1900.17; Sun, 19 May 2019 02:47:10 +0000 Received: from YQXPR0101MB2055.CANPRD01.PROD.OUTLOOK.COM ([fe80::b535:e1a6:ba8b:2143]) by YQXPR0101MB2055.CANPRD01.PROD.OUTLOOK.COM ([fe80::b535:e1a6:ba8b:2143%7]) with mapi id 15.20.1900.010; Sun, 19 May 2019 02:47:10 +0000 From: Rick Macklem To: Alan Somers CC: "freebsd-current@FreeBSD.org" Subject: Re: RFC w.r.t. toggling debugging on/off for mountd via a signal Thread-Topic: RFC w.r.t. toggling debugging on/off for mountd via a signal Thread-Index: AQHVDeUhVyS7UNYXMkevHz6RE46Z1aZxtpUAgAAGAbY= Date: Sun, 19 May 2019 02:47:10 +0000 Message-ID: References: , In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d53ab21a-ba9f-437b-e43a-08d6dc044a98 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(2017052603328)(7193020); SRVR:YQXPR0101MB1384; x-ms-traffictypediagnostic: YQXPR0101MB1384: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-forefront-prvs: 00429279BA x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(136003)(396003)(39850400004)(346002)(376002)(51874003)(199004)(189003)(102836004)(68736007)(6246003)(7696005)(6436002)(4326008)(25786009)(229853002)(99286004)(52536014)(76116006)(2906002)(66946007)(66476007)(305945005)(786003)(186003)(316002)(86362001)(5660300002)(73956011)(66446008)(64756008)(66556008)(256004)(71190400001)(71200400001)(81166006)(81156014)(8676002)(46003)(6506007)(14454004)(55016002)(486006)(9686003)(74482002)(53936002)(76176011)(74316002)(450100002)(11346002)(446003)(478600001)(33656002)(8936002)(476003)(6916009); DIR:OUT; SFP:1101; SCL:1; SRVR:YQXPR0101MB1384; H:YQXPR0101MB2055.CANPRD01.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: uoguelph.ca does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: PXwqO4Aqy4RVsCKP9G7jrwRdW0P8VDwS27A5hP7tIGPxH/vbh+ahB3qg2HGa3De+xml6TPptE4mGN9oT4YYlvGDK8UXRAUlQEbwQvGJHljfOXgnTsfDurecNGR4Rt2Haz0Rag7J0TYFdBPX+08pR5xWhcZL2Um9zzKwlcIUEn40grRni6Sw6Cvnpz4fLFqnkBwjuSGH6HpPvacG9ZnsylbTQ/Si34odCoyk0i77pQvjYmY9uvdhkduqqrUbcDu2h2nQuUjFrlp+WfkOtgCpKheFtw8+BS+wSdY/wDHcj24CzU/HVujOaa3GaRFXQ7R5TgYvadQ0hlzU4YgP1ZikJ/6PMYsWzeDP76T7tpmtBsgR71OYWmrlDJ3i7V+snelmmSgBRkgGNFoPsgjRge9lvqBlVLEFdS1SAfNyTxWgqRUE= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: uoguelph.ca X-MS-Exchange-CrossTenant-Network-Message-Id: d53ab21a-ba9f-437b-e43a-08d6dc044a98 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 May 2019 02:47:10.8268 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: YQXPR0101MB1384 X-Rspamd-Queue-Id: 6DB327339F X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of rmacklem@uoguelph.ca designates 40.107.66.85 as permitted sender) smtp.mailfrom=rmacklem@uoguelph.ca X-Spamd-Result: default: False [-1.89 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; NEURAL_HAM_MEDIUM(-0.96)[-0.964,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:40.107.0.0/16]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[uoguelph.ca]; NEURAL_HAM_LONG(-0.99)[-0.991,0]; NEURAL_SPAM_SHORT(0.37)[0.370,0]; RCVD_COUNT_THREE(0.00)[3]; MX_GOOD(-0.01)[cached: mx2.hc184-76.ca.iphmx.com]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[85.66.107.40.list.dnswl.org : 127.0.3.0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 May 2019 02:47:15 -0000 Alan Somers wrote: >On Sat, May 18, 2019 at 7:59 PM Rick Macklem wrote: >> >> Hi, >> >> I've been working with Peter Errikson on a patch for mountd that adds a = new option >> for incremental updating of exports. This seems to be helping a lot w.r.= t. performance >> on an NFS server with lots (10000+) of exported file systems. >> >> I have debug syslog() calls in the code, which I/Peter think would be wo= rth keeping >> in the production code in case someone runs into problems with this new = option. >> >> As such, I'd like to have the code compiled in by default (not only if D= EBUG is defined, >> as mountd.c has now). I also was thinking it would be nice if the daemon= didn't need >> to be restarted to enable/disable the debugging output, since that break= s NFS >> mounting during the restart. >> >> So, I was thinking of having the debugging output toggled on/off via SIG= USR1. >> >> What do you think of this idea? >> Any other/better ways to do this? >> Also, would LOG_DAEMON and LOG_DEBUG sound like the correct facility and >> priority for theses syslog() calls? >> >> Thanks in advance for any comments, rick > >If the debug messages aren't so verbose that they'll slow down >syslogd, then you can just leave them enabled all the time. syslogd >will filter them. However, if they're super-verbose then SIGUSR1 >sounds reasonable. I can't think of another daemon with runtime >selectable logging verbosity like that. Yes, these are pretty chatty. 5-10 lines for each entry in an exports file. Multiply that times the number of entries. (Peter's servers are between 200= 00 to 72000+ file systems. Not sure if he has multiple entries/file system.) To give you a clue, without this patch, it can take 20sec->over 1min to rel= oad them when mountd gets a SIGHUP. It's just that the export file handling code is pretty convoluted, so I thi= nk the patch is ok, but I won't be too surprised if someone finds a problem. rick