Re: 3x slower file reading oddity

From: Benjamin LaHaise (bcrl@redhat.com)
Date: Mon Jun 17 2002 - 15:07:57 EST


On Mon, Jun 17, 2002 at 01:03:15PM -0700, dean gaudet wrote:
> 3x slower with the two cats in parallel.

cat uses an incredibly small buffer for file io (4KB on x86), so
running multiple cats in parallel will simply thrash your disk.
What you really want is to run the open()s in parallel and the
read()s sequentially (or in parallel with a large buffer to cut
down on the seek cost).

                -ben

-- 
"You will be reincarnated as a toad; and you will be much happier."
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Jun 23 2002 - 22:00:14 EST