From owner-cvs-all Sun Nov 25 16:38:54 2001 Delivered-To: cvs-all@freebsd.org Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by hub.freebsd.org (Postfix) with SMTP id 39EBA37B416; Sun, 25 Nov 2001 16:38:49 -0800 (PST) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 26 Nov 2001 00:38:48 +0000 (GMT) To: Kris Kennaway Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.bin/tail forward.c In-Reply-To: Your message of "Sun, 25 Nov 2001 15:36:56 PST." <20011125153656.A94203@xor.obsecurity.org> Date: Mon, 26 Nov 2001 00:38:47 +0000 From: Ian Dowse Message-ID: <200111260038.aa52845@salmon.maths.tcd.ie> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <20011125153656.A94203@xor.obsecurity.org>, Kris Kennaway writes: >I dunno..the major use of tail -F is probably on logfiles which get >rotated infrequently. I can imagine that a site might want to >simultaneously monitor a large number of logfiles, but I don't know >what the CPU impact of that with your change would be..maybe not much. >If you tail -F, say, 100 simultaneous files, how much CPU does that >stat'ing use? Running 100 "tail -F"s requires a pretty negliglible amount of CPU time (try it!), but kqueue does help by allowing the processes to be swapped out during any long pauses between file updates. The reason for this change is simply to fix a particular use of tail that was broken by the addition of kqueue support. The current code gives us about half of the kqueue gains over the pre-kqueue version for the -F case (changes noticed quickly, polling frequency reduced by a factor of 4). Doing better is of course possible, but it doesn't seem particularly easy. Maybe the author of this patch (Maxim Konovalov) would be willing to have a go at it. Ian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message