<s>
tmpfs	B-Application
(	O
short	O
for	O
Temporary	B-Application
File	I-Application
System	O
)	O
is	O
a	O
temporary	B-Application
file	I-Application
storage	O
paradigm	O
implemented	O
in	O
many	O
Unix-like	B-Operating_System
operating	I-Operating_System
systems	I-Operating_System
.	O
</s>
<s>
It	O
is	O
intended	O
to	O
appear	O
as	O
a	O
mounted	O
file	B-Application
system	I-Application
,	O
but	O
data	O
is	O
stored	O
in	O
volatile	B-General_Concept
memory	I-General_Concept
instead	O
of	O
a	O
persistent	O
storage	O
device	O
.	O
</s>
<s>
A	O
similar	O
construction	O
is	O
a	O
RAM	B-Application
disk	I-Application
,	O
which	O
appears	O
as	O
a	O
virtual	O
disk	O
drive	O
and	O
hosts	O
a	O
disk	B-Application
file	I-Application
system	I-Application
.	O
</s>
<s>
Everything	O
stored	O
in	O
tmpfs	B-Application
is	O
temporary	O
in	O
the	O
sense	O
that	O
no	O
files	O
will	O
be	O
directly	O
created	O
on	O
non-volatile	B-General_Concept
storage	I-General_Concept
such	O
as	O
a	O
hard	B-Device
drive	I-Device
(	O
although	O
swap	O
space	O
is	O
used	O
as	O
backing	B-General_Concept
store	I-General_Concept
according	O
to	O
the	O
page	B-General_Concept
replacement	I-General_Concept
policy	O
of	O
the	O
operating	O
system	O
)	O
.	O
</s>
<s>
On	O
reboot	B-Device
,	O
everything	O
in	O
tmpfs	B-Application
will	O
be	O
lost	O
.	O
</s>
<s>
The	O
memory	O
used	O
by	O
tmpfs	B-Application
grows	O
and	O
shrinks	O
to	O
accommodate	O
the	O
files	O
it	O
contains	O
.	O
</s>
<s>
Many	O
Unix	O
distributions	O
enable	O
and	O
use	O
tmpfs	B-Application
by	O
default	O
for	O
the	O
branch	O
of	O
the	O
file	B-Application
system	I-Application
or	O
for	O
shared	B-Operating_System
memory	I-Operating_System
.	O
</s>
<s>
Some	O
Linux	B-Operating_System
distributions	O
(	O
e.g.	O
</s>
<s>
Debian	O
)	O
do	O
not	O
have	O
a	O
tmpfs	B-Application
mounted	O
on	O
by	O
default	O
;	O
in	O
this	O
case	O
,	O
files	O
under	O
will	O
be	O
stored	O
in	O
the	O
same	O
file	B-Application
system	I-Application
as	O
.	O
</s>
<s>
And	O
on	O
almost	O
all	O
Linux	B-Operating_System
distributions	O
,	O
a	O
tmpfs	B-Application
is	O
mounted	O
on	O
or	O
to	O
store	O
temporary	O
run-time	O
files	O
such	O
as	O
PID	O
files	O
and	O
Unix	O
domain	O
sockets	O
.	O
</s>
<s>
There	O
are	O
several	O
independent	O
variants	O
of	O
the	O
tmpfs	B-Application
concept	O
.	O
</s>
<s>
One	O
of	O
the	O
earliest	O
was	O
developed	O
by	O
Sun	O
Microsystems	O
for	O
SunOS	B-Operating_System
,	O
and	O
other	O
operating	O
systems	O
like	O
the	O
BSDs	O
and	O
Linux	B-Operating_System
provided	O
their	O
own	O
.	O
</s>
<s>
SunOS	B-Operating_System
4	O
includes	O
what	O
is	O
most	O
likely	O
the	O
earliest	O
implementation	O
of	O
tmpfs	B-Application
;	O
it	O
first	O
appeared	O
in	O
SunOS	B-Operating_System
4.0	O
in	O
late	O
1987	O
,	O
together	O
with	O
new	O
orthogonal	O
address	O
space	O
management	O
that	O
allowed	O
any	O
object	O
to	O
be	O
memory	O
mapped	O
.	O
</s>
<s>
The	O
Solaris	B-Application
directory	O
was	O
made	O
a	O
tmpfs	B-Application
file	B-Application
system	I-Application
by	O
default	O
starting	O
with	O
Solaris	B-Application
2.1	O
,	O
released	O
in	O
December	O
1992	O
.	O
</s>
<s>
Output	O
for	O
the	O
Solaris	B-Application
df	B-Device
command	O
will	O
show	O
swap	O
as	O
the	O
background	O
storage	O
for	O
any	O
tmpfs	B-Application
volume	O
:	O
</s>
<s>
tmpfs	B-Application
is	O
supported	O
by	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
beginning	O
in	O
version	O
2.4	O
.	O
</s>
<s>
Linux	B-Operating_System
tmpfs	B-Application
(	O
previously	O
known	O
as	O
shmfs	B-Application
)	O
is	O
based	O
on	O
the	O
ramfs	O
code	O
used	O
during	O
bootup	O
and	O
also	O
uses	O
the	O
page	B-General_Concept
cache	I-General_Concept
,	O
but	O
unlike	O
ramfs	O
it	O
supports	O
swapping	O
out	O
less-used	O
pages	O
to	O
swap	O
space	O
,	O
as	O
well	O
as	O
filesystem	B-Application
size	O
and	O
inode	O
limits	O
to	O
prevent	O
out	B-General_Concept
of	I-General_Concept
memory	I-General_Concept
situations	O
(	O
defaulting	O
to	O
half	O
of	O
physical	O
RAM	O
and	O
half	O
the	O
number	O
of	O
RAM	O
pages	O
,	O
respectively	O
)	O
.	O
</s>
<s>
4.2BSD	O
introduced	O
MFS	O
,	O
a	O
memory-based	O
file	B-Application
system	I-Application
implemented	O
by	O
applying	O
the	O
existing	O
FFS	B-Operating_System
disk	O
filesystem	B-Application
to	O
a	O
virtual	O
memory	O
region	O
.	O
</s>
<s>
tmpfs	B-Application
,	O
a	O
memory	O
filesystem	B-Application
implemented	O
using	O
conventional	O
in-memory	O
data	O
structures	O
in	O
order	O
to	O
improve	O
on	O
the	O
performance	O
of	O
MFS	O
,	O
was	O
merged	O
into	O
the	O
official	O
NetBSD	B-Device
source	O
tree	O
on	O
September	O
10	O
,	O
2005	O
;	O
it	O
is	O
available	O
in	O
4.0	O
and	O
later	O
versions	O
.	O
</s>
<s>
FreeBSD	B-Operating_System
has	O
ported	O
NetBSD	B-Device
's	O
implementation	O
,	O
where	O
it	O
is	O
available	O
in	O
7.0	O
and	O
later	O
versions	O
.	O
</s>
<s>
DragonFly	B-Application
BSD	I-Application
has	O
also	O
ported	O
NetBSD	B-Device
's	O
implementation	O
,	O
where	O
it	O
is	O
available	O
in	O
2.5.1	O
and	O
later	O
versions	O
.	O
</s>
<s>
OpenBSD	B-Operating_System
ported	O
NetBSD	B-Device
's	O
tmpfs	B-Application
implementation	O
as	O
well	O
,	O
initially	O
started	O
by	O
Pedro	O
Martelletto	O
and	O
improved	O
by	O
many	O
others	O
.	O
</s>
<s>
The	O
first	O
release	O
of	O
OpenBSD	B-Operating_System
with	O
tmpfs	B-Application
included	O
was	O
5.5	O
.	O
</s>
<s>
OpenBSD	B-Operating_System
6.0	O
disabled	O
tmpfs	B-Application
due	O
to	O
lack	O
of	O
maintenance	O
.	O
</s>
<s>
Due	O
to	O
the	O
higher	O
speeds	O
of	O
RAM	O
compared	O
to	O
disk	O
storage	O
,	O
tmpfs	B-Application
allows	O
cache	B-General_Concept
to	O
be	O
much	O
faster	O
when	O
stored	O
in	O
one	O
,	O
leading	O
to	O
a	O
more	O
efficient	O
overall	O
system	O
,	O
though	O
operating	O
systems	O
with	O
a	O
page	B-General_Concept
cache	I-General_Concept
will	O
see	O
less	O
benefit	O
as	O
recently-used	O
file	O
pages	O
will	O
remain	O
in-memory	O
if	O
free	O
memory	O
is	O
sufficient	O
.	O
</s>
<s>
Since	O
RAM	O
is	O
cleared	O
upon	O
reboot	B-Device
,	O
tmpfs	B-Application
prevents	O
systems	O
from	O
becoming	O
too	O
cluttered	O
without	O
requiring	O
that	O
the	O
user	O
manually	O
deletes	O
temporary	B-Application
files	I-Application
.	O
</s>
<s>
In	O
addition	O
,	O
storing	O
files	O
in	O
RAM	O
prevents	O
disks	O
from	O
filling	O
up	O
too	O
quickly	O
and	O
extends	O
the	O
life	O
of	O
solid-state	B-Device
drives	I-Device
by	O
reducing	O
the	O
amount	O
of	O
writes	O
.	O
</s>
<s>
On	O
systems	O
without	O
swap	O
space	O
,	O
or	O
where	O
swap	O
space	O
is	O
running	O
low	O
,	O
tmpfs	B-Application
may	O
consume	O
large	O
amounts	O
of	O
memory	O
.	O
</s>
<s>
If	O
cache	B-General_Concept
files	O
are	O
stored	O
in	O
tmpfs	B-Application
,	O
programs	O
will	O
lose	O
their	O
cached	O
data	O
across	O
reboots	B-Device
.	O
</s>
