From owner-freebsd-questions@FreeBSD.ORG Mon Feb 23 01:03:13 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 57D7F10656D5 for ; Mon, 23 Feb 2009 01:03:13 +0000 (UTC) (envelope-from junsukshin@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.30]) by mx1.freebsd.org (Postfix) with ESMTP id 0873B8FC16 for ; Mon, 23 Feb 2009 01:03:12 +0000 (UTC) (envelope-from junsukshin@gmail.com) Received: by yw-out-2324.google.com with SMTP id 2so641401ywt.13 for ; Sun, 22 Feb 2009 17:03:12 -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=4l6FadsNUxxg8a79tf8E67qOCmI7vI9UTmCxo+akbcc=; b=HDJ0APpLwHgKa2NBOc8JytFbYdBRi5ZjKchvumIdJRJbyDyZZED4iQwxdb6b0lBBBZ ZFMEP7gT6/h0wUDm7z0i83hY/cV3G46DRiNciXAhn9rl8i3SF27lZ2KxB6RuB/2ZzKEL 1ZSOIjebF2A9FolhKXOkdj9HM8pnBLtz3oWlc= 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=YgW+kXHIxRNSc4AbeuRR1CP5TtifV5yM6MDXv4+2cq8zHj5I3UMHigKocQYDOSFBrE 45InIq9k6Th4j9o9OmB7cdiQ9R4YiRDUB78zbCnaeOwKzXIsBo9FSeSBQwqbR/FkUmVG JmV5Ulpm6rb+JCiBg9o/5vmaW8kMKFvtGYbgw= MIME-Version: 1.0 Received: by 10.231.15.74 with SMTP id j10mr5199195iba.10.1235350991875; Sun, 22 Feb 2009 17:03:11 -0800 (PST) In-Reply-To: <20090222232034.O66317@wojtek.tensor.gdynia.pl> References: <7873ac110902211146k6a8ee7d0pd67edc559ed14b15@mail.gmail.com> <20090221235530.C60480@wojtek.tensor.gdynia.pl> <7873ac110902221044hfd96a8cn5b32e0f90edca212@mail.gmail.com> <20090222232034.O66317@wojtek.tensor.gdynia.pl> Date: Sun, 22 Feb 2009 20:03:11 -0500 Message-ID: <7873ac110902221703w737d72cek28cd80ce30f4a267@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: Mon, 23 Feb 2009 01:03:14 -0000 Both of them. Reading two 100M files in interleaved way with 16K buffer, 62MB/s Reading two 700M files in interleaved way with 16K buffer, 9MB/s Reading two 100M files in interleaved way with 1M buffer, 55MB/s get worse with large buffer somehow Reading two 700M files in interleaved way with 1M buffer, 34MB/s get better with large buffer, but still difference, 55 vs 34 I cannot find the reason for this. gstat(8) also shows low rates when reading large files in interleaved way but not for small files. On Sun, Feb 22, 2009 at 5:20 PM, Wojciech Puchar < wojtek@wojtek.tensor.gdynia.pl> wrote: > 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. >> >> really slower? or just bigger difference with large files? > > > > >> 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 >> >>