From owner-freebsd-fs@FreeBSD.ORG Wed Sep 15 16:27:15 2010 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB23D1065675 for ; Wed, 15 Sep 2010 16:27:14 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 45E8A8FC26 for ; Wed, 15 Sep 2010 16:27:13 +0000 (UTC) Received: (qmail 72596 invoked from network); 15 Sep 2010 15:55:19 -0000 Received: from localhost (HELO [127.0.0.1]) ([127.0.0.1]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 15 Sep 2010 15:55:19 -0000 Message-ID: <4C90EDA1.6020501@freebsd.org> Date: Wed, 15 Sep 2010 18:00:33 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 MIME-Version: 1.0 To: Andriy Gapon References: <5DB6E7C798E44D33A05673F4B773405E@multiplay.co.uk><4C85E91E.1010602@icyb.net.ua><4C873914.40404@freebsd.org><20100908084855.GF2465@deviant.kiev.zoral.com.ua><4C874F00.3050605@freebsd.org><4C8D087B.5040404@freebsd.org><03537796FAB54E02959E2D64FC83004F@multiplay.co.uk><4C8D280F.3040803@freebsd.org><3FBF66BF11AA4CBBA6124CA435A4A31B@multiplay.co.uk><4C8E4212.30000@freebsd.org> <4C90B4C8.90203@freebsd.org> <6DFACB27CA8A4A22898BC81E55C4FD36@multiplay.co.uk> <4C90D3A1.7030008@freebsd.org> <0B1A90A08DFE4ADA9540F9F3846FDF38@multiplay.co.uk> <4C90E328.20606@freebsd.org> <4C90E869.8000400@freebsd.org> In-Reply-To: <4C90E869.8000400@freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-fs@freebsd.org, jhell , Pawel Jakub Dawidek , freebsd-net@freebsd.org Subject: Re: zfs very poor performance compared to ufs due to lack of cache? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 16:27:15 -0000 On 15.09.2010 17:38, Andriy Gapon wrote: > on 15/09/2010 18:15 Andriy Gapon said the following: >> on 15/09/2010 18:04 Steven Hartland said the following: >>> Hmm, so taking a different track on the issue is the a way to make sendfile use data >>> directly from ARC instead of having to copy it first? >> >> Well, theoretically everything is possible, but I am not sure if it's feasible. >> It's a lot of work anyways, it should be a very specialized sendfile and a lot if >> inter-layer knowledge and dependencies. >> Don't hold your breath for it. > > Perhaps some middle-ground solution can be developed with less effort. > This solution would be specific to filesystems that don't use buffer cache, so it > wouldn't touch any pages, but instead it would use regular VOP_READ into a mbuf. > So, there would be copying, but page caches won't be unnecessarily "polluted" with > second copy of the data and this all would happen in kernel giving an advantage > over userland solution with read(2)+send(2). Is there a quick way of deciding within sendfile(2) whether a file resides on a filesystem that doesn't use the buffer cache? > Having said that, I see that OpenSolaris has a mechanism for something like that. > The mechanism can either globally enabled or enabled for file over certain size. > The mechanism uses dedicated kernel threads that get data using direct I/O, buffer > and send it. > That's my impression from a quick look, I may have gotten things wrong. -- Andre