Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 Mar 2006 16:31:10 +0000 (GMT)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Alexander Leidinger <Alexander@Leidinger.net>
Cc:        Joao Barros <joao.barros@gmail.com>, src-committers@FreeBSD.org, Peter Jeremy <peterjeremy@optushome.com.au>, "Christian S.J. Peron" <csjp@FreeBSD.org>, cvs-all@FreeBSD.org, babkin@users.sourceforge.net, cvs-src@FreeBSD.org
Subject:   Re: Re: cvs commit: src/usr.sbin/syslogd syslogd.c
Message-ID:  <20060331162807.K88223@fledge.watson.org>
In-Reply-To: <20060331162815.5qhte5ct4co4o0ww@netchild.homeip.net>
References:  <2893454.4353801143813632253.JavaMail.root@vms169.mailsrvcs.net> <20060331162815.5qhte5ct4co4o0ww@netchild.homeip.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 31 Mar 2006, Alexander Leidinger wrote:

>>> 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).

I think you'll find the cost of an fstatfs() call is so low that the cost of 
setting up monitoring is appreciably similar.  I think the right thing to do, 
if worried, is to prototype the architecturally simple solution, and then see 
if there's a problem.  Premature optimization is what happens when you 
complicate software in order to solve a performance problem that doesn't 
exist, possibly resulting in slower software, and certainly resulting in 
harder to maintain software.  :-)  I'm pretty sure you'll find that the cost 
of fstatfs() is basically unmeasurable in this context.

Robert N M Watson



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060331162807.K88223>