Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

putting "/tmp" to memory

0 views
Skip to first unread message

kellyremo

unread,
Jan 23, 2011, 8:47:23 AM1/23/11
to

"to memory" means: mounting a ~2 GByte filesystem [ tmpfs?, or ramfs? ], and put the "/tmp" on it. [ e.g.: 4 GByte ram in the pc ]. what to write in the "/etc/fstab"?

I would like to collect the [ answers too:P ]:

Advantages:
- Memory is way faster then HDD/SSD, so it could speed things up
- "SSD amortization" is less

Disadvantages:
- Security? [ how to set this up to be secure? any clear howtos/links regarding it? :O ]

Really thank you for any good help...


_______________________________________________
freebsd-...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questi...@freebsd.org"

Terrence Koeman

unread,
Jan 23, 2011, 2:13:23 PM1/23/11
to
> -----Original Message-----
> From: owner-freeb...@freebsd.org [mailto:owner-freebsd-
> ques...@freebsd.org] On Behalf Of kellyremo
> Sent: Sunday, January 23, 2011 14:47
> To: FreeBSD
> Subject: putting "/tmp" to memory
> Importance: High
>
>
> "to memory" means: mounting a ~2 GByte filesystem [ tmpfs?, or ramfs?
> ], and put the "/tmp" on it. [ e.g.: 4 GByte ram in the pc ]. what to
> write in the "/etc/fstab"?
>
> I would like to collect the [ answers too:P ]:
>
> Advantages:
> - Memory is way faster then HDD/SSD, so it could speed things up
> - "SSD amortization" is less
>
> Disadvantages:
> - Security? [ how to set this up to be secure? any clear howtos/links
> regarding it? :O ]
>
> Really thank you for any good help...
>

In rc.conf:

tmpmfs="YES"
tmpsize="2G"
tmpmfs_flags="-S"

That'll do it :)

--
Regards,
T. Koeman, MTh/BSc/BPsy; Technical Monk

MediaMonks B.V. (www.mediamonks.com)
Please quote relevant replies in correspondence.

Charlie Kester

unread,
Jan 23, 2011, 3:21:00 PM1/23/11
to
On Sun 23 Jan 2011 at 11:13:23 PST Terrence Koeman wrote:
>> -----Original Message-----
>> From: owner-freeb...@freebsd.org [mailto:owner-freebsd-
>> ques...@freebsd.org] On Behalf Of kellyremo
>> Sent: Sunday, January 23, 2011 14:47
>> To: FreeBSD
>> Subject: putting "/tmp" to memory
>> Importance: High
>>
>>
>> "to memory" means: mounting a ~2 GByte filesystem [ tmpfs?, or ramfs?
>> ], and put the "/tmp" on it. [ e.g.: 4 GByte ram in the pc ]. what to
>> write in the "/etc/fstab"?
>>
>> I would like to collect the [ answers too:P ]:
>>
>> Advantages:
>> - Memory is way faster then HDD/SSD, so it could speed things up
>> - "SSD amortization" is less
>>
>> Disadvantages:
>> - Security? [ how to set this up to be secure? any clear howtos/links
>> regarding it? :O ]
>>
>> Really thank you for any good help...
>>
>
>In rc.conf:
>
>tmpmfs="YES"
>tmpsize="2G"
>tmpmfs_flags="-S"
>
>That'll do it :)

For other tmpmfs_flags, man mdmfs(8).

My rc.conf, for example, has:

tmpmfs_flags="-m 0 -o async, noatime -S -p 1777"

RW

unread,
Jan 24, 2011, 7:18:21 AM1/24/11
to
On Sun, 23 Jan 2011 05:47:23 -0800
kellyremo <kell...@zoho.com> wrote:

>
> "to memory" means: mounting a ~2 GByte filesystem [ tmpfs?, or
> ramfs? ], and put the "/tmp" on it. [ e.g.: 4 GByte ram in the pc ].
> what to write in the "/etc/fstab"?

I have

tmpfs /tmp tmpfs rw,size=4280000000

I would suggest you don't use tmpmfs="YES" in rc.conf unless you are
being very conservative with a production server. tmpfs is nominally
experimental, but it seems to be very stable, and it's much more memory
efficient than md devices.


> Advantages:
> - Memory is way faster then HDD/SSD, so it could speed things up

It's not all that much faster due caching and soft-updates on hard
disks.

> Disadvantages:
> - Security? [ how to set this up to be secure? any clear
> howtos/links regarding it? :O ]

Do you have any particular concerns?

Bruce Cran

unread,
Jan 24, 2011, 7:38:10 AM1/24/11
to
On Mon, 24 Jan 2011 12:18:21 +0000
RW <rwmai...@googlemail.com> wrote:

> tmpfs is nominally
> experimental, but it seems to be very stable, and it's much more
> memory efficient than md devices.

But it doesn't work well with ZFS.

