<s>
bcache	B-Application
(	O
abbreviated	O
from	O
block	O
cache	B-General_Concept
)	O
is	O
a	O
cache	B-General_Concept
in	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
's	O
block	O
layer	O
,	O
which	O
is	O
used	O
for	O
accessing	O
secondary	O
storage	O
devices	O
.	O
</s>
<s>
It	O
allows	O
one	O
or	O
more	O
fast	O
storage	O
devices	O
,	O
such	O
as	O
flash-based	O
solid-state	B-Device
drives	I-Device
(	O
SSDs	B-Device
)	O
,	O
to	O
act	O
as	O
a	O
cache	B-General_Concept
for	O
one	O
or	O
more	O
slower	O
storage	O
devices	O
,	O
such	O
as	O
hard	B-Device
disk	I-Device
drives	I-Device
(	O
HDDs	O
)	O
;	O
this	O
effectively	O
creates	O
hybrid	O
volumes	O
and	O
provides	O
performance	O
improvements	O
.	O
</s>
<s>
Designed	O
around	O
the	O
nature	O
and	O
performance	O
characteristics	O
of	O
SSDs	B-Device
,	O
bcache	B-Application
also	O
minimizes	O
write	B-Error_Name
amplification	I-Error_Name
by	O
avoiding	O
random	B-General_Concept
writes	I-General_Concept
and	O
turning	O
them	O
into	O
sequential	B-General_Concept
writes	I-General_Concept
instead	O
.	O
</s>
<s>
This	O
merging	O
of	O
I/O	B-General_Concept
operations	I-General_Concept
is	O
performed	O
for	O
both	O
the	O
cache	B-General_Concept
and	O
the	O
primary	O
storage	O
,	O
helping	O
in	O
extending	O
the	O
lifetime	O
of	O
flash-based	O
devices	O
used	O
as	O
caches	B-General_Concept
,	O
and	O
in	O
improving	O
the	O
performance	O
of	O
write-sensitive	O
primary	O
storages	O
,	O
such	O
as	O
RAID	B-Architecture
5	O
sets	O
.	O
</s>
<s>
bcache	B-Application
is	O
licensed	O
under	O
the	O
GNU	B-License
General	I-License
Public	I-License
License	I-License
(	O
GPL	B-License
)	O
,	O
and	O
Kent	O
Overstreet	O
is	O
its	O
primary	O
developer	O
.	O
</s>
<s>
Overstreet	O
considers	O
bcache	B-Application
as	O
a	O
"	O
prototype	O
"	O
for	O
the	O
development	O
of	O
bcachefs	B-Application
,	O
a	O
filesystem	B-Application
with	O
significant	O
improvements	O
.	O
</s>
<s>
Using	O
bcache	B-Application
makes	O
it	O
possible	O
to	O
have	O
SSDs	B-Device
as	O
another	O
level	O
of	O
indirection	O
within	O
the	O
data	O
storage	O
access	O
paths	O
,	O
resulting	O
in	O
improved	O
overall	O
performance	O
by	O
using	O
fast	O
flash-based	O
SSDs	B-Device
as	O
caches	B-General_Concept
for	O
slower	O
mechanical	O
hard	B-Device
disk	I-Device
drives	I-Device
(	O
HDDs	O
)	O
with	O
rotational	O
magnetic	B-Architecture
media	I-Architecture
.	O
</s>
<s>
That	O
way	O
,	O
the	O
gap	O
between	O
SSDs	B-Device
and	O
HDDs	O
can	O
be	O
bridged	O
the	O
costly	O
speed	O
of	O
SSDs	B-Device
gets	O
combined	O
with	O
the	O
cheap	O
storage	O
capacity	O
of	O
traditional	O
HDDs	O
.	O
</s>
<s>
Caching	B-General_Concept
is	O
implemented	O
by	O
using	O
SSDs	B-Device
for	O
storing	O
data	O
associated	O
with	O
performed	O
random	B-General_Concept
reads	I-General_Concept
and	O
random	B-General_Concept
writes	I-General_Concept
,	O
using	O
near-zero	O
seek	O
times	O
as	O
the	O
most	O
prominent	O
feature	O
of	O
SSDs	B-Device
.	O
</s>
<s>
Sequential	B-General_Concept
I/O	I-General_Concept
is	O
not	O
cached	O
,	O
to	O
avoid	O
rapid	O
SSD	B-Device
cache	B-General_Concept
invalidation	I-General_Concept
on	O
such	O
operations	O
that	O
are	O
already	O
suitable	O
enough	O
for	O
HDDs	O
;	O
going	O
around	O
the	O
cache	B-General_Concept
for	O
big	O
sequential	B-General_Concept
writes	I-General_Concept
is	O
known	O
as	O
the	O
write-around	O
policy	O
.	O
</s>
<s>
Not	O
caching	B-General_Concept
the	O
sequential	B-General_Concept
I/O	I-General_Concept
also	O
helps	O
in	O
extending	O
the	O
lifetime	O
of	O
SSDs	B-Device
used	O
as	O
caches	B-General_Concept
.	O
</s>
<s>
Write	B-Error_Name
amplification	I-Error_Name
is	O
avoided	O
by	O
not	O
performing	O
random	B-General_Concept
writes	I-General_Concept
to	O
SSDs	B-Device
;	O
instead	O
,	O
all	O
random	B-General_Concept
writes	I-General_Concept
to	O
SSD	B-Device
caches	B-General_Concept
are	O
always	O
combined	O
into	O
block-level	O
writes	O
,	O
ending	O
up	O
with	O
rewriting	O
only	O
the	O
complete	O
erase	O
blocks	O
on	O
SSDs	B-Device
.	O
</s>
<s>
Both	O
write-back	O
and	O
write-through	O
(	O
which	O
is	O
the	O
default	O
)	O
policies	O
are	O
supported	O
for	O
caching	B-General_Concept
write	O
operations	O
.	O
</s>
<s>
In	O
case	O
of	O
the	O
write-back	O
policy	O
,	O
written	O
data	O
is	O
stored	O
inside	O
the	O
SSD	B-Device
caches	B-General_Concept
first	O
,	O
and	O
propagated	O
to	O
the	O
HDDs	O
later	O
in	O
a	O
batched	O
way	O
while	O
performing	O
seek-friendly	O
operations	O
making	O
bcache	B-Application
to	O
act	O
also	O
as	O
an	O
I/O	B-General_Concept
scheduler	I-General_Concept
.	O
</s>
<s>
For	O
the	O
write-through	O
policy	O
,	O
which	O
ensures	O
that	O
no	O
write	O
operation	O
is	O
marked	O
as	O
finished	O
until	O
the	O
data	O
requested	O
to	O
be	O
written	O
has	O
reached	O
both	O
SSDs	B-Device
and	O
HDDs	O
,	O
performance	O
improvements	O
are	O
reduced	O
by	O
effectively	O
performing	O
only	O
caching	B-General_Concept
of	O
the	O
written	O
data	O
.	O
</s>
<s>
Write-back	O
policy	O
with	O
batched	O
writes	O
to	O
HDDs	O
provides	O
additional	O
benefits	O
to	O
write-sensitive	O
redundant	B-Architecture
array	I-Architecture
of	I-Architecture
independent	I-Architecture
disks	I-Architecture
(	O
RAID	B-Architecture
)	O
layouts	O
such	O
as	O
RAID	B-Architecture
5	O
and	O
RAID	B-Architecture
6	O
,	O
which	O
perform	O
actual	O
write	O
operations	O
as	O
atomic	B-General_Concept
read-modify-write	B-Operating_System
sequences	O
.	O
</s>
<s>
That	O
way	O
,	O
performance	O
penalties	O
of	O
small	O
random	B-General_Concept
writes	I-General_Concept
are	O
reduced	O
or	O
avoided	O
for	O
such	O
RAID	B-Architecture
layouts	O
,	O
by	O
grouping	O
them	O
together	O
and	O
performing	O
as	O
batched	O
sequential	B-General_Concept
writes	I-General_Concept
.	O
</s>
<s>
Caching	B-General_Concept
performed	O
by	O
bcache	B-Application
operates	O
at	O
the	O
block	O
device	O
level	O
,	O
making	O
itself	O
file	O
systemagnostic	O
as	O
long	O
as	O
the	O
file	B-Application
system	I-Application
provides	O
an	O
embedded	O
universally	O
unique	O
identifier	O
(	O
UUID	O
)	O
;	O
this	O
requirement	O
is	O
satisfied	O
by	O
virtually	O
all	O
standard	O
Linux	B-Operating_System
file	B-Application
systems	I-Application
,	O
as	O
well	O
as	O
by	O
swap	O
partitions	O
.	O
</s>
<s>
Sizes	O
of	O
the	O
logical	O
blocks	O
used	O
internally	O
by	O
bcache	B-Application
as	O
caching	B-General_Concept
extents	O
can	O
go	O
down	O
to	O
the	O
size	O
of	O
a	O
single	O
HDD	O
sector	O
.	O
</s>
<s>
bcache	B-Application
was	O
first	O
announced	O
by	O
Kent	O
Overstreet	O
in	O
July	O
2010	O
,	O
as	O
a	O
completely	O
working	O
Linux	B-Operating_System
kernel	I-Operating_System
module	O
,	O
though	O
at	O
its	O
early	O
beta	O
stage	O
.	O
</s>
<s>
The	O
development	O
continued	O
for	O
almost	O
two	O
years	O
,	O
until	O
May	O
2012	O
,	O
at	O
which	O
point	O
bcache	B-Application
reached	O
its	O
production-ready	O
state	O
.	O
</s>
<s>
It	O
was	O
merged	O
into	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
mainline	O
in	O
kernel	B-Operating_System
version	O
3.10	O
,	O
released	O
on	O
June	O
30	O
,	O
2013	O
.	O
</s>
<s>
Overstreet	O
has	O
since	O
been	O
developing	O
the	O
file	B-Application
system	I-Application
bcachefs	B-Application
,	O
based	O
on	O
ideas	O
first	O
developed	O
in	O
bcache	B-Application
that	O
he	O
said	O
began	O
"	O
evolving	O
...	O
into	O
a	O
full	O
blown	O
,	O
general-purpose	O
POSIX	O
filesystem	B-Application
"	O
.	O
</s>
<s>
He	O
describes	O
bcache	B-Application
as	O
a	O
"	O
prototype	O
"	O
for	O
the	O
ideas	O
that	O
became	O
bcachefs	B-Application
and	O
intends	O
bcachefs	B-Application
to	O
replace	O
bcache	B-Application
.	O
</s>
<s>
He	O
officially	O
announced	O
bcachefs	B-Application
in	O
2015	O
,	O
and	O
as	O
of	O
2018	O
has	O
been	O
submitting	O
it	O
for	O
consideration	O
for	O
inclusion	O
in	O
the	O
mainline	O
Linux	B-Operating_System
kernel	I-Operating_System
.	O
</s>
<s>
As	O
of	O
version	O
3.10	O
of	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
,	O
the	O
following	O
features	O
are	O
provided	O
by	O
bcache	B-Application
:	O
</s>
<s>
,	O
the	O
following	O
new	O
features	O
are	O
planned	O
for	O
the	O
future	O
releases	O
of	O
bcache	B-Application
:	O
</s>
