From owner-freebsd-stable@FreeBSD.ORG Mon Feb 13 20:21:13 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 350E4106567A for ; Mon, 13 Feb 2012 20:21:13 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id B50E78FC18 for ; Mon, 13 Feb 2012 20:21:12 +0000 (UTC) Received: by werm13 with SMTP id m13so5786480wer.13 for ; Mon, 13 Feb 2012 12:21:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=T66PtBHN/VOF0+FV/Hkl7fcSi6Ci7PGxprjJTSnzeHs=; b=kaolSkd0b+i6kNDffA/sI9JEjtwvhPf7/hkAK99Uuz7XLZ2Fxvn+C3JIQJ6axv7KaZ ZjC2BYqyWx4u3HFbDVnD28l0vNlyUz4AD1AbLKKQY/9RXzZRh5DzAtBhBxyGECgrzuYR DfUoGj5SdoA4d2c2FXzXmBd32GxJDhm/3WJjM= MIME-Version: 1.0 Received: by 10.180.78.6 with SMTP id x6mr20208949wiw.18.1329164471580; Mon, 13 Feb 2012 12:21:11 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.175.136 with HTTP; Mon, 13 Feb 2012 12:21:11 -0800 (PST) In-Reply-To: <4F38AF69.6010506@os2.kiev.ua> References: <4F215A99.8020003@os2.kiev.ua> <4F27C04F.7020400@omnilan.de> <4F27C7C7.3060807@os2.kiev.ua> <4F37F81E.7070100@os2.kiev.ua> <4F38AF69.6010506@os2.kiev.ua> Date: Mon, 13 Feb 2012 12:21:11 -0800 X-Google-Sender-Auth: rJsg_5grRbAyZe7Nct3oV5yao5Q Message-ID: From: Adrian Chadd To: Alex Samorukov Content-Type: text/plain; charset=ISO-8859-1 Cc: Harald Schmalzbauer , freebsd-stable@freebsd.org Subject: Re: disk devices speed is ugly X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2012 20:21:13 -0000 I tend to say "the right solution to a problem is to not do it wrong." But.. given that Linux is fine with all the unaligned accesses, is the major sticking point here the fact that Linux's block dev layer is doing all the caching that FreeBSD's direct device layer isn't, and all of those (cached) accesses are what is improving performance? So perhaps it'd be worthwhile investing some time in a geom caching layer to see if that's at all feasible. I had the same problem with userland cyclic filesystems on FreeBSD versus Linux - the Linux FS performed better in synthetic tests because it did caching of the blockdev data. FreeBSD was doing direct IO. Tuning the direct IO sizes and fixing the filesystem code to do everything correctly aligned eliminated a lot of the ridiculous issues. Making Squid cache reads from disk would've improved it too. :-) Finally - I've seen this same issue under linux, especially when you stick a filesystem on a RAID device with the stripe/alignment all wrong. It's not just a BSD problem. :) Adrian