Swap space usage..??

Swap space usage..??

Post by Pat Ch » Sat, 15 Aug 1992 05:47:56



All questions are related to Sun Unix.

When I do "psat -T", I get the swap space size, say X.
When I do "/etc/dmesg", I find the swap space is only half of X.
The other half is for dump space.

Could anyone tell me why it's like that, and what's dump space.

Thanx..
--

Motorola Mobile Data Division     Voice: (604) 241-6032
11411 Number Five Road            Fax: (604) 241-6042
Richmond, BC Canada V7A 4Z3

 
 
 

Swap space usage..??

Post by Greg Lim » Thu, 20 Aug 1992 08:16:45


| When I do "pstat -T", I get the swap space size, say X.
| When I do "/etc/dmesg", I find the swap space is only half of X.
| The other half is for dump space.

        myhost% head -1 /etc/motd
        SunOS Release 4.1.3_BETA_1.0 (LIMES) #2: Wed Jul 8 20:21:01 PDT 1992
        myhost%

        myhost% pstat -T
        216/3628 files
        300/1946 inodes
         68/1034 processes
        31392/66632 swap        
        myhost%

        myhost% pstat -s
        25360k allocated + 5624k reserved = 30984k used, 35648k available
        myhost%

        myhost% dmesg | grep sd6b
        swap on sd6b fstype spec size 66640K
        dump on sd6b fstype spec size 66616K
        myhost%

Looks to me like everything agrees, I have ~65Meg of swap. pstat -T tells
me that I'm using 31M of 65M; so does pstat -s. "dmesg" also tells
me that my swap partition is 65M, and that my dump partition (for kernel
crash dumps, RTFM "savecore") is on the same partition as my swap.

I don't see where your "half of X" comes in. Perhaps if you actually
included details like the specific version of the kernel, and the
real outputs of the commands ... ?

 
 
 

Swap space usage..??

Post by Frank Pete » Thu, 20 Aug 1992 10:50:01




: | When I do "pstat -T", I get the swap space size, say X.
: | When I do "/etc/dmesg", I find the swap space is only half of X.
: | The other half is for dump space.
:
: Looks to me like everything agrees, I have ~65Meg of swap. pstat -T tells
: me that I'm using 31M of 65M; so does pstat -s. "dmesg" also tells
: me that my swap partition is 65M, and that my dump partition (for kernel
: crash dumps, RTFM "savecore") is on the same partition as my swap.
:
: I don't see where your "half of X" comes in. Perhaps if you actually
: included details like the specific version of the kernel, and the
: real outputs of the commands ... ?

I'll betcha the system is swapping to two equally sized partitions on
two disks.  The value returned by dmesg is the size of the first swap
partition since it comes before swapon has added additional
partitions.  The pstat, of course, reflects the total of all swap space
allocated via swapon.
--
Frank Peters  -  UNIX Systems Programmer  -  Mississippi State University

 
 
 

Swap space usage..??

Post by Peter E. Jon » Fri, 21 Aug 1992 13:33:19




>| When I do "pstat -T", I get the swap space size, say X.
>| When I do "/etc/dmesg", I find the swap space is only half of X.
>| The other half is for dump space.

 .... lots of other stuff ...

 Is this not just that disk sizes are in terms of blocks which are
 only 512 bytes, i.e. 1/2 a Kbyte?  You get the same thing happening
 when you buy a 660Mbyte disc - they mean M==million and not mega
 as is usually the case for RAM say.  Makes a little difference
 and also gives rise to just this type of query.

--
Peter Jones                             .-_!\   Phone: +61 9 380 3100
Electrical & Electronic Eng            /     \  Fax:   +61 9 380 1065
University of Western Australia --->>  P_.-._/

 
 
 

Swap space usage..??

Post by Robert Rivie » Fri, 21 Aug 1992 18:11:17



>    myhost% head -1 /etc/motd
>    SunOS Release 4.1.3_BETA_1.0 (LIMES) #2: Wed Jul 8 20:21:01 PDT 1992
>    myhost%

>    myhost% pstat -T
>    216/3628 files
>    300/1946 inodes
>     68/1034 processes
>    31392/66632 swap        
>    myhost%

>    myhost% pstat -s
>    25360k allocated + 5624k reserved = 30984k used, 35648k available
>    myhost%

>    myhost% dmesg | grep sd6b
>    swap on sd6b fstype spec size 66640K
>    dump on sd6b fstype spec size 66616K
>    myhost%

>Looks to me like everything agrees, I have ~65Meg of swap.

But it doesn't agree at my home ...
myhost% head -1 /etc/motd
SunOS Release 4.1.1 (GENERIC) #2: Thu Mar 28 11:26:50 MET 1991

myhost% pstat -T
208/1017 files
 82/553 inodes
 61/266 processes
27060/60972 swap

...~60 Mo of swap...

myhost% pstat -s
21312k allocated + 5588k reserved = 26900k used, 34072k available
...still 60 Mo...

myhost%dmesg|grep sd0b
swap on sd0b fstype spec size 40500K
dump on sd0b fstype spec size 40488K

...Damn' here we are !

myhost%df
Filesystem            kbytes    used   avail capacity  Mounted on
...
swap                   36828     952   35876     3%    /tmp
...

What is my swap size ? 60 Mo, 40Mo or 36 Mo ...

--
Robert Riviere

Inria/CERMICS                                   Fax: (33) 93.65.77.40
BP 93

 
 
 

Swap space usage..??

Post by Frank Pete » Sat, 22 Aug 1992 00:18:48



