From nobody Thu Feb 10 19:32:36 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id ACDA519C37D9; Thu, 10 Feb 2022 19:32:43 +0000 (UTC) (envelope-from chuq@chuq.com) Received: from vc.chuq.com (vc.chuq.com [166.84.7.169]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "Chuck Silvers", Issuer "Chuck Silvers" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Jvn2g2nlWz3CM1; Thu, 10 Feb 2022 19:32:43 +0000 (UTC) (envelope-from chuq@chuq.com) Received: from spathi.chuq.com (spathi.chuq.com [98.51.95.93]) by vc169.vc.panix.com (Postfix) with ESMTPS id 4D6523B5D86; Thu, 10 Feb 2022 11:32:37 -0800 (PST) (envelope-from chuq@chuq.com) Received: by spathi.chuq.com (Postfix, from userid 1022) id 97A8A3CFFA24; Thu, 10 Feb 2022 11:32:36 -0800 (PST) Date: Thu, 10 Feb 2022 11:32:36 -0800 From: Chuck Silvers To: Mateusz Piotrowski <0mp@FreeBSD.org> Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org, dtrace@freebsd.org Subject: Re: git: f339a3ef6369 - main - dtrace: remove unnecessary fflush() Message-ID: References: <202202100248.21A2mMWw070398@gitrepo.freebsd.org> <50175512-5528-f93f-33cf-90f92f2e41b1@FreeBSD.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <50175512-5528-f93f-33cf-90f92f2e41b1@FreeBSD.org> X-Rspamd-Queue-Id: 4Jvn2g2nlWz3CM1 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On Thu, Feb 10, 2022 at 02:36:30PM +0100, Mateusz Piotrowski wrote: > Hello everyone, > > On 10/02/2022 03:48, Chuck Silvers wrote: > > The branch main has been updated by chs: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=f339a3ef6369b368f3a2455792a7a3a4c28f92c4 > > > > commit f339a3ef6369b368f3a2455792a7a3a4c28f92c4 > > Author: Chuck Silvers > > AuthorDate: 2022-02-10 01:09:26 +0000 > > Commit: Chuck Silvers > > CommitDate: 2022-02-10 01:09:26 +0000 > > > > dtrace: remove unnecessary fflush() > > This call was added back in the early days of dtrace porting and > > no one knows why anymore. The extra flushing causes lots of > > unnecessary CPU overhead when a script produces lots of output, > > as well as easily losing output because the command can't keep up. > > Did you have some specific way to measure the CPU overhead of DTrace here? > I'm interested in this kind of performance measurements and I wonder if > anything more sophisticated than observing top(1) was used to test this > change. Thanks! I just looked at top and saw that the CPU usage of the dtrace process dropped from 100% to around 13%. More importantly, when the fflush was present dtrace would report that millions of output records were being dropped, and after the fflush was removed then dtrace no longer reported any dropped output. -Chuck