Using TMPFS for /tmp and /var/run?

David Wolfskill david at catwhisker.org
Mon Apr 2 13:27:00 UTC 2012


On Mon, Apr 02, 2012 at 01:31:19PM +0300, Gleb Kurtsou wrote:
> ...
> You could try the patch attached. It adds support for size option suffixes
> (like 1g) and introduces swap limit (part of the older patch, not sure
> if it's any use).
> 
> Patch is against 10-CURRENT.
> Older version: https://github.com/glk/freebsd-head/commit/3bd8f7d
> ....

OK; here's a summary of what I found so far, now running:

FreeBSD g1-227.catwhisker.org 10.0-CURRENT FreeBSD 10.0-CURRENT #0 233772M: Mon Apr  2 05:42:48 PDT 2012     root at g1-227.catwhisker.org:/usr/obj/usr/src/sys/CANARY  i386

* First, the patch applied cleanly (via "patch -p1").

* Resulting sources build with no issues.

* Prior specification I had in /etc/fstab:

  tmpfs    /tmp    tmpfs    rw,size=2147483648	0    0

  worked same as before the patch; "df -h /tmp" reported a size of 2.0G.

* Changing the above to read:

  tmpfs    /tmp    tmpfs    rw,size=2g	0    0

  also provided the same result, so the unit-specification code looks
  as if it's working as expected.

* I have 20G specified for swap, and 4G RAM (and, as above, I'm running
  i386).  Changing the above tmpfs line in /etc/fstab to

  tmpfs    /tmp    tmpfs    rw,size=8g	0    0

  (still) yields:

g1-227(10.0-C)[3] df -h /tmp
Filesystem    Size    Used   Avail Capacity  Mounted on
tmpfs          23G     12k     23G     0%    /tmp
g1-227(10.0-C)[4] 

(Yes, I'm using a whopping total of 12kB while running X.  I know of
*very* few folks who use the window manager I prefer. :-})

I'll try exercising it a bit during the day at work & report anything
noteworthy.  But so far, I see no evidence of regression, and there is
some measure of usability improvement (IMO).  So it's looking
encouraging.  :-)

Peace,
david
-- 
David H. Wolfskill				david at catwhisker.org
Depriving a girl or boy of an opportunity for education is evil.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20120402/25a8a9e8/attachment.pgp


More information about the freebsd-current mailing list