From owner-freebsd-current@FreeBSD.ORG Wed Nov 26 19:45:50 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8EC9DE8; Wed, 26 Nov 2014 19:45:50 +0000 (UTC) Received: from mail-ie0-x22c.google.com (mail-ie0-x22c.google.com [IPv6:2607:f8b0:4001:c03::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5D1B38DD; Wed, 26 Nov 2014 19:45:50 +0000 (UTC) Received: by mail-ie0-f172.google.com with SMTP id tr6so3331595ieb.3 for ; Wed, 26 Nov 2014 11:45:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=Ha84WawLkX1GqtJTMN2NgsrNTAmQAN04zoM2SYz3U6U=; b=mGZ2q9Ifu/3s+30sTLr9ogRyU8NfjpPMMzatAPNeAJbCBGrMMVWThSUwSXe5uf76cH EVeHrfXfJfJMu+ZoYbAj9HXxgGTzYvgdxmBagoPzOtTsLPBpX3klha+I32DvZ7EwMkoG ieo4CaKwtqzOEVvYul+tvNHL4Dk+nOPlLQEdN4zYLU+YRw1MGr0/OPFrX3xlHLGeUpdg PIwe9jk0jTbmf+DeBVASeUByF4R60AFlY38LVb+DhDJS1tnzYR9OomOkZs2nH/MI52Ig 5fH1DNVcbhQ9QngvjRPvgued0838KLl8uSm59bK9rNm+StzheckVjpWQiHMu5f05Sr3H qKaw== MIME-Version: 1.0 X-Received: by 10.43.75.138 with SMTP id za10mr31832998icb.23.1417031149562; Wed, 26 Nov 2014 11:45:49 -0800 (PST) Sender: kob6558@gmail.com Received: by 10.107.7.169 with HTTP; Wed, 26 Nov 2014 11:45:49 -0800 (PST) In-Reply-To: <20141126180633.GA69028@blazingdot.com> References: <20141126180633.GA69028@blazingdot.com> Date: Wed, 26 Nov 2014 11:45:49 -0800 X-Google-Sender-Auth: GS3Coc1vbtv4zLsZVAXuZionv8I Message-ID: Subject: Re: Delayed atime updates ("lazytime") From: Kevin Oberman To: Marcus Reid Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: FreeBSD FS , FreeBSD Current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-1 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: Wed, 26 Nov 2014 19:45:50 -0000 On Wed, Nov 26, 2014 at 10:06 AM, Marcus Reid wrote: > Hi, > > Looks like Linux is about to grow another solution to handling atime > updates differently: > > http://lwn.net/SubscriberLink/621046/e59938475fd3e874/ > > In short, it will only write out atime changes periodically (daily), or > if there is another reason to write out the inode, or if the inode is > about to be pushed out of cache. This seems like a pretty good > compromise. > > Currently, the ZFS configuration that results from using bsdinstall > disables atime on all but /var/mail, which is the only example of > disabling atime by default that I'm aware of outside of Gentoo Linux. > I can't seem to find any information that talks about the rationale > behind that, though a couple things come to mind: > > - some additional IO generated (but that's always been the case) > - additional wear on SSD devices (enough to compel the change?) > - zfs snapshot growth (but the snapshot stops growing after one > full set of inode updates) > - wake up otherwise idle spinning media on a laptop (the actual reason > that was cited as motivation for the change) > > Something like lazytime would address most of those concerns, and people > who are even more OCD than that could disable atime completely on their > machine. > > Marcus > > About time. VMS started doing this over a quarter century ago. Worked very well. Of course, the VMS file system (ODS-2) has little in common with either ZFS or UFS, but it had an interesting twist. There was a per-disk update "window" that could be modified on a per-file basis, so that you could specify the "update atime for every access" if you really needed it, but normally it would only update atime every so many seconds. I don't remember the system default any more. This kept almost everyone happy. VMS previously had no equivalent to atime and had lots of request for it, but the developers did not want to impact performance as drastically as updating the access time on every access would have done. I don't know how or if such a scheme could be implemented in FreeBSD file systems, but it was a very nice way of handling the issue. -- R. Kevin Oberman, Network Engineer, Retired E-mail: rkoberman@gmail.com