FBSD swap, Solaris swap on /tmp - BSD

This is a discussion on FBSD swap, Solaris swap on /tmp - BSD ; Hi all, I have been a long time user of FBSD. Swap on FBSD is not a mounted filesystem. Unlike Solaris where it is usually mounted as /tmp. Is swap on FBSD a filesystem or is it just a raw ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: FBSD swap, Solaris swap on /tmp

  1. FBSD swap, Solaris swap on /tmp

    Hi all,

    I have been a long time user of FBSD.

    Swap on FBSD is not a mounted filesystem. Unlike Solaris where it is
    usually mounted as /tmp.

    Is swap on FBSD a filesystem or is it just a raw slice ?

    Seems odd to me that Solaris mounts it as a filesystem. Anybody can
    mistakenly copy things to the /tmp directory and run the box out of
    swap.


  2. Re: FBSD swap, Solaris swap on /tmp

    quoting Brent Bolin (18 Dec 2006 04:56:43 -0800):
    > Seems odd to me that Solaris mounts it as a filesystem. Anybody can
    > mistakenly copy things to the /tmp directory and run the box out of
    > swap.


    There's more to that then meets the eye. Read on it.

    --
    http://nagual.nl/ --- PGP/GnuPG key: F86289CE
    ++ Running FreeBSD 6.1 ++ Solaris 10 11/06 ++

  3. Re: FBSD swap, Solaris swap on /tmp


    "Brent Bolin" wrote in message
    news:1166446603.459582.128760@j72g2000cwa.googlegr oups.com...
    > Hi all,
    >
    > I have been a long time user of FBSD.
    >
    > Swap on FBSD is not a mounted filesystem. Unlike Solaris where it is
    > usually mounted as /tmp.
    >
    > Is swap on FBSD a filesystem or is it just a raw slice ?
    >
    > Seems odd to me that Solaris mounts it as a filesystem. Anybody can
    > mistakenly copy things to the /tmp directory and run the box out of
    > swap.


    Actually, on Solaris it is not unusual to create /tmp in swap,
    I believe this is default behaviour of the install.
    But it is recommended, if you choose to do so,
    to use only part of the swap - for the reason you mentioned.



  4. Re: FBSD swap, Solaris swap on /tmp

    "karel" writes:


    >"Brent Bolin" wrote in message
    >news:1166446603.459582.128760@j72g2000cwa.googlegr oups.com...
    >> Hi all,
    >>
    >> I have been a long time user of FBSD.
    >>
    >> Swap on FBSD is not a mounted filesystem. Unlike Solaris where it is
    >> usually mounted as /tmp.
    >>
    >> Is swap on FBSD a filesystem or is it just a raw slice ?
    >>
    >> Seems odd to me that Solaris mounts it as a filesystem. Anybody can
    >> mistakenly copy things to the /tmp directory and run the box out of
    >> swap.


    >Actually, on Solaris it is not unusual to create /tmp in swap,
    >I believe this is default behaviour of the install.
    >But it is recommended, if you choose to do so,
    >to use only part of the swap - for the reason you mentioned.


    It's been the default behavior since SunOS 4.1.4. This is normally a huge
    win, as it means that /tmp is actually a RAMdisk, rather than using a
    physical disk.

    There are two "issues" with doing so. The first is what is mentioned
    above, namely that if you don't limit the size of /tmp a user can easily
    use all the RAM (and potentially all the SWAP) for files. The second,
    which isn't actually a problem as long as the users are aware of it, is
    that the contents of /tmp truly are temporary - they don't survive a
    reboot.

    --
    Michael T Pins
    mtpins@nndev.org
    keeper of the nn sources
    http://www.nndev.org

  5. Re: FBSD swap, Solaris swap on /tmp

    In article <1166446603.459582.128760@j72g2000cwa.googlegroups. com>
    "Brent Bolin" writes:
    >
    >I have been a long time user of FBSD.
    >
    >Swap on FBSD is not a mounted filesystem. Unlike Solaris where it is
    >usually mounted as /tmp.


    Uh, that is not a property of swap on Solaris (or any other unix AFAIK),
    but a property of the /tmp file system - it is (usually) mounted with
    swap as backing store. You can do that on other unices too if you want
    to, e.g. Linux has tmpfs and on FreeBSD you can use mdconfig(8) to do
    the same thing (it's even among the examples in the man page). Doing it
    has tradeoffs as discussed in other posts, and it isn't mandatory on
    Solaris any more than on the others.

    >Is swap on FBSD a filesystem or is it just a raw slice ?


    It's not a file system on any of FreeBSD, Solaris, or Linux (or any
    other unix AFAIK).

    --Per Hedeland
    per@hedeland.org

  6. Re: FBSD swap, Solaris swap on /tmp

    On 18 Dec 2006 04:56:43 -0800
    "Brent Bolin" wrote:

    > Hi all,
    >
    > I have been a long time user of FBSD.
    >
    > Swap on FBSD is not a mounted filesystem. Unlike Solaris where it is
    > usually mounted as /tmp.
    >
    > Is swap on FBSD a filesystem or is it just a raw slice ?


    It is just a raw slice.

    > Seems odd to me that Solaris mounts it as a filesystem. Anybody can
    > mistakenly copy things to the /tmp directory and run the box out of
    > swap.


    IIRC /tmp on Solaris is usually smaller than swap and is really
    just a swap backed memory mapped filesystem.

    --
    C:>WIN | Directable Mirror Arrays
    The computer obeys and wins. | A better way to focus the sun
    You lose and Bill collects. | licences available see
    | http://www.sohara.org/

  7. Re: FBSD swap, Solaris swap on /tmp

    Steve O'Hara-Smith wrote:
    >>
    >> I have been a long time user of FBSD.
    >>
    >> Swap on FBSD is not a mounted filesystem. Unlike Solaris where it is
    >> usually mounted as /tmp.
    >>
    >> Is swap on FBSD a filesystem or is it just a raw slice ?

    >
    > It is just a raw slice.
    >
    >> Seems odd to me that Solaris mounts it as a filesystem. Anybody can
    >> mistakenly copy things to the /tmp directory and run the box out of
    >> swap.

    >
    > IIRC /tmp on Solaris is usually smaller than swap and is really
    > just a swap backed memory mapped filesystem.


    Indeed, on Solaris /tmp is a tmpfs filesystem. The BSD operating systems
    have a tmpfs-like filesystem called mfs (memory filesystem) that can be
    used to achieve similar goals on /tmp. There are some differences
    between tmpfs and mfs (tmpfs does not provide a translation layer,
    so filesystem transactions require functions to be rewritten to
    support access to a memory filesystem, but it is faster). NetBSD 4.0
    will support a "tmpfs" enabled by default in the kernel, don't know
    how it works however. I think it is not the same as Sun's tmpfs.

    Cheers,
    Igor.

+ Reply to Thread