Why is /var/tmp not mounted on swap like /tmp?
/var/tmp seems to accumulate old files and could also be used to fill
/.
..
|
|
0
|
|
|
|
Reply
|
greek_philosophizer (42)
|
8/29/2006 1:49:52 PM |
|
On 29 Aug 2006 06:49:52 -0700
"greek_philosophizer@hotmail.com" <greek_philosophizer@hotmail.com>
wrote:
> Why is /var/tmp not mounted on swap like /tmp?
Because it would then also encroach on, and be limited to, the size of
virtual memory. Now it can be used to hold temporary files of arbitrary
size (at least if /var is adequately dimensioned).
> /var/tmp seems to accumulate old files
So does /tmp if you don't reboot often. If it bothers you, write a
script to clean /var/tmp.
> and could also be used to fill /.
/var should be on a separate slice.
Take care,
--
Stefaan A Eeckels
--
A journalist is someone whose business it is to explain to others
what he personally does not understand -- Alfred Northcliff
|
|
0
|
|
|
|
Reply
|
Stefaan
|
8/29/2006 1:58:55 PM
|
|
>> On 29 Aug 2006 06:49:52 -0700,
>> "greek_philosophizer@hotmail.com" <greek_philosophizer@hotmail.com> said:
> Why is /var/tmp not mounted on swap like /tmp? /var/tmp
> seems to accumulate old files and could also be used to
> fill /.
/tmp is usually meant to be volatile, i.e. files can
disappear across reboots.
/var/tmp is for things that should be preserved across
reboots, e.g. vi session recovery files.
hth
t
|
|
0
|
|
|
|
Reply
|
Tony
|
8/29/2006 1:59:08 PM
|
|
"Stefaan A Eeckels" <hoendech@ecc.lu> wrote:
> > /var/tmp seems to accumulate old files
>
> So does /tmp if you don't reboot often. If it bothers you, write a
> script to clean /var/tmp.
That requires some care, or your script will delete files which
are essential for various applications and processes.
Thomas
|
|
0
|
|
|
|
Reply
|
Thomas
|
8/29/2006 4:58:18 PM
|
|
On Tue, 29 Aug 2006 18:58:18 +0200
"Thomas Dehn" <thomas-usenet@arcor.de> wrote:
>
> "Stefaan A Eeckels" <hoendech@ecc.lu> wrote:
> > > /var/tmp seems to accumulate old files
> >
> > So does /tmp if you don't reboot often. If it bothers you, write a
> > script to clean /var/tmp.
>
> That requires some care, or your script will delete files which
> are essential for various applications and processes.
I know ;-)
--
Stefaan A Eeckels
--
The one thing IT really needs to outsource is the freakin' clueless
managers that don't understand that there are more possibilities than
chaos on the one hand and the reduction of alternatives to zero on the
other. -- Richard Hamilton in comp.sys.sun.hardware
|
|
0
|
|
|
|
Reply
|
Stefaan
|
8/29/2006 6:49:12 PM
|
|
In article <1156859392.730382.215450@h48g2000cwc.googlegroups.com>,
"greek_philosophizer@hotmail.com" <greek_philosophizer@hotmail.com>
wrote:
> Why is /var/tmp not mounted on swap like /tmp?
>
> /var/tmp seems to accumulate old files and could also be used to fill
> /.
>
> .
<nit>
/tmp is NOT mounted on swap - it's tmpfs, which is backed by swap. df -k
lies when it says "swap" for /tmp.
</nit>
I feel better now :).
--
Ken
Remove pants before e-mailing!
krgray@pantsverizon.net
|
|
0
|
|
|
|
Reply
|
Ken
|
8/29/2006 8:27:19 PM
|
|
Ken Gray <see-sig@nowhere.invalid> wrote:
> /tmp is NOT mounted on swap - it's tmpfs, which is backed by swap. df -k
> lies when it says "swap" for /tmp.
If tmpfs uses swap for the storage, why is df incorrect to show "swap"
as the device?
I don't see the error. It's true that not *all* of swap is available to
tmpfs, but I don't think that's what you're referring to.
--
Darren Dunham ddunham@taos.com
Senior Technical Consultant TAOS http://www.taos.com/
Got some Dr Pepper? San Francisco, CA bay area
< This line left intentionally blank to confuse you. >
|
|
0
|
|
|
|
Reply
|
Darren
|
8/29/2006 10:13:25 PM
|
|
In article <9_2Jg.1632$Cq4.510@newssvr25.news.prodigy.net>,
Darren Dunham <ddunham@redwood.taos.com> wrote:
> Ken Gray <see-sig@nowhere.invalid> wrote:
> > /tmp is NOT mounted on swap - it's tmpfs, which is backed by swap. df -k
> > lies when it says "swap" for /tmp.
>
> If tmpfs uses swap for the storage, why is df incorrect to show "swap"
> as the device?
>
> I don't see the error. It's true that not *all* of swap is available to
> tmpfs, but I don't think that's what you're referring to.
I was over-simplifying, but the reason why I say that df lies about swap
is that you'll see the numbers change based on the allocations made by
tmpfs - so what it's showing you is how much of the swap reserve tmpfs
is using, not the amount of swap available.
It's not really an error, just an annoyance to me. I seem to have many
things these days that annoy me :).
--
Ken
Remove pants before e-mailing!
krgray@pantsverizon.net
|
|
0
|
|
|
|
Reply
|
Ken
|
8/29/2006 11:02:26 PM
|
|
Ken Gray <see-sig@nowhere.invalid> writes:
>In article <9_2Jg.1632$Cq4.510@newssvr25.news.prodigy.net>,
> Darren Dunham <ddunham@redwood.taos.com> wrote:
>> Ken Gray <see-sig@nowhere.invalid> wrote:
>> > /tmp is NOT mounted on swap - it's tmpfs, which is backed by swap. df -k
>> > lies when it says "swap" for /tmp.
>>
>> If tmpfs uses swap for the storage, why is df incorrect to show "swap"
>> as the device?
>>
>> I don't see the error. It's true that not *all* of swap is available to
>> tmpfs, but I don't think that's what you're referring to.
>I was over-simplifying, but the reason why I say that df lies about swap
>is that you'll see the numbers change based on the allocations made by
>tmpfs - so what it's showing you is how much of the swap reserve tmpfs
>is using, not the amount of swap available.
Just as aside back onto the thread topic, one thing that is kind of
anoying about tempfs is that it doesn't allocated very many inodes.
Since /tmp isn't that much space, but /var/tmp is usually much more on
many systems such that I tend to use it for large temp operations, I
can see many people going nuts trying to figure out why /var/tmp is
broken with plenty of space left because it ran out of inodes.
Last time I checked, this wasn't a tunable either.
Another problem in some rare environments is that quotas don't work on
tempfs.. You may not need to quota /tmp, but some people do. :)
|
|
0
|
|
|
|
Reply
|
Doug
|
8/29/2006 11:48:47 PM
|
|
In article <44f4d25f$0$28274$892e0abb@auth.newsreader.octanews.com>,
Doug McIntyre <merlyn@geeks.org> wrote:
>
> Just as aside back onto the thread topic, one thing that is kind of
> anoying about tempfs is that it doesn't allocated very many inodes.
>
> Since /tmp isn't that much space, but /var/tmp is usually much more on
> many systems such that I tend to use it for large temp operations, I
> can see many people going nuts trying to figure out why /var/tmp is
> broken with plenty of space left because it ran out of inodes.
> Last time I checked, this wasn't a tunable either.
>
Ah, another annoying thing :). I wish it would say "no inodes" instead
of "no space"...
The only way to "tune" it [/var/tmp, assuming UFS] is to change the
number of bytes per inode when creating the filesystem (newfs -i ###).
It'd be nice to do it on the fly, but it would be a nightmare to
implement and keep the fs sane.
> Another problem in some rare environments is that quotas don't work on
> tempfs.. You may not need to quota /tmp, but some people do. :)
Well, quotas only work on UFS (I'm not including ZFS, QFS, etc., because
I tend to doubt that anyone would put /tmp on one of those and I'm
sticking with "stock" Solaris), so if /tmp is tmpfs, you're out of luck
on that score. You could make /tmp UFS, but that has issues of its own.
Or you could limit the size of /tmp with the size= option when mounted.
Only problem with that is Oracle tends to get cranky if you make it too
small.
--
Ken
Remove pants before e-mailing!
krgray@pantsverizon.net
|
|
0
|
|
|
|
Reply
|
Ken
|
8/30/2006 12:58:35 AM
|
|
Ken Gray wrote:
> In article <1156859392.730382.215450@h48g2000cwc.googlegroups.com>,
> "greek_philosophizer@hotmail.com" <greek_philosophizer@hotmail.com>
> wrote:
>
> > Why is /var/tmp not mounted on swap like /tmp?
> >
> > /var/tmp seems to accumulate old files and could also be used to fill
> > /.
> >
> > .
>
>
> <nit>
> /tmp is NOT mounted on swap - it's tmpfs, which is backed by swap. df -k
> lies when it says "swap" for /tmp.
> </nit>
>
tmpfs will use up memory first, then swap.
Victor
|
|
0
|
|
|
|
Reply
|
victorfeng1973
|
8/30/2006 3:10:38 AM
|
|
victorfeng1973@yahoo.com wrote:
>> <nit>
>> /tmp is NOT mounted on swap - it's tmpfs, which is backed by swap. df -k
>> lies when it says "swap" for /tmp.
>> </nit>
>>
> tmpfs will use up memory first, then swap.
That's only true if you think of 'swap' as being the stuff on disk.
Most utilities (and tmpfs) consider 'swap' the unified view of all pages
in RAM and swapfiles. So you might say that the VM system will tend to
allocate pages in RAM first, then on disk, but I would not refer to
either of those singly as "swap".
--
Darren Dunham ddunham@taos.com
Senior Technical Consultant TAOS http://www.taos.com/
Got some Dr Pepper? San Francisco, CA bay area
< This line left intentionally blank to confuse you. >
|
|
0
|
|
|
|
Reply
|
Darren
|
8/31/2006 6:17:57 PM
|
|
|
11 Replies
407 Views
(page loaded in 0.103 seconds)
Similiar Articles: swap information under Linux - comp.unix.programmer... the server remotely > using Eterm on one of my Linux boxes. ... As the terminfo was stored under Eterm, I entered TERM ... Why is /var/tmp not mounted on swap? 11 207 ... will /var/tmp be cleaned after system reboot ? - comp.unix.solaris ...... 10656192 1% /var/run swap ... Why not unmount the /var/tmp partition, leaving ... var/sadm/install to /tmp (memory based file system), lofs mount it ... Cleaning Up /var ... Recommended disk layout for Solaris 10 - comp.unix.solaris .../tmp is usually mounted on swap but, other > than that, your layout looks reasonable to me. ... space are /var/sadm (installation and patch management) and /var/tmp ... Mirroring and Swap partition - comp.unix.solaris... In the first case, /tmp is mounted on swap. In the ... md/dsk/d3 /dev/md/rdsk/d3 /var ... mentioned (although I'm not exactly sure what > you mean by "swap gets mounted"). No space left on device - comp.unix.solaris... size used avail capacity Mounted on /dev ... 87M 84M 0K 100% /var swap ... var/tmp > # ln -s /export/home/tmp /var/tmp Ouch ouch ouch. Please do not ... format command not work - comp.unix.solaris... dsk/c0t0d0s3 29G 3.2G 25G 12% /var swap 42M 40K 42M 1% /tmp swap ... show present, working disks that don't have mounted ... /tmp (swap) getting filled up often - comp.unix.solarisproblem: link file under /dev/dsk/ - comp.unix.solaris will /var/tmp be cleaned ... 04:06 PM) We have set the swap as with a space of 3.3G and /tmp is mounted on swap. /tmp is ... Troublesome Unmirror of Swap metadevice - comp.unix.solaris ...... FS fsck mount mount #to mount to fsck ... dev/dsk/c0t0d0s4 /dev/rdsk/c0t0d0s4 /var ufs ... c0t0d0s6 /usr/local ufs 2 yes - swap - /tmp ... /usr/sbin/quota causes login delay - comp.unix.solaris... FS fsck mount mount ... ufs 2 yes - swap - /tmp ... 1108579340 swap /var/run tmpfs xattr,dev=1 1108579340 swap /tmp ... lucreate fails: All required PBE file systems are not mounted ...ERROR: The following required file systems are not mounted by the currently running ... etc/mnttab > /dev/md/dsk/d33 2053605 1305141 686856 66% /var > swap ... Installing some patches takes enormously long amount of time ...... tmp back to /var/sadm/install: pax -rw -pe /var/sadm/install /tmp mount -F lofs /tmp/install /var ... free swap memory on HP-UX 11* - comp.sys.hp.hpux Installing some patches ... how to remove a stale mount point - comp.unix.solaris... question is, how to do I remove this stale mount ... blocks 0 files /var/run (swap ): 487424 blocks 45263 files /tmp (swap ... Solaris 10 not mounting NFS via /etc/vfstab on reboot - comp.unix ...... yes rw On reboot this mount point does not ... share -F nfs -o ro /var/tmp ... 10 not ... Solaris Operating System: swap size keeps dropping on Solaris 10 ... swap not ... Solaris 9 x86 - physical to virtual - VMWare - comp.unix.solaris ...... size used avail capacity Mounted on /dev/dsk ... 6G 76K 2,6G 1% /var/run swap 2,6G 2,8M 2,6G 1% /tmp /dev/dsk/c1t0d0s6 ... insufficient physical memory while oracle installation - comp.unix ...... Used Available Capacity Mounted on /dev ... 9321429 11205215 46% / var swap 1869928 128 1869800 1% / tmp swap ... What about /tmp & /var/tmp? Swap or RAM? - FedoraForum.orgWhat about /tmp & /var/tmp? Swap or RAM? F16 Development ... EDIT: I can't find those tmp.mount and var-tmp.mount files... all other systemd units ... swap questions - The UNIX and Linux Forumsdevice to mount = swap (as seen in 'df -k') device to fsck = - (raw name -no applicable device) mount point = /tmp (as seen ... As for why /var/run is not listed in vfstab ... 7/21/2012 5:14:09 PM
|