28.07.2013 Views

Performance Analysis and Optimization of the Hurricane File System ...

Performance Analysis and Optimization of the Hurricane File System ...

Performance Analysis and Optimization of the Hurricane File System ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 7. MACROBENCHMARK 73<br />

disk #<br />

file# modulo 16<br />

meta−file<br />

block# modulo 16<br />

Logical Organization <strong>of</strong> Hash Table for Block Cache<br />

0 1 11<br />

0 1 15 0 1 15<br />

0 1 15<br />

0 1 15 0 1 15 0 1 15<br />

Physical Implentation <strong>of</strong> Hash Table for Block Cache<br />

0 1 15 0 1 15 block # 0 1 15<br />

0 1 15 0 1 15 block # 0 1 15<br />

0 1 1516 31 239 255 global index<br />

2816 3071<br />

file #0 file #1 file #15 file #0 file #1 file #15<br />

disk #0<br />

7<br />

Constructing Hash Index Value for Block Cache<br />

global hash index value =<br />

6<br />

5<br />

4<br />

3<br />

disk #<br />

2<br />

1<br />

0<br />

11 10<br />

9<br />

8<br />

17<br />

4 3 2 1 0 31<br />

file# (embedded in file token)<br />

7<br />

start here<br />

6<br />

5<br />

4<br />

3<br />

2<br />

1<br />

0<br />

4<br />

3<br />

2<br />

1<br />

meta−file block #<br />

Figure 7.3: Modified block cache hash function.<br />

disk #11<br />

12 processors <strong>and</strong> 12 disks. Ideally, <strong>the</strong> size <strong>of</strong> <strong>the</strong> hash table should scale accordingly to <strong>the</strong> size <strong>of</strong> <strong>the</strong><br />

multiprocessor, as implied by Peacock et al. [56, p. 86].<br />

There are effectively 3 chances for hash collision avoidance, based on disk number, file token number, <strong>and</strong><br />

file block number. Consider 2 threads that are executing in parallel on separate processors. If <strong>the</strong> threads<br />

access different disks, <strong>the</strong>n hash collisions will not occur. However, if <strong>the</strong>y access <strong>the</strong> same disk 5 , <strong>the</strong> chance<br />

<strong>of</strong> collisions is mitigated by <strong>the</strong> availability <strong>of</strong> 16 hash list groups. If <strong>the</strong> threads access different hash list<br />

groups, <strong>the</strong>n hash collisions will not occur. The threads may access <strong>the</strong> same hash list group if ei<strong>the</strong>r (1) <strong>the</strong>y<br />

are accessing <strong>the</strong> same file, or (2) <strong>the</strong>y are accessing different files on <strong>the</strong> same disk but <strong>the</strong> corresponding<br />

file numbers cause <strong>the</strong>m to hash to <strong>the</strong> same hash list group. Even if <strong>the</strong> threads hash into <strong>the</strong> same hash<br />

list group, <strong>the</strong>re are 16 hash lists within each group to reduce <strong>the</strong> probability <strong>of</strong> hash collisions. If <strong>the</strong> two<br />

5 This cannot occur in our experiments.<br />

0

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!