<s>
Block	B-Application
suballocation	I-Application
is	O
a	O
feature	O
of	O
some	O
computer	B-Application
file	I-Application
systems	I-Application
which	O
allows	O
large	O
blocks	B-General_Concept
or	I-General_Concept
allocation	I-General_Concept
units	I-General_Concept
to	O
be	O
used	O
while	O
making	O
efficient	O
use	O
of	O
empty	O
space	O
at	O
the	O
end	O
of	O
large	O
files	O
,	O
space	O
which	O
would	O
otherwise	O
be	O
lost	O
for	O
other	O
use	O
to	O
internal	O
fragmentation	B-Application
.	O
</s>
<s>
In	O
file	B-Application
systems	I-Application
that	O
do	O
n't	O
support	O
fragments	O
,	O
this	O
feature	O
is	O
also	O
called	O
tail	B-Application
merging	I-Application
or	O
tail	B-Application
packing	I-Application
because	O
it	O
is	O
commonly	O
done	O
by	O
packing	O
the	O
"	O
tail	O
"	O
,	O
or	O
last	O
partial	O
block	O
,	O
of	O
multiple	O
files	O
into	O
a	O
single	O
block	O
.	O
</s>
<s>
File	B-Application
systems	I-Application
have	O
traditionally	O
divided	O
the	O
disk	O
into	O
equally	O
sized	O
blocks	O
to	O
simplify	O
their	O
design	O
and	O
limit	O
the	O
worst-case	O
fragmentation	B-Application
.	O
</s>
<s>
Block	B-General_Concept
sizes	I-General_Concept
are	O
typically	O
multiples	O
of	O
512	B-Application
bytes	I-Application
due	O
to	O
the	O
size	O
of	O
hard	O
disk	B-Application
sectors	I-Application
.	O
</s>
<s>
When	O
files	O
are	O
allocated	O
by	O
some	O
traditional	O
file	B-Application
systems	I-Application
,	O
only	O
whole	O
blocks	O
can	O
be	O
allocated	O
to	O
individual	O
files	O
.	O
</s>
<s>
But	O
as	O
file	O
sizes	O
are	O
often	O
not	O
multiples	O
of	O
the	O
file	B-Application
system	I-Application
block	B-General_Concept
size	I-General_Concept
,	O
this	O
design	O
inherently	O
results	O
in	O
the	O
last	O
blocks	O
of	O
files	O
(	O
called	O
tails	O
)	O
occupying	O
only	O
a	O
part	O
of	O
the	O
block	O
,	O
resulting	O
in	O
what	O
is	O
called	O
internal	O
fragmentation	B-Application
(	O
not	O
to	O
be	O
confused	O
with	O
external	O
fragmentation	B-Application
)	O
.	O
</s>
<s>
This	O
waste	O
of	O
space	O
can	O
be	O
significant	O
if	O
the	O
file	B-Application
system	I-Application
stores	O
many	O
small	O
files	O
and	O
can	O
become	O
critical	O
when	O
attempting	O
to	O
use	O
higher	O
block	B-General_Concept
sizes	I-General_Concept
to	O
improve	O
performance	O
.	O
</s>
<s>
FFS	B-Operating_System
and	O
other	O
derived	O
UNIX	B-Operating_System
file	I-Operating_System
systems	I-Operating_System
support	O
fragments	O
which	O
greatly	O
mitigate	O
this	O
effect	O
.	O
</s>
<s>
Block	B-Application
suballocation	I-Application
addresses	O
this	O
problem	O
by	O
dividing	O
up	O
a	O
tail	O
block	O
in	O
some	O
way	O
to	O
allow	O
it	O
to	O
store	O
fragments	O
from	O
other	O
files	O
.	O
</s>
<s>
Some	O
block	B-Application
suballocation	I-Application
schemes	O
can	O
perform	O
allocation	O
at	O
the	O
byte	O
level	O
;	O
most	O
,	O
however	O
,	O
simply	O
divide	O
up	O
the	O
block	O
into	O
smaller	O
ones	O
(	O
the	O
divisor	O
usually	O
being	O
some	O
power	O
of	O
2	O
)	O
.	O
</s>
<s>
For	O
example	O
,	O
if	O
a	O
38	O
KiB	O
file	O
is	O
to	O
be	O
stored	O
in	O
a	O
file	B-Application
system	I-Application
using	O
32	O
KiB	O
blocks	O
,	O
the	O
file	O
would	O
normally	O
span	O
two	O
blocks	O
,	O
or	O
64	O
KiB	O
,	O
for	O
storage	O
;	O
the	O
remaining	O
26	O
KiB	O
of	O
the	O
second	O
block	O
becomes	O
unused	O
slack	O
space	O
.	O
</s>
<s>
With	O
an	O
8	O
KiB	O
block	B-Application
suballocation	I-Application
,	O
however	O
,	O
the	O
file	O
would	O
occupy	O
just	O
6	O
KiB	O
of	O
the	O
second	O
block	O
,	O
leave	O
2	O
KiB	O
(	O
of	O
the	O
8	O
KiB	O
suballocation	O
block	O
)	O
slack	O
and	O
free	O
the	O
other	O
24	O
KiB	O
of	O
the	O
block	O
for	O
other	O
files	O
.	O
</s>
<s>
Some	O
file	B-Application
systems	I-Application
have	O
since	O
been	O
designed	O
to	O
take	O
advantage	O
of	O
this	O
unused	O
space	O
,	O
and	O
can	O
pack	O
the	O
tails	O
of	O
several	O
files	O
in	O
a	O
single	O
shared	O
tail	O
block	O
.	O
</s>
<s>
While	O
this	O
may	O
,	O
at	O
first	O
,	O
seem	O
like	O
it	O
would	O
significantly	O
increase	O
file	B-Application
system	I-Application
fragmentation	I-Application
,	O
the	O
negative	O
effect	O
can	O
be	O
mitigated	O
with	O
readahead	B-Application
features	O
on	O
modern	O
operating	B-General_Concept
systems	I-General_Concept
when	O
dealing	O
with	O
short	O
files	O
,	O
several	O
tails	O
may	O
be	O
close	O
enough	O
to	O
each	O
another	O
to	O
be	O
read	O
together	O
,	O
and	O
thus	O
a	O
disk	O
seek	O
is	O
not	O
introduced	O
.	O
</s>
<s>
Such	O
file	B-Application
systems	I-Application
often	O
employ	O
heuristics	B-Algorithm
in	O
order	O
to	O
determine	O
whether	O
tail	B-Application
packing	I-Application
is	O
worthwhile	O
in	O
a	O
given	O
situation	O
,	O
</s>
<s>
and	O
defragmentation	B-Application
software	I-Application
may	O
use	O
a	O
more	O
evolved	O
heuristic	B-Algorithm
.	O
</s>
<s>
In	O
some	O
scenarios	O
where	O
the	O
majority	O
of	O
files	O
are	O
shorter	O
than	O
half	O
the	O
block	B-General_Concept
size	I-General_Concept
,	O
such	O
as	O
in	O
a	O
folder	O
of	O
small	O
source	O
code	O
files	O
or	O
small	O
bitmap	O
images	O
,	O
tail	B-Application
packing	I-Application
can	O
increase	O
storage	O
efficiency	O
even	O
more	O
than	O
twofold	O
,	O
compared	O
to	O
file	B-Application
systems	I-Application
without	O
tail	B-Application
packing	I-Application
.	O
</s>
<s>
This	O
not	O
only	O
translates	O
into	O
conservation	O
of	O
disk	O
space	O
,	O
but	O
may	O
also	O
introduce	O
performance	O
increases	O
,	O
as	O
due	O
to	O
higher	O
locality	B-General_Concept
of	I-General_Concept
reference	I-General_Concept
,	O
less	O
data	O
has	O
to	O
be	O
read	O
,	O
also	O
translating	O
into	O
higher	O
page	B-General_Concept
cache	I-General_Concept
efficiency	O
.	O
</s>
<s>
,	O
the	O
most	O
widely	O
used	O
read-write	O
file	B-Application
systems	I-Application
with	O
support	O
for	O
block	B-Application
suballocation	I-Application
are	O
Btrfs	B-Operating_System
and	O
FreeBSD	O
UFS2	O
(	O
where	O
it	O
is	O
called	O
"	O
block	O
level	O
fragmentation	B-Application
"	O
)	O
.	O
</s>
<s>
Once	O
popular	O
,	O
ReiserFS	B-Application
and	O
Reiser4	B-Application
are	O
no	O
longer	O
common	O
.	O
</s>
<s>
Several	O
read-only	O
file	B-Application
systems	I-Application
do	O
not	O
use	O
blocks	O
at	O
all	O
and	O
are	O
thus	O
implicitly	O
using	O
space	O
as	O
efficiently	O
as	O
suballocating	O
file	B-Application
systems	I-Application
;	O
such	O
file	B-Application
systems	I-Application
double	O
as	O
archive	B-Application
formats	I-Application
.	O
</s>
