Re: Using TMPFS for /tmp and /var/run?

2012-04-28 Thread Luke Dean
On Fri, 30 Mar 2012, Chris Rees wrote: On 30 Mar 2012 14:26, sth...@nethelp.no wrote: However, if you always want to use tmpfs instead of stable storage, please do not. Some people expect /tmp to be persistent. This is why /etc/defaults/rc.conf has clear_tmp_enable=NO. Changing this

Re: Using TMPFS for /tmp and /var/run?

2012-04-28 Thread Chris Rees
On 28 Apr 2012 19:04, Luke Dean lu...@pobox.com wrote: On Fri, 30 Mar 2012, Chris Rees wrote: On 30 Mar 2012 14:26, sth...@nethelp.no wrote: However, if you always want to use tmpfs instead of stable storage, please do not. Some people expect /tmp to be persistent. This is why

Re: Using TMPFS for /tmp and /var/run?

2012-04-05 Thread Gleb Kurtsou
On (04/04/2012 06:38), David Wolfskill wrote: On Wed, Apr 04, 2012 at 12:50:35PM +0300, Gleb Kurtsou wrote: ... tmpfs-32bit-size_max.patch.txt should fix the problem. I don't have i386 installations to test it myself. Do you run PAE kernel? Could you try filling up /tmp at least to

Re: Using TMPFS for /tmp and /var/run?

2012-04-05 Thread David Wolfskill
On Thu, Apr 05, 2012 at 10:43:04AM +0300, Gleb Kurtsou wrote: ... Summary: as before, I believe that the patch didn't hurt anything, but it also doesn't restrict the usable size of /tmp to the specified size (from /etc/fstab): I've checked on i386 and patch worked as expected, but it

Re: Using TMPFS for /tmp and /var/run?

2012-04-04 Thread David Wolfskill
On Wed, Apr 04, 2012 at 12:50:35PM +0300, Gleb Kurtsou wrote: ... tmpfs-32bit-size_max.patch.txt should fix the problem. I don't have i386 installations to test it myself. Do you run PAE kernel? Could you try filling up /tmp at least to 10g. ... After updating source to r233868, applying

Re: Using TMPFS for /tmp and /var/run?

2012-04-03 Thread David Wolfskill
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:

Re: Using TMPFS for /tmp and /var/run?

2012-04-03 Thread jb
jb jb.1234abcd at gmail.com writes: ... There are memory management subsystem considerations against utilizing tmpfs (memory + swap) for /tmp: ... - Out-of-Memory (OOM) killer Due to it, on heavy loaded systems processes dying on memory pressure. - Pterodactyl The next MM subsystem

Re: Using TMPFS for /tmp and /var/run?

2012-04-02 Thread Gleb Kurtsou
On (29/03/2012 21:49), O. Hartmann wrote: Am 03/29/12 18:14, schrieb David Wolfskill: On Thu, Mar 29, 2012 at 04:18:06PM +0200, O. Hartmann wrote: I was wondering if there are some objections using TMPFS for /tmp and /var/run. ... My question is whether there are objections using TMPFS

Re: Using TMPFS for /tmp and /var/run?

2012-04-02 Thread grarpamp
I commonly use mfs for /var and /tmp. Sometimes even symlinking /var/tmp - /tmp to save ram. Mostly because I want nothing leftover in them on boot, and it's fast. rc/mtree/etc takes care of populating them. /, /boot, /usr and /usr/local are read-only. [nssswitch host.conf still needs fixed to

Re: Using TMPFS for /tmp and /var/run?

2012-04-02 Thread David Wolfskill
On Mon, Apr 02, 2012 at 01:31:19PM +0300, Gleb Kurtsou wrote: ... In any case, effective maximum usable size for tmpfs involves SIZE_MAX (~4G) PAGE_SIZE (4K, in my case). size_t is 64-bit on 64-bit archs. OK. Still, the requirement that the size specification be in bytes is

Re: Using TMPFS for /tmp and /var/run?

2012-04-02 Thread David Wolfskill
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:

Re: Using TMPFS for /tmp and /var/run?

