[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how to increase space for tmpfs /tmp ... OT question



On 20120325_010923, Stan Hoeppner wrote:
> On 3/24/2012 4:02 PM, Javier Vasquez wrote:
> > 2012/3/24 shirish शिरीष <shirishag75@gmail.com>:
> 
> >> # TMPFS_SIZE: maximum size for all tmpfs filesystems if no specific
> >> # size is provided.  If no value is provided here, the kernel default
> >> # will be used.
> >> TMPFS_SIZE=20%
> > 
> > See, this is as you wish.  This particular setting is the maximum for
> > ALL of the tmpfs space.  Kind of the default if nothing else is
> > specified.  You might not touch this if you don't want.  So I would
> > not be afraid of using 100% of RAM here.
> 
> That's probably not a smart idea:
> 
> http://www.kernel.org/doc/Documentation/filesystems/tmpfs.txt
> ...
> tmpfs has three mount options for sizing:
> 
> size:      The limit of allocated bytes for this tmpfs instance. The
>            default is half of your physical RAM without swap. If you
>            oversize your tmpfs instances the machine will deadlock
>            since the OOM handler will not be able to free that memory.
> ...
> 
> The OP would likely be far better off simply mounting /tmp on his root
> filesystem as was always done in the past.  Application developers
> writing to /tmp aren't expecting memory speed transfers of such files
> because of the traditional placement of /tmp.  And he'll have more than
> enough space, many times his RAM quantity.
> 
> FWIW, my Squeeze servers are all upgrades going back to Sarge, IIRC.
> Here's my /tmp setup:
> 
> $ df /tmp
> Filesystem    Type    Size  Used Avail Use% Mounted on
> /dev/sda2     ext2     33G  3.8G   28G  12% /
> 
> I'm sure some/many of you will gasp at that fact I still use EXT2.  If
> it ain't broke, don't "fix" it.  The /boot and root filesystems are on
> EXT2, with all data storage on XFS.  Never had problems with EXT2 in
> this setup, so it lives on, for now.
> 
> -- 
> Stan
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> Archive: [🔎] 4F6EB693.30009@hardwarefreak.com">http://lists.debian.org/[🔎] 4F6EB693.30009@hardwarefreak.com
> 

OK, Stan,

I'm convinced by your argument, but I'm not ready to switch to XFS and
ext2. My root partition is ext3 and contains plenty of space (~50GB)
for /tmp. Also, I have been being bothered by running out of space for
intermediate files during 'sort' of largish files. So, ... how do I
shut down tmpfs? On my plain vanilla wheezy tmpfs seems also to be
involved in something called rootfs which is in use. Do I have to
reboot to get rid of the tmpfs mount of /tmp?  On this machine, I have
a 60GB partition that I have been using with the -T option in sort to
make it work again, but I can't make that partition BE mounted as /tmp
until I have umount-ed the tmpfs mount at /tmp. At least that is what
I think my problem is.

TIA
-- 
Paul E Condon           
pecondon@mesanetworks.net


Reply to: