Whamcloud - gitweb
One of main bottlenecks on b_new_cmd md server is the necessity to keep
authornikita <nikita>
Sun, 10 Dec 2006 15:17:33 +0000 (15:17 +0000)
committernikita <nikita>
Sun, 10 Dec 2006 15:17:33 +0000 (15:17 +0000)
commit0dfeb470b19746701b275573308bf4ecbe54bbfb
tree97ae5235d4bc560d0bb538d4606efbfa7b7bea15
parentfb545c50acdec54691ef623eb6e146b8d9ad054b
One of main bottlenecks on b_new_cmd md server is the necessity to keep
additional data structures like object index (oi), and fids in directory
entries. To minimize overhead of this on-disk structures should be as compact
as possible.

For directory entries this was achieved by "compressing" fids, but this
approach cannot be applied to oi as is, because here fids are *keys* rather
than records, and iam doesn't support variable sized keys.

Instead of complicating iam with such support, this patch splits object index
into multiple indices with different key size. Currently two indices are
created:

 oi.16 --- with full sized 16 byte fid as a key, and

 oi.5  --- with compact 5 byte representation of "usual" fid as a key.

"Usual fid" is defined as a fid with

        fid_seq(fid) <  0xffffff
        fid_oid(fid) <    0xffff
        fid_ver(fid) ==        0

(which gives 5 bytes of data). It is expected that under usual workload
majority of fids fall into second category.
lustre/osd/osd_internal.h
lustre/osd/osd_oi.c
lustre/osd/osd_oi.h
lustre/utils/mkfs_lustre.c