2012-04-02 Thread jb
jb jb.1234abcd at gmail.com writes: ... Chuck Burns brea...@gmail.com 1:01 AM (16 hours ago) My experiences with using tmpfs as /tmp -- It works fine. until it doesn't. I've had mountpoints run out of space, checked df and the mountpoint had been reduced to something

Re: Using TMPFS for /tmp and /var/run?

2012-04-02 Thread Chris Rees
On 2 Apr 2012 16:47, jb jb.1234a...@gmail.com wrote: jb jb.1234abcd at gmail.com writes: ... Chuck Burns brea...@gmail.com 1:01 AM (16 hours ago) My experiences with using tmpfs as /tmp -- It works fine. until it doesn't. I've had mountpoints run out of space, checked df and the

Re: Using TMPFS for /tmp and /var/run?

2012-04-02 Thread Gleb Kurtsou
On (02/04/2012 06:26), David Wolfskill wrote: 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

Re: Using TMPFS for /tmp and /var/run?

2012-04-02 Thread Chuck Burns
On 4/2/2012 10:52 AM, Chris Rees wrote: This is a known issue with ZFS. Is that your case? Chris Yes. Interesting that it happens only with ZFS. and jb, thanks, I could've sworn I'd hit Reply to list - thanks for forwarding it for me. Chuck

Re: Using TMPFS for /tmp and /var/run?

2012-04-02 Thread Doug Barton
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 03/29/2012 13:52, Xin Li wrote: On 03/29/12 09:41, Chris Rees wrote: On 29 Mar 2012 16:49, O. Hartmann ohart...@mail.zedat.fu-berlin.de wrote: I was wondering if there are some objections using TMPFS for /tmp and /var/run. I figured out

Re: Using TMPFS for /tmp and /var/run?

2012-04-01 Thread Gary Palmer
On Sat, Mar 31, 2012 at 02:57:38AM +0200, deeptec...@gmail.com wrote: C. P. Ghost wrote: Not clearing /tmp on reboot has been the norm for way too long and it is too late to change now. We either evolve or be in a stalemate forever. It's not just POLA, it also involves deleting data of

Re: Using TMPFS for /tmp and /var/run?

2012-04-01 Thread Rainer Duffner
Am Sun, 1 Apr 2012 09:40:25 -0400 schrieb Gary Palmer gpal...@freebsd.org: Other than catching software that mistakenly assumes /tmp and/or /var/run is persistent, what are the CLEAR advantages for changing the default? It's my understanding it improves performance in cases where lots of

Re: Using TMPFS for /tmp and /var/run?

2012-04-01 Thread jb
Rainer Duffner rainer at ultra-secure.de writes: Am Sun, 1 Apr 2012 09:40:25 -0400 schrieb Gary Palmer gpalmer at freebsd.org: Other than catching software that mistakenly assumes /tmp and/or /var/run is persistent, what are the CLEAR advantages for changing the default? It's my

Re: Using TMPFS for /tmp and /var/run?

2012-04-01 Thread deeptech71
Adrian Chadd wrote: On 30 March 2012 17:57,deeptec...@gmail.com wrote: C. P. Ghost wrote: Not clearing /tmp on reboot has been the norm for way too long and it is too late to change now. We either evolve or be in a stalemate forever. No, you do it in a sensible, controlled fashion.

Re: Using TMPFS for /tmp and /var/run?

2012-04-01 Thread Warren Block
On Mon, 2 Apr 2012, deeptec...@gmail.com wrote: I personally wouldn't use TMPFS, because I have a rather low amount of RAM (512MiB). Depends on what you keep there. I've been trying it lately. For an X desktop running xfce, /tmp is only 332K.

Re: Using TMPFS for /tmp and /var/run?

2012-03-31 Thread Matthias Andree
Am 29.03.2012 22:52, schrieb Eric van Gyzen: Respectfully, no. The default is to store /tmp in UFS, either in its own partition (with Auto Defaults) or in / (if no partition was created for it), and to refrain from clearing it at boot. Thus, although /tmp is not guaranteed to persist in

