<s>
Shardmap	B-Data_Structure
is	O
a	O
directory	O
index	O
design	O
by	O
Daniel	O
Phillips	O
who	O
created	O
the	O
HTree	B-Library
and	O
PHTree	O
tree	O
data	O
structures	O
and	O
the	O
Tux3	B-Application
file	O
system	O
.	O
</s>
<s>
A	O
Shardmap	B-Data_Structure
index	O
consists	O
of	O
a	O
scalable	O
number	O
of	O
index	O
shards	O
.	O
</s>
<s>
Each	O
shard	O
is	O
represented	O
as	O
an	O
unsorted	O
fifo	O
on	O
disk	O
and	O
a	O
small	O
hash	B-Algorithm
table	I-Algorithm
in	O
memory	O
.	O
</s>
<s>
Shardmap	B-Data_Structure
scales	O
in	O
two	O
ways	O
:	O
</s>
<s>
The	O
reshard	O
operation	O
imposes	O
a	O
modest	O
degree	O
of	O
write	O
multiplication	O
on	O
the	O
Shardmap	B-Data_Structure
design	O
,	O
asymptotically	O
approaching	O
a	O
factor	O
of	O
two	O
.	O
</s>
<s>
The	O
key	O
ideas	O
of	O
Shardmap	B-Data_Structure
are	O
:	O
</s>
<s>
On	O
media	O
we	O
have	O
fifos	O
,	O
but	O
in	O
cache	O
we	O
have	O
hash	B-Algorithm
tables	I-Algorithm
.	O
</s>
<s>
The	O
cache	O
footprint	O
of	O
the	O
media	O
image	O
of	O
a	O
shardmap	B-Data_Structure
is	O
therefore	O
just	O
one	O
disk	O
block	O
per	O
shard	O
.	O
</s>
<s>
A	O
small	O
fifo	O
on	O
media	O
is	O
easily	O
loaded	O
and	O
converted	O
to	O
an	O
efficient	O
hash	B-Algorithm
table	I-Algorithm
shard	O
on	O
demand	O
.	O
</s>
<s>
Once	O
in	O
cache	O
,	O
index	O
updates	O
are	O
performed	O
by	O
updating	O
the	O
cached	O
hash	B-Algorithm
table	I-Algorithm
and	O
appending	O
the	O
same	O
entries	O
to	O
the	O
final	O
block	O
of	O
the	O
shard	O
fifo	O
.	O
</s>
<s>
The	O
shardmap	B-Data_Structure
implementation	O
in	O
the	O
Tux3	B-Application
file	O
system	O
uses	O
SipHash	B-Error_Name
hash	O
function	O
designed	O
by	O
Jean-Philippe	O
Aumasson	O
and	O
Daniel	O
J	O
.	O
Bernstein	O
.	O
</s>
