Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Nov 1997 04:31:04 -0500 (EST)
From:      "John S. Dyson" <toor@dyson.iquest.net>
To:        reyesf@super.zippo.com
Cc:        hackers@FreeBSD.ORG
Subject:   Re: Optimizing HD I/O. What size to use to read/write?
Message-ID:  <199711180931.EAA01111@dyson.iquest.net>
In-Reply-To: <199711180759.XAA20331@super.zippo.com> from Francisco Reyes at "Nov 18, 97 02:59:09 am"

next in thread | previous in thread | raw e-mail | index | archive | help
Francisco Reyes said:
> I am going to start working on a program which will be heavy on I/O.
> I was wondering what would be a good size to read/write at a time.
> 
> What is the minimun block size FreeBSD allocates? 4K? 8K? Is it HD
> dependent?
> 
Depends on the filesystem configuration.  On a 8K filesystem with 1K
fragments, the filesystem will normally allocate 8K blocks, except for
the last one, which will be some number of fragments.  The kind of
I/O dictates the blocksize that you want to use.  There is generally
little use of using more than a (8K:1K or 16K:2K) filesystem.  The
clustering code takes care of changing small sequential transfers into
larger (up to 64K for now) device I/O.  If you are talking about random I/O,
in a database type situation, you might want to bypass filesystems all together.

-- 
John
dyson@freebsd.org
jdyson@nc.com



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