From owner-freebsd-arch@FreeBSD.ORG Thu Nov 10 00:31:56 2011 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5A881065677; Thu, 10 Nov 2011 00:31:56 +0000 (UTC) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 8CB478FC20; Thu, 10 Nov 2011 00:31:56 +0000 (UTC) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by elvis.mu.org (Postfix) with ESMTPSA id 31CA61A3C39; Wed, 9 Nov 2011 16:16:34 -0800 (PST) Received: by iakl21 with SMTP id l21so900848iak.13 for ; Wed, 09 Nov 2011 16:16:33 -0800 (PST) MIME-Version: 1.0 Received: by 10.231.82.2 with SMTP id z2mr1197015ibk.67.1320884193488; Wed, 09 Nov 2011 16:16:33 -0800 (PST) Received: by 10.231.17.141 with HTTP; Wed, 9 Nov 2011 16:16:33 -0800 (PST) In-Reply-To: <4EBB104F.5010000@cran.org.uk> References: <201110281426.00013.jhb@freebsd.org> <4EB2C9DD.9090606@FreeBSD.org> <20111104160319.GD6110@elvis.mu.org> <201111080800.32717.jhb@freebsd.org> <4EBB104F.5010000@cran.org.uk> Date: Wed, 9 Nov 2011 16:16:33 -0800 Message-ID: From: Paul Saab To: Bruce Cran Content-Type: text/plain; charset=ISO-8859-1 Cc: Ed Schouten , Jilles Tjoelker , Alfred Perlstein , arch@freebsd.org, freebsd-arch@freebsd.org Subject: Re: [PATCH] fadvise(2) system call X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Nov 2011 00:31:56 -0000 On Wed, Nov 9, 2011 at 3:44 PM, Bruce Cran wrote: > On 08/11/2011 13:00, John Baldwin wrote: >> >> I think it would be fine to add flags to applications like 'tar' to allow >> users to alter their behavior in specific use cases when it makes sense. >> However, I think there are more workloads for 'tar' than the ones you are >> thinking of and we should be hesitant to change applications to use non- >> default settings. > > Someone's done that for GNU tar on Linux, adding a --no-oscache switch: > http://www.mysqlperformanceblog.com/2010/04/02/fadvise-may-be-not-what-you-expect/ So adding this support is good, but not for general purpose. It's really only good when you're pumping gigs of data through tar. I did this for libarchive (plus other work for O_DIRECT reading and creating the archive) for copying large amounts of data without impacting a running system.. It worked great for this, but then it absolutely fails when extracting a tar archive with millions of little files because of all the sync operations. Anyway, this is a good option to enable and has very practical uses out there, but it should be turned on with an option and not on by default.