Re: Using TMPFS for /tmp and /var/run?

2012-03-31 Thread Matthias Andree
Am 30.03.2012 21:36, schrieb Adrian Chadd: Let me tell you a story. Someone decided that ext4 could have a decent speed up if it implemented the posix standard for not flushing files on close(). After all, if you needed it to be guaranteed to be written to disk, you would call a flush

Re: Using TMPFS for /tmp and /var/run?

2012-03-31 Thread Matthew Seaman
On 31/03/2012 03:05, Benjamin Kaduk wrote: P.S. I am somewhat unconvinced by this: http://wiki.debian.org/ReleaseGoals/RunDirectory Those who do not understand /var are condemned to reinvent it? -- Dr Matthew J Seaman MA, D.Phil. PGP: http://www.infracaninophile.co.uk/pgpkey signature.asc

Re: Using TMPFS for /tmp and /var/run?

2012-03-30 Thread Matt Thyer
On Mar 30, 2012 6:22 AM, Eric van Gyzen e...@vangyzen.net wrote: However, if you always want to use tmpfs instead of stable storage, please do not. Some people expect /tmp to be persistent. This is why /etc/defaults/rc.conf has clear_tmp_enable=NO. Changing this would break the POLA. This is

Re: Using TMPFS for /tmp and /var/run?

2012-03-30 Thread sthaug
However, if you always want to use tmpfs instead of stable storage, please do not. Some people expect /tmp to be persistent. This is why /etc/defaults/rc.conf has clear_tmp_enable=NO. Changing this would break the POLA. This is a mistake. The default should be clear_tmp_enable=YES

Re: Using TMPFS for /tmp and /var/run?

2012-03-30 Thread Chris Rees
On 30 Mar 2012 14:26, sth...@nethelp.no wrote: However, if you always want to use tmpfs instead of stable storage, please do not. Some people expect /tmp to be persistent. This is why /etc/defaults/rc.conf has clear_tmp_enable=NO. Changing this would break the POLA. This is a

Re: Using TMPFS for /tmp and /var/run?

2012-03-30 Thread jb
O. Hartmann ohartman at zedat.fu-berlin.de writes: Am 03/29/12 18:14, schrieb David Wolfskill: On Thu, Mar 29, 2012 at 04:18:06PM +0200, O. Hartmann wrote: I was wondering if there are some objections using TMPFS for /tmp and /var/run. ... ... Linux is using TMPFS filesystems a lot

Re: Using TMPFS for /tmp and /var/run?

2012-03-30 Thread Lucas Holt
/tmp is used by eaccelerator for its cache. It's not required to persist but does prevent the need to regenerate everything after a reboot. Lucas Holt On Mar 30, 2012, at 10:43 AM, Chris Rees utis...@gmail.com wrote: On 30 Mar 2012 14:26, sth...@nethelp.no wrote: However, if you always

Re: Using TMPFS for /tmp and /var/run?

2012-03-30 Thread sthaug
The default should be clear_tmp_enable=YES if only to uncover those broken configurations that expect /tmp to be persistent. If you want to break POLA and make a lot of people angry, sure. Otherwise no. I would very much like an example of where /tmp is expected to persist. I

Re: Using TMPFS for /tmp and /var/run?

2012-03-30 Thread C. P. Ghost
On Fri, Mar 30, 2012 at 3:18 PM, sth...@nethelp.no wrote: However, if you always want to use tmpfs instead of stable storage, please do not.  Some people expect /tmp to be persistent.  This is why /etc/defaults/rc.conf has clear_tmp_enable=NO.  Changing this would break the POLA. This is

Re: Using TMPFS for /tmp and /var/run?

2012-03-30 Thread Chris Rees
On 30 March 2012 17:31, C. P. Ghost cpgh...@cordula.ws wrote: On Fri, Mar 30, 2012 at 3:18 PM,  sth...@nethelp.no wrote: However, if you always want to use tmpfs instead of stable storage, please do not.  Some people expect /tmp to be persistent.  This is why /etc/defaults/rc.conf has