:
: myhost% pstat -T
 [ ... ]
: 27060/60972 swap
:
: ...~60 Mo of swap...
:
: myhost% pstat -s
: 21312k allocated + 5588k reserved = 26900k used, 34072k available
: ...still 60 Mo...

These reflect the total swap space available on your system.

: myhost%dmesg|grep sd0b
: swap on sd0b fstype spec size 40500K
: dump on sd0b fstype spec size 40488K

This is the size of your initial swap partition.  Look in your /etc/fstab
file for a line like:

        /dev/sd1b  swap   swap rw 0 0

(the sd1b might be a different drive and partition of course).  This
partition is added by the swapon command near the end of the boot
process.  It is presumbably about 20MB in size and combines with
your 40MB sd0b to make the total swap space reported by pstat.

: myhost%df
: Filesystem            kbytes    used   avail capacity  Mounted on
: ...
: swap                   36828     952   35876     3%    /tmp
: ...

I'll admit right off that I'm relatively ignorant of the formula used
to compute tmpfs space.  It seems to be total swap - allocated swap -
some reserve factor.  Allocated swap is the first number in a pstat -s
(21312k in your output above).  I have no idea how that extra reserve
factor is calculated.

As processes on your system use and free up swap the size of your
tmpfs filesystem changes.

: What is my swap size ? 60 Mo, 40Mo or 36 Mo ...

You have 60MB of swap, 40MB of which is in your initial sd0b swap
partition and 36MB of which is currently available to your tmpfs
mounted /tmp filesystem.

--
Frank Peters  -  UNIX Systems Programmer  -  Mississippi State University

 
 
 

Swap space usage..??

Post by Grenville Armita » Sat, 22 Aug 1992 09:38:26


        [...]

Quote:>myhost%df
>Filesystem            kbytes    used   avail capacity  Mounted on
>...
>swap                   36828     952   35876     3%    /tmp
>...
>What is my swap size ? 60 Mo, 40Mo or 36 Mo ...

I don't know how you got a device listed here as "swap", but if it's
mounted on /tmp then it ain't swap space.

Look for an entry listed as "swap" in /etc/fstab for another partition
being used as swap space. (mentioned by a previous poster).

gja

 
 
 

Swap space usage..??

Post by Peter Van E » Sat, 22 Aug 1992 12:08:52




>    [...]
>>myhost%df
>>Filesystem            kbytes    used   avail capacity  Mounted on
>>...
>>swap                   36828     952   35876     3%    /tmp
>>...
>>What is my swap size ? 60 Mo, 40Mo or 36 Mo ...
>I don't know how you got a device listed here as "swap", but if it's
>mounted on /tmp then it ain't swap space.
>Look for an entry listed as "swap" in /etc/fstab for another partition
>being used as swap space. (mentioned by a previous poster).
>gja

If this is a Sun and it is using something called tmpfs, then (as it was
explained to me just today) yes this is both /tmp and swap. Whatever
amount of space is not in use for swap is the amount of /tmp you have, and
the amount varies as swap is used up. This came up because when we ran this
way a product was having trouble getting a lockf() type lock in /tmp, moving
/tmp to being a sym link into /usr/tmp fixed the problem.

Peter Van Epp / Operations and Technical Support
Simon Fraser University, Burnaby, B.C. Canada

 
 
 

Swap space usage..??

Post by Barry Margol » Sun, 23 Aug 1992 05:11:18



>Funny. You can swap in a (almost) regular file !
>But doesn'it generate a lot of overhead ?

No, why should it?  It's just disk access.  When you mount a file as swap
space, it simply adds the blocks in the file to the list of disk blocks
that the paging routines can use.  To the paging routines, all disk blocks
are equivalent.  This uses basically the same mechanisms as are used to
mmap a file or page out of the text segment of an executable or shared
library.
--
Barry Margolin
System Manager, Thinking Machines Corp.


 
 
 

Swap space usage..??

Post by R A N G A » Sun, 23 Aug 1992 02:48:30


   hi netters,
               The problem is as follows :

       if a user is a member of more then one group ( i.e the userid is
       present in more then one line in /etc/group file ) and he wants to
       switch between one group to another group how does he do it ?
       The default groupid when he logs in is the one which is present in
       /etc/passwd file.
       I tried newgrp, but it doesnt work properly.  

       ANY SUGGESTIONS


       THANKS A BILLION

 
 
 

1. swap space usage behaviour 2.2/3

Did Sun change something in the usage of swap space between 2.2 and 2.3 ?
We have a program here, which has a bug in it. Its memory image grows and grows. In 2.2, it growed until swap space was completely exhausted, in 2.3
it grows to some 20100 pages = around 80 MB and then hangs, although the
swap space is around 180 MB :

swapfile             dev  swaplo blocks   free
/dev/dsk/c0t3d0s1   32,25      8 166312 137920
/usr/export/SWAP      -        8 204792 173008

I  didn't save the exact figures with the program hanging, but both swap
areas were used up to the same percentage alledgedly...

---
Eckhard R"uggeberg

2. ssh - no ssh

3. Finding swap space usage from C

4. How to upgrade Metacity?

5. Can I monitor process slot and swap space usage with ISC-2.2?

6. An Usb Floppy that don't want to work!!!

7. Swap space usage....

8. reverse engineering windows driver for linux

9. Getting LOAD averages and SWAP space usage from kernel

10. Swap space usage??

11. Swap space usage

12. swap space usage by samba 2.2.5

13. plenty of swap space, but keep receiving error "swap space limit exceeded"