From: Marcelino Mata <>
Date: Fri Apr 30 2004 - 10:47:38 EDT
Many thanks to :

Darren Dunham
Brent McDaniel
Doug Bell

Each supplied helpful information.  Brent recommended the excellent tool
RMCmem package which quickly identifed the amount of reserved swap vs used
swap.  I would assume that another tool called memtool from SE toolkit would
identify the software which reserved the swap but I did not try it out.

Here the responses I received...

Get the RMCmem package from Sun. The latest version I have is 3.9.4. I don't
remember exactly where, but you can do a search for it on sunsolve and find
it and download it. Once installed, run the command "prtmem" This will break
the memory down for you and is a very useful tool. There are commands in the
package that will help you also.

The problem with tools like top, vmstat and prstat and a bunch that cost a
lot of money is they report just about all memory always used. This is
because the way Sun uses it's file cache. When you open a file, it is kept
in file cache for faster retrieval later. This file cache is actually free
memory that can be allocated at any given time. But some tools see it as
"used" memory. So they report the memory incorrectly.


Generally what happens is that less-commonly used system / user libraries
put into swap in case a burst of memory is needed.

The best tool to use is going to be 'memtool' from the SE toolkit (available

at  This will give you a complete list of what binaries 
and libraries are in menory, and how many are resident / shared.

Douglas Bell

Most memory is "allocated".  The program is loaded into allocated
memory.  It does a malloc for allocated memory.  This memory is in RAM
and might be paged to disk later.

Some programs (usually oracle) instead "reserve" memory.  It says "I
don't need it right now, but later I need to get at least 200MB or
things will be bad.  Please reserve it for me".  The OS marks it
"reserved" so it cannot be allocated to another program.  However, since
it's not immediately used, it is not reserved in RAM, but only on disk.
If it later gets used, it will move to RAM.

Darren Dunham                                    

>-----Original Message-----
>From: Marcelino Mata 
>Sent: Wednesday, April 21, 2004 3:57 PM
>To: 'Sun Managers'
>Subject: RAM usage
>This might be a very basic question but... 
>Can someone tell me why various tools under Solaris show 2.3Gb 
>SWAP used and 3.3Gb RAM used when it has 5GB RAM?   I know it 
>is not a tmpfs issue since /tmp only has 2Mb of files.  
>I get those numbers from xosview, top, swap -s and SUN's CDE 
>tool, /usr/dt/bin/sdtwsinfo.  
>Running vmstat 5 I noticed that scanrate "sr" is 0 so 
>everything is good...  Sure beats 200+ scanrate when the 
>system had 1.5GB RAM.  
>Searching SunManagers archive, I read this response to this 
>type of question :
>"swap is reserved when processes are placed in memory.  This 
>is just in case the entire process needs to be swapped out." 
>Does that mean that 2.3Gb is not actually in use?  swap -s 
>reports 286Mb reserved so what's the other 2GB?  
>Does anyone know the command line tool for better information 
>under Solaris 8?   
>I tried using,
>mdb -k
>> ::memstat
>but I think that option is only for Solaris 9. I tried using 
>::kmastat but the output was 3 pages long.
>As per our application vendor, /etc/systems is 
>forceload: sys/msgsys
>forceload: sys/pipe
>forceload: sys/semsys
>forceload: sys/shmsys
>set shmsys:shminfo_shmseg=32
>set shmsys:shminfo_shmmax=67108864
>set msgsys:msginfo_msgmax=32768
>set msgsys:msginfo_msgmnb=65536
>set msgsys:msginfo_msgseg=8192
>set rlim_fd_cur=256
>This is a Blade1000 used for running a CAD/CAM application.
>Thanks for any help,
sunmanagers mailing list
Received on Fri Apr 30 10:47:32 2004

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:32 EST