How to understand the memory usage in Solaris ?

Posted on 2009-04-22
Last Modified: 2013-12-27
I am very much addicted to use the 'top' of linux, but here in Solaris it looks convoluted.
Here is some of inputs from my system which I could figure out.

Physical Memory: 1GB
Swap space: 2GB

Output of swap -l is in block, whereas 1 block is 512 bytes, so the output of swap -l and 'format' of slice 1 is almost same.
Now the output of swap -s is in KB(not block) and it includes the part of physical memory(1024 MB) also
Used is 342092KB(334 MB) and available is 2204904KB(2153MB)

I can see physical swap is NOT used at all {as output of swap -l} and so I am subtracting 2GB from available space {2204904KB(2153MB)}
So I get 342092KB(334 MB) + {2204904KB(2153MB) - 2GB} = 334 MB + 105 MB=439 MB {Physical RAM}

But I have 1024 MB physical RAM, where is 585 MB {1024 - 439} RAM ??

Please let me know if my calculation is wrong!
bash-3.00# echo "::memstat" | mdb -k

Page Summary                Pages                MB  %Tot

------------     ----------------  ----------------  ----

Kernel                     112014               437   43%

Anon                        68509               267   26%

Exec and libs                5143                20    2%

Page cache                   6948                27    3%

Free (cachelist)            19276                75    7%

Free (freelist)             47804               186   18%


Total                      259694              1014


bash-3.00# swap -l

swapfile             dev  swaplo blocks   free

/dev/dsk/c0d0s1     102,1       8 4194288 4194288


#output of slice 1 from the format command

  1 unassigned    wu    1375 -  1636        2.01GB    (262/0/0)     4209030


bash-3.00# swap -s

total: 266084k bytes allocated + 76008k reserved = 342092k used, 2204904k available


bash-3.00# vmstat 

 kthr      memory            page            disk          faults      cpu

 r b w   swap  free  re  mf pi po fr de sr cd m6 m9 s0   in   sy   cs us sy id

 0 0 0 2397060 476264 87435 36205 72 0 2 0 96 39 0 0 -0 2636 91864 15145 11 47 42


bash-3.00# prtconf -v  | grep Memory

Memory size: 1023 Megabytes

Open in new window

Question by:beer9
    LVL 40

    Expert Comment

    if not mistaken, this is taken by the files cache. When you access file for read or write then it is brought to memory cache then to the application (if reading) or to the disk (if writing) this makes the I/O faster and effective.
    LVL 22

    Accepted Solution

    The files cache is not removed from the list. What you are missing is the kernel itself. That descrepency is the memory allocated to the kernel.

    Author Closing Comment

    Thanks blu! :-)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
    I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now