Seperate /tmp and swap

Seperate /tmp and swap

Post by Mike Frampto » Wed, 30 Apr 1997 04:00:00



Hello,

I have a problem on one of our servers where user keep filling up the
tmpfs partition /tmp. In doing so swap inevitably runs out. I am
therefore thinking to make these two as different partitions: swap to be
mounted under /swap and /tmp as an ordinary ufs filesystem for temporary
files.

Is this a viable solution? Does anybody see any problems with this?

Thanks in advance for any pointers,

Koon

 
 
 

Seperate /tmp and swap

Post by Super-Us » Thu, 01 May 1997 04:00:00


Having /tmp on a disk partition works well and you gain the option
of setting user quotas on /tmp.  An alternative is to limit the
size of tmpfs in /etc/vfstab:

swap    -       /tmp    tmpfs   -       yes     size=200m

The above line limits /tmp usage of tmpfs to 200MB.

: Hello,

: I have a problem on one of our servers where user keep filling up the
: tmpfs partition /tmp. In doing so swap inevitably runs out. I am
: therefore thinking to make these two as different partitions: swap to be
: mounted under /swap and /tmp as an ordinary ufs filesystem for temporary
: files.
--

  ,;( )__, )~\|  |
 ;; //   '--;    | Gin-N-Tonic   endurance horse
 '  ;\    |      | Luv on Fire   trusty trail horse

 
 
 

Seperate /tmp and swap

Post by Jay Lesse » Thu, 01 May 1997 04:00:00




Quote:>Hello,

>I have a problem on one of our servers where user keep filling up the
>tmpfs partition /tmp. In doing so swap inevitably runs out. I am
>therefore thinking to make these two as different partitions: swap to be
>mounted under /swap and /tmp as an ordinary ufs filesystem for temporary
>files.

>Is this a viable solution? Does anybody see any problems with this?

Yes it is.  No, I don't.

This is how god intended /tmp to be and there is no problem with
doing it this way.  I've got some of those users, too.  :-)

Make sure you 'chmod 1777' the directory for security.
--

Lattice Semiconductor Corp.                    (voice)1.503.681.0118
Hillsboro, OR, USA                               (fax)1.503.693.0540

 
 
 

Seperate /tmp and swap

Post by Rob McMaho » Fri, 02 May 1997 04:00:00



> I have a problem on one of our servers where user keep filling up the tmpfs
> partition /tmp. In doing so swap inevitably runs out. I am therefore
> thinking to make these two as different partitions: swap to be mounted under
> /swap and /tmp as an ordinary ufs filesystem for temporary files.

Look at using the `size=42k' option to mount (`man mount_tmpfs').  That way
you get the best of both worlds.

Rob
--
UUCP:   ...!mcsun!uknet!warwick!cudcv   PHONE:  +44 1203 523037

Rob McMahon, Computing Services, Warwick University, Coventry CV4 7AL, England

 
 
 

Seperate /tmp and swap

Post by Casper H.S. Dik - Network Security Engine » Fri, 02 May 1997 04:00:00



>I have a problem on one of our servers where user keep filling up the
>tmpfs partition /tmp. In doing so swap inevitably runs out. I am
>therefore thinking to make these two as different partitions: swap to be
>mounted under /swap and /tmp as an ordinary ufs filesystem for temporary
>files.
>Is this a viable solution? Does anybody see any problems with this?

You can do that, but consider that having /tmp as tmpfs (swap based)
filesystem has the following pros/cons:

PRO: faster
PRO: swap & tmp will both run out *later*, rather than one running out
     and the other still having space.
CON: a runaway file writing process will kill the system

The "CON" can be fixed by limiting tmpfs to a certain size with the
"size=" mount option.

And remember, a overflowing /tmp is no fun in any case.

Casper
--
Expressed in this posting are my opinions.  They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.

 
 
 

1. /tmp vs /usr/tmp vs /var/tmp



:Please help me understand temp directories.  I know what /tmp is for,
:and I know that /var/tmp is like /tmp only it is not normally cleared
:at boot-time.  But then what is /usr/tmp for?  or aren't /usr/tmp and
:/var/tmp usually used in the same implementation?

/usr/tmp and /var aren't normally in the same implementation.  

--

 InterNIC WHOIS: MJO | (has my PGP & Geek Code info) | Phone: +1 248-848-4481

2. 2.4.21-pre5 oops in mod_timer

3. Swap space on a seperate hard disk

4. Setting up "dual identity" for a laptop??

5. 2 swap partitions on 2 seperate HD's

6. BootX video mode options.

7. seperate login schemes for seperate users

8. HELP! My CDE can't start anymore

9. /tmp and swap relationship

10. to put /tmp in swap space

11. WARNING: /tmp: File system full, swap space limit exceeded

12. Consolidating swap, mfs, .../tmp

13. increasing number of i-nodes in /tmp on swap