Re: Database Usage of Unix FFS
Date: Thu, 24 Feb 94 04:01:43 GMT
Message-ID: <1994Feb24.040143.20217_at_bmers145.bnr.ca>
In article <CLpDKE.5LK_at_world.std.com>, lparsons_at_world.std.com (Lee E Parsons) writes:
|> >>> (I/O distribution considerations aside. Of course.)
|> >>>
|> >Well, I/O distribution matters...you can use 100% of the disk, but
|> >blocks from the last few files that are created may be scattered
|> >across the whole whole disk, hurting performance.
|>
|> Sorry, I wasn't very clear. I wasn't suggesting that it isn't an
|> important issue. I was trying to limit the topic so we didn't make
|> this a bigger problem than it needed to be.
If you are going to perform many sequential read operations, which I
am assuming you will be, I/O distribution matters. If the database file
is stored contiguously on disk, the disk head won't have to perform seeks
between reads. In fact, because of the way FFS is designed, read ahead is
used if the UNIX kernel detects you are performing sequential reads.
If you can somehow manage to store blocks of a file contiguously, the
performance of the read will improve.
|> What happens in the case where a single file covers the entire disk?
|> If you were writing an 100mb file over a 100mb disk all at once.
I am assuming if the kernel allows you to specify the max. number of files
allowed in the operating system, it will still use the same allocation
mechanism when creating files.
FFS is designed to accomodate general operating system's need. Its block size is 8K. Your database file's size is pretty big. If you are going to use FFS, the blocks of a file will be scattered all over the disk, accross all cylinders. Logically contiguous blocks will not be stored contiguously on disk. If you are going to perform a lot of sequential reads, the performance will suffer.
|> The answer may well be to acknowledge that the situation doesn't
|> call for a general purpose anything and not use the FFS. Raw would
|> seem to be the best answer but I have problems coming to that conclusion
|> without going through this exercise. If I don't really understand
|> how the data is layed out on the disk how am I ever going to make
|> any recommendation with a straight face.
|>
|> I smell a benchmark comming. :-}
"The Design and Implementation of 4.3BSD UNIX Operating System" by Leffler,
McKusick, Karels, Quarteman has sections that talks about the detailed
design and implementation of FFS. You may change your mind about benchmarking
after you read those sections. :)
yiwen
-- Yiwen Jiang BNR Ltd. yjiang_at_bnr.ca Ottawa, Ont.Received on Thu Feb 24 1994 - 05:01:43 CET