--
Bruce Cran

Jerry

unread,
Jan 24, 2011, 7:52:05 AM1/24/11
to
On Mon, 24 Jan 2011 12:18:21 +0000
RW <rwmai...@googlemail.com> articulated:

> I have
>
> tmpfs /tmp tmpfs rw,size=4280000000
>
> I would suggest you don't use tmpmfs="YES" in rc.conf unless you are
> being very conservative with a production server. tmpfs is nominally
> experimental, but it seems to be very stable, and it's much more
> memory efficient than md devices.

On a FreeBSD 8.2-PRERELEASE, I have the following:

cat /etc/fstab | grep -i "tmpfs"
tmpfs /tmp tmpfs rw,mode=01777 0 0

It works very well and I have not noticed any problems whatsoever.

--
Jerry ✌
FreeBS...@seibercom.net

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.
__________________________________________________________________

Critics are like eunuchs in a harem: they know how it is done, they have
seen it done every day, but they are unable to do it themselves.

Brendan Behan

Jerry

unread,
Jan 24, 2011, 8:09:05 AM1/24/11
to
On Mon, 24 Jan 2011 12:38:10 +0000
Bruce Cran <br...@cran.org.uk> articulated:

> On Mon, 24 Jan 2011 12:18:21 +0000
> RW <rwmai...@googlemail.com> wrote:
>
> > tmpfs is nominally
> > experimental, but it seems to be very stable, and it's much more
> > memory efficient than md devices.
>
> But it doesn't work well with ZFS.

I had not heard about that. What problems does its use exhibit when
used in conjunction with ZFS?

--
Jerry ✌
FreeBS...@seibercom.net

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.
__________________________________________________________________

I never take work home with me; I always leave it in some bar along the
way.

Bruce Cran

unread,
Jan 24, 2011, 8:25:05 AM1/24/11
to
On Mon, 24 Jan 2011 08:09:05 -0500
Jerry <freebs...@seibercom.net> wrote:

> I had not heard about that. What problems does its use exhibit when
> used in conjunction with ZFS?

http://lists.freebsd.org/pipermail/freebsd-stable/2011-January/060867.html

--
Bruce Cran

Jerry

unread,
Jan 24, 2011, 9:42:55 AM1/24/11
to
On Mon, 24 Jan 2011 13:25:05 +0000
Bruce Cran <br...@cran.org.uk> articulated:

> On Mon, 24 Jan 2011 08:09:05 -0500


> Jerry <freebs...@seibercom.net> wrote:
>
> > I had not heard about that. What problems does its use exhibit when
> > used in conjunction with ZFS?
>
> http://lists.freebsd.org/pipermail/freebsd-stable/2011-January/060867.html

Thanks for the link. I don't use ZFS so it does not directly concern
me; although, it is a good thing to know. FreeBSD, at least from what I
can ascertain, really does not have good support for ZFS anyway. I
question whether releasing a product of dubious functionality is an
intelligent thing to do. The old axiom of only getting one chance to
make a good first impression would seem to be apropos to the situation.

Just my 2¢.


--
Jerry ✌
FreeBS...@seibercom.net

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.
__________________________________________________________________

No one has a higher opinion of him than he has.

Greg Lehey, FreeBSDcon 1999

Bruce Cran

unread,
Jan 24, 2011, 10:49:41 AM1/24/11
to
On Mon, 24 Jan 2011 09:42:55 -0500
Jerry <freebs...@seibercom.net> wrote:

> FreeBSD, at least from what
> I can ascertain, really does not have good support for ZFS anyway. I
> question whether releasing a product of dubious functionality is an
> intelligent thing to do. The old axiom of only getting one chance to
> make a good first impression would seem to be apropos to the
> situation.

From what I can ascertain and having actually used it, ZFS has great
support on FreeBSD.

--
Bruce Cran

David Naylor

unread,
Jan 24, 2011, 3:46:58 PM1/24/11
to
On Monday 24 January 2011 14:52:05 Jerry wrote:
> On Mon, 24 Jan 2011 12:18:21 +0000
>
> RW <rwmai...@googlemail.com> articulated:
> > I have
> >
> > tmpfs /tmp tmpfs rw,size=4280000000
> >
> > I would suggest you don't use tmpmfs="YES" in rc.conf unless you are
> > being very conservative with a production server. tmpfs is nominally
> > experimental, but it seems to be very stable, and it's much more
> > memory efficient than md devices.
>
> On a FreeBSD 8.2-PRERELEASE, I have the following:
>
> cat /etc/fstab | grep -i "tmpfs"
> tmpfs /tmp tmpfs rw,mode=01777 0 0
>
> It works very well and I have not noticed any problems whatsoever.

I have noticed that editors/openoffice.org-3 will fail to build if /tmp is
tmpfs. Other than that it has been stable for me.

signature.asc
0 new messages