From owner-freebsd-current@FreeBSD.ORG Tue May 5 16:17:32 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B2D71065672 for ; Tue, 5 May 2009 16:17:32 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id E5F4F8FC1D for ; Tue, 5 May 2009 16:17:31 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from trouble.errno.com (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id n45GHUFn046605 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 5 May 2009 09:17:31 -0700 (PDT) (envelope-from sam@freebsd.org) Message-ID: <4A00669A.10105@freebsd.org> Date: Tue, 05 May 2009 09:17:30 -0700 From: Sam Leffler Organization: FreeBSD Project User-Agent: Thunderbird 2.0.0.21 (X11/20090411) MIME-Version: 1.0 To: Peter Jeremy References: <49FE1826.4060000@FreeBSD.org> <49FE29A4.30507@root.org> <49FE5EC8.3040205@FreeBSD.org> <20090505091914.GA94521@server.vk2pj.dyndns.org> In-Reply-To: <20090505091914.GA94521@server.vk2pj.dyndns.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC--Metrics: ebb.errno.com; whitelist Cc: FreeBSD-Current Subject: Re: Fighting for the power. [syslogd] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 May 2009 16:17:32 -0000 Peter Jeremy wrote: > On 2009-May-04 06:19:36 +0300, Alexander Motin wrote: > ...snip... >> number of idle disk write activity, but I haven't very succeeded. Even >> in my quite simple icewm X environment something was persistently >> writing something every several minutes. I have found and disabled some >> activity sources, but it was not enough. >> > > I've recently (in the last few days) worked through minimising the > write activity on the SSD in my laptop (I wrote a tool that monitors > write transfers via devstat(3) and it would be possible to track down > the actual modified files via kqueue(2) if necessary). I'm now down > to about two chunks of about 13 transfers each per hour (due to entopy > saving and ntp.drift updating). The changes I made were: > 1) Mount the SSD filesystems as noatime > 2) Turn off all local syslogging (syslog is directed to another > system when my laptop is at home, lost otherwise). > Regarding syslogd, I've considered adding support to batch/buffer writes to workaround a problem that I consider rather important: syslogd is not started early enough in the boot so it's not available to log msgs from other applications. In particular I hit this because wpa_supplicant logs via syslog but when it's started at boot syslogd isn't available and since wpa_supplicant operates in a chroot'd environment it cannot defer connecting until syslogd has started up so nothing is ever logged. I think we want syslogd to start very early and deal with the case where the local filesystem is not present. My plan was to buffer msgs and then flush them at a later time. But this might also be used to buffer log activity so local disk activity is staged (e.g. for the laptop or embedded use). Maybe someone else has a better idea but I think we need to do something soon. Sam