On 9/14/06, Brandon Peirce <[EMAIL PROTECTED]> wrote:
Muzhmail wrote:
>On Thursday 14 September 2006 19:59, Stef Bon wrote:
> > Hello,
> >
> > I want to use a temporary filesystem, and I was wondering I could
> > use /dev/shm. You could say, hey it's your system, so you can use it,
> > but hey, what's the purpose of /dev/shm. Why is it there?
> >
> >
> > Thanks in advance,
> > Stef Bon
>
>
>I think it is something like the Amiga RAM disk.  It can be used to save
>files
>etc, using memory instead of physical media.
>Of course everything disappears on a reboot or halt --

Well tmpfs is a type of filesystem which is pretty much as you describe.  In
fact it's cool because it stays in memory when there's enough available
other
wise it gets written out to your swap partition.  This makes it noticably
faster
than normal disk access.

The temp filesystem (or RAM disk, if you like) is created at the moment you
mount it and destroyed when you umount it.  You can define the max size
with size=256m (for 256MB) as an arg to -o option on your mount command,
or in the options field of /etc/fstab. The default size is half your total
system
memory.

Well that's tmpfs.  There's a tmpfs mounted at /dev/shm, but don't use that!
That's for POSIX shared memory support (which hardly any programs use,
yet, so you can seriously reduce the size of that in your /etc/fstab).

Tmpfs is very cool to mount on /tmp, then you get very fast temporary files
since they mostly don't stay around long they never need to be written to
disk.  You can actually mount a tmpfs on any directory you want and there
are lot's of possible things you could do with it.  For example, you could
put together a system where some heavily-accessed read-only files/
programs are loaded from CD-ROM into a tmpfs at boot and accessed from
there to have a lightening fast system (assuming you have lot's of RAM).

Just remember, if your machine crashes, reboots, has a power failure, etc.
even an accidental umount, and it's all gone without any undelete
possibility.
Don't save important data there, like the document you're working on for
half a day....


However, this does make it extremely good for storing sensitive data
before encryption.

Brandon


--
http://linuxfromscratch.org/mailman/listinfo/lfs-chat
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page



--
___________________________________________________________________________
"People disagree with me. I just ignore them."
                                 -Linus Torvalds
"Windows is easier than Linux, just like crapping your pants is easier
than going to the bathroom."
                                 - Martin from compsci.ca forums
___________________________________________________________________________
Things I found but won't tell you where I got them:
-  "When encryption is outlawed, bayl bhgynjf jvyy unir cevinpl"

- "Trust No one"
___________________________________________________________________________
If you think this signature was boring, I suggest you make a better one for me.
--
http://linuxfromscratch.org/mailman/listinfo/lfs-chat
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to