Swap <-> /tmp

Swap <-> /tmp

Post by Scott D. MacK » Wed, 01 Nov 1995 04:00:00



The /tmp mountpoint is a filesystem built on free swapspace from the operating
system.  The amount of "kbytes" represents the amount of free swapspace, thus
as swap is used and freed from the system, this column will change for the /tmp
filesystem.  When you create files in /tmp, you allocate out of the free swap
area.  Thus, if you use up all of /tmp with files, your machine will have
no swap space left.  All swapfiles, raw partitions allocated for swap, etc
boil into 1 number for both the total virtual space available, and thus for the
amount of space usable by /tmp.  If you keep on running out of swap, you
may want to see if anything is generating large files to /tmp.

Scott

-----------------------------------------------------------------------------
    Real Time Enterprises                               | Scott MacKay

    Pittsford,NY 14534                                  | Real Time Enterprises
- Electronic Document Imaging - System Integration -    | (716) 383-1290
        - Software Development-                         | Postmaster
-----------------------------------------------------------------------------


> Hello,

> in a standard installation for Solaris 2.4, it suggests for
> a 16M system a 32 swap space. This one is located on /dev/dsk/c0t3d0s1
> as is the default.

> Sometimes he runs out of swap and occasionally even REBOOTING.
> What I've done is to allocate extra swap via the following commands:
> mkfile 20m /extraswap
> swap -a /extraswap

> Ok this works. But I was wondering wether the system will fill the
> default swap. Because this means that the /tmp which is mounted
> at boottime will fill up also.

> I was wondering about an option to say which swap comes first. Maybe
> by changing the order in  vfstab.

> Also I find it very strange that the system runs out of memory
> with only openwindows running.

> Last but not least:
> when you perform a df -k and you look at the /tmp
> it changes . Is there a correlation between the space free on the tmp
> and the swap it takes?

> Thanks for the reply

> Patrick.

 
 
 

Swap <-> /tmp

Post by Michael Rons » Thu, 02 Nov 1995 04:00:00



: Last but not least:
: when you perform a df -k and you look at the /tmp
: it changes . Is there a correlation between the space free on the tmp
: and the swap it takes?

The tmp directory uses a special file system: tmpfs. Tmpfs is a virtual
file system: is uses swap space instead of disk space to save files. This
has as a consequence that FREE_SWAP_SPACE+AMOUNT_OF_KB_USED_IN_TMP = constant.


|   Parallel Information Systems Group                                     |
|   Electronics and Information Systems Department                         |
|   University of Ghent, Belgium                                           |
|                                                                          |
|   Visiting scholar at the Computer Science Department of                 |

+------URL: http://www.elis.rug.ac.be/ELISgroups/paris/staff/mr.html-------+

 
 
 

Swap <-> /tmp

Post by Greg Bonn » Tue, 07 Nov 1995 04:00:00



: : Last but not least:
: : when you perform a df -k and you look at the /tmp
: : it changes . Is there a correlation between the space free on the tmp
: : and the swap it takes?

: The tmp directory uses a special file system: tmpfs. Tmpfs is a virtual
: file system: is uses swap space instead of disk space to save files. This
: has as a consequence that FREE_SWAP_SPACE+AMOUNT_OF_KB_USED_IN_TMP = constant.

That would seem to imply that you would need to have a lot more swap space
than in SunOS 4.  How much swap space should you have?

 
 
 

Swap <-> /tmp

Post by Dan Strombe » Tue, 07 Nov 1995 04:00:00






>: : Last but not least:
>: : when you perform a df -k and you look at the /tmp
>: : it changes . Is there a correlation between the space free on the tmp
>: : and the swap it takes?

>: The tmp directory uses a special file system: tmpfs. Tmpfs is a virtual
>: file system: is uses swap space instead of disk space to save files. This
>: has as a consequence that FREE_SWAP_SPACE+AMOUNT_OF_KB_USED_IN_TMP = constant.

>That would seem to imply that you would need to have a lot more swap space
>than in SunOS 4.  How much swap space should you have?

Note that SunOS 4.1.x had the option of using tmpfs.  Many of our
remaining SunOS 4.1.x machines do.  Also note that you aren't
-required- to make /tmp a tmpfs in SunOS 5.x, it's just done that way
by default.  I believe all of our SunOS 5.x machines have /tmp set up
as a tmpfs.

Also, in SunOS 5.x, "virtual memory = phys ram + swap space", not
"virtual memory = swap space", as things were in SunOS 4.1.x.

So it depends on the (major) release of the OS, how much stuff your
users tuck in /tmp, and how much physical memory you have.

 
 
 

Swap <-> /tmp

Post by Richard P. Baint » Tue, 07 Nov 1995 04:00:00




>: The tmp directory uses a special file system: tmpfs. Tmpfs is a virtual
>: file system: is uses swap space instead of disk space to save files. This
>: has as a consequence that FREE_SWAP_SPACE+AMOUNT_OF_KB_USED_IN_TMP = constant.
>That would seem to imply that you would need to have a lot more swap space
>than in SunOS 4.  How much swap space should you have?

Well personally, I use 2 times the amount of memory making sure that
each partition is the same size as, or larger than, the physical memory.
However I do *not* use tmpfs on my systems but have a seperate partition
between 100M and 350M depending on the system's needs. (Which may be
overkill for some systems that don't see much activity.)

Ciao,

--
Richard Bainter          Mundanely     |    System Analyst        - OMG/CSD
Pug                      Generally     |    Applied Research Labs - U.Texas

Note: The views may not reflect my employers, or even my own for that matter.

 
 
 

1. <><><> MOUNTING EXTENDED PARTITION <><><>

I have a 10 GB UDMA IDE drive formatted with Windows.  The first partition
is FAT32, and the second is NTFS.  I can successfully mount the first, but
not the second.  Any ideas?

Suse 7.2 on i86
the drive is mounted on /dev/hdc, and I CAN see hda1, but not hda2

2. Cute little Penguin Logo...

3. Wanted: <><><> Unix Specialist <><><>

4. Cut and Paste in OPENWIN on Linux?

5. LILO help <><><><><><>

6. LINUX - Pathetic Toy

7. <Alt>+<key> = <Esc><key> ?

8. Version of a Binary

9. *{<><>}*Linux*Screen*Difficulties*{<><>}*

10. << <<anyone using dyn-html?>> >>

11. (<><>)*Linux*Screen*Difficulties*(<><>)

12. Samba problem: WinXP <-> ADSL <-> Internet <-> Cable <-> Linux

13. SunSparc <--> modem <--> 486DLC <--> RS232/SLIP <--> 386sx