swap -s and swap -l: disk reserved and RAM reserved

swap -s and swap -l: disk reserved and RAM reserved

Post by Michael Wa » Tue, 08 Feb 2000 04:00:00


[pizza:/opt/home/mwang]swap -l
swapfile             dev  swaplo blocks   free
/dev/dsk/c0d0s1     102,1       8 208832 125720
( => 83112 Blocks = 41556 KB allocated )

[pizza:/opt/home/mwang]swap -s
total: 53124k bytes allocated + 11148k reserved = 64272k used, 76316k available
                            (but non allocated)    (reserved)

"Sun Performance and Tunning" said (page 340):

    Reservation are made against disk-based swap to start with.
    When that is all gone, RAM is reserved instead.

So how can that be:

   53124k (allocated on disk and RAM as reported from swap -s)
 > 41556k (allocated on disk as reported from swap -l)? i.e.
   Why RAM is allocated while there is swap space? What is wrong?
   swap -l or the book or me? Thanks.

Michael Wang


1. negative swap space reserved

I'm getting something I've never seen before, and can't explain.
Has anyone seen this before?

System:  Ultra 2, 2x200MHz processors, 512M memory Solaris 2.5.1

swap -s says:
total: 1148080k bytes allocated + -820000k reserved = 328080k used, 2372384k available
The Allocated number is rising as time passes, the Reserved number
is decreasing, and the Used number stays in the expected range.

Everything else appears normal.  Though a negative memory reserved
is definitely not.

Any ideas? (barring reason not to I'm going to let it run till our
next downtime window at which time I was planning to reboot anyway
to add another 256Megs memory. Hopefully that'll make it return to


2. mounting remote disks

3. Apache reserving huge amounts of swap on Solaris

4. rtin and problems.

5. swap space reserved

6. Auto install: newfs options?

7. Matrox Mystique ands X.

8. from static ip to dynamic ip; how to change ppp config?

9. two swap disks versus one swap disk

10. repost: sparc32: reserve nocache acc. to the amount of system RAM

11. Reserving large amounts of RAM for busmastering PCI card.

12. Fwd: [sparc32] reserve nocache based on RAM size

13. reserve nocache based on RAM size