From owner-cvs-src@FreeBSD.ORG Fri Mar 31 14:28:31 2006 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 592A116A401; Fri, 31 Mar 2006 14:28:31 +0000 (UTC) (envelope-from Alexander@Leidinger.net) Received: from www.ebusiness-leidinger.de (jojo.ms-net.de [84.16.236.246]) by mx1.FreeBSD.org (Postfix) with ESMTP id 83C5A43D48; Fri, 31 Mar 2006 14:28:29 +0000 (GMT) (envelope-from Alexander@Leidinger.net) Received: from Andro-Beta.Leidinger.net (p54A5D4BF.dip.t-dialin.net [84.165.212.191]) (authenticated bits=0) by www.ebusiness-leidinger.de (8.13.4/8.13.1) with ESMTP id k2VER2pV082671; Fri, 31 Mar 2006 16:27:03 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from localhost (localhost [127.0.0.1]) by Andro-Beta.Leidinger.net (8.13.4/8.13.3) with ESMTP id k2VESFPY068772; Fri, 31 Mar 2006 16:28:16 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde MIME library) with HTTP; Fri, 31 Mar 2006 16:28:15 +0200 Message-ID: <20060331162815.5qhte5ct4co4o0ww@netchild.homeip.net> X-Priority: 3 (Normal) Date: Fri, 31 Mar 2006 16:28:15 +0200 From: Alexander Leidinger To: babkin@users.sourceforge.net References: <2893454.4353801143813632253.JavaMail.root@vms169.mailsrvcs.net> In-Reply-To: <2893454.4353801143813632253.JavaMail.root@vms169.mailsrvcs.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.0.3) / FreeBSD-4.11 X-Virus-Scanned: by amavisd-new Cc: Joao Barros , src-committers@FreeBSD.org, Peter Jeremy , "Christian S.J. Peron" , cvs-all@FreeBSD.org, Robert Watson , cvs-src@FreeBSD.org Subject: Re: Re: cvs commit: src/usr.sbin/syslogd syslogd.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Mar 2006 14:28:31 -0000 Sergey Babkin wrote: > >> Robert Watson wrote: >> >>> The cost to check for free space is the cost of a fstatfs() system >>> call on the file descriptor of the log file. This should be handled >>> without touching the disk, so while it's not a cheap system call >>> compared to, say, getpid(), as it acquires locks and enters VFS, it's >>> a lot cheaper than any disk I/O operation. Optional is good, if only >>> because sometimes people do actually want logging to fill the disk, >>> and that's been the behavior historically :-). >> >> Do you know if a kqueue based solution is cheaper? > > Probably should not matter. Syslog writes data to disk > synchronously, right? So anything not involving a disk > access is negligible in cost compared to the main action > of writing the log entry. Regarding syslogd: yes. Regarding the overal system: maybe. Regarding an overloaded server: every cycle matters. When you can get the same (features, quality, nice design, ...) cheaper, why not choose the cheaper one? I don't ask for premature optimization, I just ask for not bloating something in the first place (if the difference in the amount of work is small). Bye, Alexander. -- http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 If you don't say it, they can't repeat it.