From owner-freebsd-questions@FreeBSD.ORG Sun Feb 22 18:44:20 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1657106566C for ; Sun, 22 Feb 2009 18:44:19 +0000 (UTC) (envelope-from junsukshin@gmail.com) Received: from mail-gx0-f176.google.com (mail-gx0-f176.google.com [209.85.217.176]) by mx1.freebsd.org (Postfix) with ESMTP id 863D48FC08 for ; Sun, 22 Feb 2009 18:44:19 +0000 (UTC) (envelope-from junsukshin@gmail.com) Received: by gxk24 with SMTP id 24so5818578gxk.19 for ; Sun, 22 Feb 2009 10:44:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=k3VOUyX4MBZkNW3JS+XiiAgLP9rPjYS0vtNBuXKxnP8=; b=aGh1FbJCfOqg6zFzMHC0fBuIgmEyrFaWralJ2kmm5Rt3+WQTOPIaTSoT2exXCSh67X Iyy7V5Bi2Zgiys/VgekvacQ7yI0Dm0Tc2AJ2ginE1dt5qmsdzorjwmm6NGFPF1MAbbS+ czjAv8m3D6I/WHk9zUnSolhLzWOUUoC88haFc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=gApxB//Hby/WRTkR8RLYk3ZVAKKo4UAFz0ZbxtPvwlqcyyN9xQNE/CTsq8NVyQVdEY XeOSy2BAFbzRklICh8fzcSo8ac97fPSa6NdvQoXkGjxOi58HkjEYNw7mD3J/hySOUuYN C1w4LOa+CzofCERXJX4F0Z9KSymK/m/1EnI7o= MIME-Version: 1.0 Received: by 10.231.19.72 with SMTP id z8mr4726482iba.42.1235328258691; Sun, 22 Feb 2009 10:44:18 -0800 (PST) In-Reply-To: <20090221235530.C60480@wojtek.tensor.gdynia.pl> References: <7873ac110902211146k6a8ee7d0pd67edc559ed14b15@mail.gmail.com> <20090221235530.C60480@wojtek.tensor.gdynia.pl> Date: Sun, 22 Feb 2009 13:44:18 -0500 Message-ID: <7873ac110902221044hfd96a8cn5b32e0f90edca212@mail.gmail.com> From: Junsuk Shin To: Wojciech Puchar , freebsd-questions@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Re: read two files simultaneously X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Feb 2009 18:44:20 -0000 That's true. Using bigger buffer will help, but it doesn't tell why reading large size file is slower than reading small size file. On Sat, Feb 21, 2009 at 5:56 PM, Wojciech Puchar < wojtek@wojtek.tensor.gdynia.pl> wrote: > I'm just guessing inode structure, the physical file location on HDD >> might be related to this. But, if I read only one file, the size >> doesn't matter. Reading file (10M, 100M, 700M) gives constantly about >> 70MB/s, and the weird thing happens when I read 2 files of big size. >> > > if you use O_DIRECT it's read from disk exactly as you specified, without > readahead, so you do a lot of seeks. > > simply use bigger buffer like 1MB > -- Junsuk