1st SUMMARY of "swapfs vs. tmpfs - what's the difference ?"

2007-12-25 9:46:00

In my pursuit of trying to better understand the swapfs file system I have

      discovered that I am going to have to do a little more research

      before I can summarize in full. When I better understand swapfs I

      will summarize again with details. In the mean time, I did receive

      some feedback from 2 individuals who were helpful with their replies.

      The 2 replies have been included below.

Thank you to :

Sean Quaint

      and

Casper Dik

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

      +++++++++++

Casper wrote ...

===========================================================================

      ===========

>

>1) What are the differences between swapfs and tmpfs filesystems ?

Swapfs is the virtual layer used to combine physical memory and swap

partitions into one big virtual swap space.

Tmpfs is the filesystem that lives in swap and uses swapfs to allocate

data blocks.

>2) Why doesn't Solaris use swapfs as the swap filesystem type ?

It does, but you just don't see them in mount commands.

>3) What are the pros and cons if I change the filesystem type of swap

>from tmpfs to swapfs ?

You're confused; what you have no is tmpfs mounted on swap; it's not

swap done as tmpfs.

Casper

===========================================================================

=============

Sean wrote ...

===========================================================================

=============

>

> 1) Is "swapfs" part of the implementation and use of a "tmpfs" filesystem

> ?

>

Nope. Swapfs is a seperate file system type. When you "swap" in

/etc/vfstab

indicates use of swapfs.

>

> 2) If swapfs is a valid filesystem type, why can't I use it as the

> filesystem type for swap in /etc/vfstab ? (By default, part of the

system

> is configured with swap space file system type as tmpfs). Does this mean

> the system constructs a swapfs filesystem which consists of the swap

space

> allocated on the disk device AND memory ? (I understand that swap space

> can be memory and/or disk space, keeping in mind my question is with

regard

> to the swapfs filesystem not swap space).

>

Swapfs is the file system that manages virtual memory, be it disk-based, or

RAM-based. You do use swapfs (see above). The file system kreeps track of

its files, just like ufs keeps tabs on its files through idone tables.

swapfs

maintains what's paged either to disk or ram.

>

                                  n n n n

Comments

Got something to say?

You must be logged in to post a comment.