Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 Mar 2006 16:28:15 +0200
From:      Alexander Leidinger <Alexander@Leidinger.net>
To:        babkin@users.sourceforge.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, Robert Watson <rwatson@FreeBSD.org>, cvs-src@FreeBSD.org
Subject:   Re: Re: cvs commit: src/usr.sbin/syslogd syslogd.c
Message-ID:  <20060331162815.5qhte5ct4co4o0ww@netchild.homeip.net>
In-Reply-To: <2893454.4353801143813632253.JavaMail.root@vms169.mailsrvcs.net>
References:  <2893454.4353801143813632253.JavaMail.root@vms169.mailsrvcs.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Sergey Babkin <babkin@verizon.net> wrote:

>
>> Robert Watson <rwatson@FreeBSD.org> 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.





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