Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Feb 2009 23:56:15 +0100 (CET)
From:      Wojciech Puchar <wojtek@wojtek.tensor.gdynia.pl>
To:        Junsuk Shin <junsukshin@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: read two files simultaneously
Message-ID:  <20090221235530.C60480@wojtek.tensor.gdynia.pl>
In-Reply-To: <7873ac110902211146k6a8ee7d0pd67edc559ed14b15@mail.gmail.com>
References:  <7873ac110902211146k6a8ee7d0pd67edc559ed14b15@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090221235530.C60480>