Re: Using TMPFS for /tmp and /var/run?

2012-03-30 Thread Steve Kargl
On Fri, Mar 30, 2012 at 05:56:06PM +, Chris Rees wrote: On 30 March 2012 17:31, C. P. Ghost cpgh...@cordula.ws wrote: On Fri, Mar 30, 2012 at 3:18 PM,  sth...@nethelp.no wrote: However, if you always want to use tmpfs instead of stable storage, please do not.  Some people expect /tmp

Re: Using TMPFS for /tmp and /var/run?

2012-03-30 Thread matt
On 03/30/12 11:15, Steve Kargl wrote: On Fri, Mar 30, 2012 at 05:56:06PM +, Chris Rees wrote: On 30 March 2012 17:31, C. P. Ghost cpgh...@cordula.ws wrote: On Fri, Mar 30, 2012 at 3:18 PM, sth...@nethelp.no wrote: However, if you always want to use tmpfs instead of stable storage, please

Re: Using TMPFS for /tmp and /var/run?

2012-03-30 Thread Adrian Chadd
Let me tell you a story. Someone decided that ext4 could have a decent speed up if it implemented the posix standard for not flushing files on close(). After all, if you needed it to be guaranteed to be written to disk, you would call a flush routine first, before you called close(). So they did

Re: Using TMPFS for /tmp and /var/run?

2012-03-30 Thread Chris Rees
On 30 March 2012 19:36, Adrian Chadd adr...@freebsd.org wrote: On 30 March 2012 10:56, Chris Rees cr...@freebsd.org wrote: On 30 March 2012 17:31, C. P. Ghost cpgh...@cordula.ws wrote: On Fri, Mar 30, 2012 at 3:18 PM,  sth...@nethelp.no wrote: However, if you always want to use tmpfs instead

Re: Using TMPFS for /tmp and /var/run?

2012-03-30 Thread Adrian Chadd
On 30 March 2012 12:42, Chris Rees cr...@freebsd.org wrote: Guess what ext4 did? :) Don't mis-estimate POLA. Well, having thought about what this conversation was *really* about, I may have unintentionally derailed it a little. My original intention was to say to Oliver, please, don't be

Re: Using TMPFS for /tmp and /var/run?

2012-03-30 Thread deeptech71
C. P. Ghost wrote: Not clearing /tmp on reboot has been the norm for way too long and it is too late to change now. We either evolve or be in a stalemate forever. It's not just POLA, it also involves deleting data of unaware users, and that should be avoided. Mounting on a directory (/tmp)

Re: Using TMPFS for /tmp and /var/run?

2012-03-30 Thread Adrian Chadd
On 30 March 2012 17:57, deeptec...@gmail.com wrote: C. P. Ghost wrote: Not clearing /tmp on reboot has been the norm for way too long and it is too late to change now. We either evolve or be in a stalemate forever. No, you do it in a sensible, controlled fashion. You make it really easy

Re: Using TMPFS for /tmp and /var/run?

2012-03-30 Thread Benjamin Kaduk
On Fri, 30 Mar 2012, Adrian Chadd wrote: On 30 March 2012 17:57, deeptec...@gmail.com wrote: C. P. Ghost wrote: Not clearing /tmp on reboot has been the norm for way too long and it is too late to change now. We either evolve or be in a stalemate forever. No, you do it in a sensible,

Re: Using TMPFS for /tmp and /var/run?

2012-03-30 Thread jb
deeptech71 at gmail.com writes: ... One of those reasons people stick/stuck with BSD is that we don't go and change this stuff so quickly. Yes, it would be a total of ~20 years before we finally decided to switch to using TMPFS for /tmp. ... According to TMPFS(5) BUGS The

Re: Using TMPFS for /tmp and /var/run?

2012-03-29 Thread David Wolfskill
On Thu, Mar 29, 2012 at 04:18:06PM +0200, O. Hartmann wrote: I was wondering if there are some objections using TMPFS for /tmp and /var/run. ... My question is whether there are objections using TMPFS for bot /tmp/ and /var/run/ at this stage on FreeBSD 10.0-CURRENT/amd64? I have no

