Low Level Record Length Question ...
Roger Oberholtzer
roger
Tue Sep 13 11:32:21 PDT 2005
I would stick to a fixed size. Makes recovery much easier. Disk space is
cheap. If you mmap the file, then just keep in mind process memory
limits. Not that that is only a fixed record size issue.
What is the typical record size?
On Tue, 2005-09-13 at 11:47 -0500, Ben Duncan wrote:
> Am working diligently on my MVDBM SLAG database. I am looking at making
> the minimum (since the system will be variable length records/fields)
> Record/Block in 512 Bytes.
>
> Is that the most effective size?
>
> What I intend to do is to start each new record with 512 Bytes (there
> is a header in each record, so that is not the "true" user size).
> If/When the record exceeds 512 Bytes, and it exceeds it's slot size,
> add another 512 bytes to the block allocation, write the new size to the file
> end and free up the current "block" allocation for re-use.
>
> All allocation will be done in x512 byte increments. For example, OLD
> record size is 900 bytes of user data (2 blocks) and it gets added 1750
> more bytes of user data, the new record/block will be 3072 and stuck
> at the end of the file (or if there is a freeblock that size, in that
> freeblock).
>
> Does that sound like a winner ? Any comments, suggestions ?
>
>
> Thanks ...
>
>
More information about the Linux-users
mailing list