Re: Using TMPFS for /tmp and /var/run?

2012-03-29 Thread Chris Rees
On 29 Mar 2012 16:49, O. Hartmann ohart...@mail.zedat.fu-berlin.de wrote: I was wondering if there are some objections using TMPFS for /tmp and /var/run. I figured out some problems with some rc.d scripts when using TMPFS for /var/run, samba and OpenLDAP do store some informations like PID in

Re: Using TMPFS for /tmp and /var/run?

2012-03-29 Thread Vitaly Magerya
Chris Rees utis...@gmail.com wrote: Any rc script that complains about an empty /var/run is buggy- it should be assumed that it will be emptied on boot. Then why are there entries for /var/run/{named,ppp,wpa_supplicant} in /etc/mtree/BSD.var.dist? Should they be removed?

Re: Using TMPFS for /tmp and /var/run?

2012-03-29 Thread O. Hartmann
Am 03/29/12 18:14, schrieb David Wolfskill: On Thu, Mar 29, 2012 at 04:18:06PM +0200, O. Hartmann wrote: I was wondering if there are some objections using TMPFS for /tmp and /var/run. ... My question is whether there are objections using TMPFS for bot /tmp/ and /var/run/ at this stage on

Re: Using TMPFS for /tmp and /var/run?

2012-03-29 Thread Eric van Gyzen
On 03/29/12 09:18, O. Hartmann wrote: I was wondering if there are some objections using TMPFS for /tmp and /var/run. For /tmp, what exactly do you mean? If you want to use tmpfs instead of md/mdmfs when tmpmfs=YES in rc.conf, I have no opinion. However, if you always want to use tmpfs

Re: Using TMPFS for /tmp and /var/run?

2012-03-29 Thread David Wolfskill
On Thu, Mar 29, 2012 at 02:50:00PM -0500, Eric van Gyzen wrote: ... However, if you always want to use tmpfs instead of stable storage, please do not. Some people expect /tmp to be persistent. This is why /etc/defaults/rc.conf has clear_tmp_enable=NO. Changing this would break the POLA.

Re: Using TMPFS for /tmp and /var/run?

2012-03-29 Thread O. Hartmann
Am 03/29/12 21:50, schrieb Eric van Gyzen: On 03/29/12 09:18, O. Hartmann wrote: I was wondering if there are some objections using TMPFS for /tmp and /var/run. For /tmp, what exactly do you mean? If you want to use tmpfs instead of md/mdmfs when tmpmfs=YES in rc.conf, I have no opinion.

Re: Using TMPFS for /tmp and /var/run?

2012-03-29 Thread David Wolfskill
On Thu, Mar 29, 2012 at 10:07:01PM +0200, O. Hartmann wrote: ... Aren't MDMFS backed filesystems of static size? And haven't they to be created first before they can be used? Using TMPFS seems toi be a more convenient way to me - dynamical (?), using a fstab entry for convenience. One may

Re: Using TMPFS for /tmp and /var/run?

2012-03-29 Thread Xin Li
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 03/29/12 09:59, Vitaly Magerya wrote: Chris Rees utis...@gmail.com wrote: Any rc script that complains about an empty /var/run is buggy- it should be assumed that it will be emptied on boot. Then why are there entries for

Re: Using TMPFS for /tmp and /var/run?

2012-03-29 Thread Xin Li
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 03/29/12 09:41, Chris Rees wrote: On 29 Mar 2012 16:49, O. Hartmann ohart...@mail.zedat.fu-berlin.de wrote: I was wondering if there are some objections using TMPFS for /tmp and /var/run. I figured out some problems with some rc.d scripts

Re: Using TMPFS for /tmp and /var/run?

2012-03-29 Thread Eric van Gyzen
On 03/29/2012 14:58, David Wolfskill wrote: On Thu, Mar 29, 2012 at 02:50:00PM -0500, Eric van Gyzen wrote: ... However, if you always want to use tmpfs instead of stable storage, please do not. Some people expect /tmp to be persistent. This is why /etc/defaults/rc.conf has