Sponsored Content
Full Discussion: Interesting swap usage
Operating Systems Solaris Interesting swap usage Post 302811203 by gregsih on Thursday 23rd of May 2013 09:08:03 AM
Old 05-23-2013
Interesting swap usage

From the server showing the issue:
Code:
 
# swap -s
total: 10964072k bytes allocated + 185592k reserved = 11149664k used, 38735512k available
 
# swap -l
swapfile             dev  swaplo blocks   free
/dev/zvol/dsk/rpool/swap 256,1      16 16777200 16777200
 
# vmstat 2 2
 kthr      memory            page            disk          faults      cpu
 r b w   swap  free  re  mf pi po fr de sr s4 s5 s6 s7   in   sy   cs us sy id
 0 0 0 81782944 96140160 21 82 0 0 0  0  3 -0  1 -0  1 1588  664 1387  0  0 100
 0 0 0 38734832 53113984 1 11 0 0  0  0  0  0  0  0  0 1936 1629 2075  0  0 100
 
 # prstat -Z -n 1,10 1 1
   PID USERNAME  SIZE   RSS STATE  PRI NICE      TIME  CPU PROCESS/NLWP
  1822 oracle   6087M 6079M sleep   59    0   0:13:22 0.0% oracle/1
ZONEID    NPROC  SWAP   RSS MEMORY      TIME  CPU ZONE
     0      128   11G   11G   8.4%   0:34:03 0.0% global
 
 
 
 
Total: 128 processes, 3333 lwps, load averages: 0.04, 0.05, 0.04
 
 
# echo "::memstat" | mdb -k
Page Summary                Pages                MB  %Tot
------------     ----------------  ----------------  ----
Kernel                     319203              2493    2%
ZFS File Data             8056420             62940   49%
Anon                      1372651             10723    8%
Exec and libs               26078               203    0%
Page cache                  13682               106    0%
Free (cachelist)             9417                73    0%
Free (freelist)           6627062             51773   40%
Total                    16424513            128316
Physical                 16410049            128203
 
#df -h -n swap
Filesystem             size   used  avail capacity  Mounted on
swap                    37G    40K    37G     1%    /var/run


From the second server
Code:
 
# swap -s
total: 3501648k bytes allocated + 283192k reserved = 3784840k used, 9495632k available
 
# swap -l
swapfile             dev  swaplo blocks   free
/dev/zvol/dsk/rpool/swap 256,1      16 16777200 16777200
 
# vmstat 2 2
 kthr      memory            page            disk          faults      cpu
 r b w   swap  free  re  mf pi po fr de sr s4 s5 s6 s7   in   sy   cs us sy id
 0 0 0 16223304 24564312 17 77 0 0 0  0  0 -2  3 -4  3 2322 1816 2135  0  0 100
 0 0 0 9494752 17840096 99 204 0 0 0  0  0  0  0  0  0 2356 2744 2699  0  0 100
 
# prstat -Z -n 1,10 1 1
   PID USERNAME  SIZE   RSS STATE  PRI NICE      TIME  CPU PROCESS/NLWP
  9613 oracle    891M  876M sleep   59    0   0:50:30 0.2% oracle/1
ZONEID    NPROC  SWAP   RSS MEMORY      TIME  CPU ZONE
     0      148 3652M 3684M   2.8%   7:01:36 0.2% global
 
 
 
 
Total: 148 processes, 3433 lwps, load averages: 0.18, 0.18, 0.18
 
# echo "::memstat" | mdb -k
Page Summary                Pages                MB  %Tot
------------     ----------------  ----------------  ----
Kernel                     743484              5808    5%
ZFS File Data            12976767            101380   79%
Anon                       440277              3439    3%
Exec and libs               22564               176    0%
Page cache                  14489               113    0%
Free (cachelist)            14968               116    0%
Free (freelist)           2211964             17280   13%
Total                    16424513            128316
Physical                 16410051            128203
 
# df -hn swap
Filesystem             size   used  avail capacity  Mounted on
swap                   9.1G    56K   9.1G     1%    /var/run

Both servers were showing the second set of output prior to Sunday last week.

Hope this helps
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

swap space and cpu usage for an application

Hi, How do i get the swap space used and cpu usage for a particular application ? thanks una (2 Replies)
Discussion started by: una
2 Replies

2. UNIX for Advanced & Expert Users

per-process swap usage?

I've been trying to write a monitor program that gets various values on the processes running and makes reports. One of the values that I wanted to monitor was swap usage, so that we can ensure that our swap space doesn't fill up, but I can't seem to get this number (on a per-process basis) from... (7 Replies)
Discussion started by: bukzor
7 Replies

3. HP-UX

how can I find cpu usage memory usage swap usage and logical volume usage

how can I find cpu usage memory usage swap usage and I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times my final destination is monitor process logical volume usage above X % and number of Logical voluage above can I not to... (3 Replies)
Discussion started by: alert0919
3 Replies

4. AIX

How to monitor the IBM AIX server for I/O usage,memory usage,CPU usage,network..?

How to monitor the IBM AIX server for I/O usage, memory usage, CPU usage, network usage, storage usage? (3 Replies)
Discussion started by: laknar
3 Replies

5. Solaris

Listing processes with swap usage

Is there any way to get list of processes which are taking maximum swap , my system is showing no swap space in /var/adm/messages and i 'm unable to pin down the process which is consuming max swap space. (11 Replies)
Discussion started by: fugitive
11 Replies

6. HP-UX

Swap device file and swap sapce

Hi I have an integrity machine rx7620 and rx8640 running hp-ux 11.31. I'm planning to fine tune the system: - I would like to know when does the memory swap space spill over to the device swap space? - And how much % of memory swap utilization should be specified (swap space device... (6 Replies)
Discussion started by: lamoul
6 Replies

7. Shell Programming and Scripting

calculate swap space usage in Solaris and converts it in Percentage

Hi Folks, I am looking for a way to write a script to calculate swap usage in Solaris so that the current usage will be shown in Percentage value. Thanks!! Based on 'swap -s' command # swap -s total: 1378936k bytes allocated + 1236880k reserved = 2615816k used, 2725104k available (2 Replies)
Discussion started by: jaapar
2 Replies

8. Shell Programming and Scripting

Swap usage by top and free command doesn't match

Its rather confusing, the output of top command is below: The "swap" field of top is described by the manpage as: "The swapped out portion of a task's total virtual memory image." But the output of free command suggests something else and it does tally with the output of swapon... (3 Replies)
Discussion started by: proactiveaditya
3 Replies

9. Red Hat

Swap memory usage is high in Linux

Hi , There is one following alert . Message : cdm:Average (2 samples) swap memory usage is now 91%, which is above the warning threshold (90%) Here is my findings. Output of TOP command in Linux server. top - 14:21:44 up 6 days, 4:48, 1 user, load average: 2.55, 2.06,... (3 Replies)
Discussion started by: Maddy123
3 Replies

10. Red Hat

Swap memory usage keeps increasing.

Hi the version is RedHat 6.2 (Oracle DB server) I don't know why swap memory usage keeps increasing... I used to check swap memory usage Free -m and another way. total used free shared buffers cached Mem: 32183 31861 322 ... (3 Replies)
Discussion started by: tom8254
3 Replies
allocate_fs_swapmap(5)						File Formats Manual					    allocate_fs_swapmap(5)

NAME
allocate_fs_swapmap - determines when swapmap structures are allocated for filesystem swap VALUES
Failsafe Default Allowed values or DESCRIPTION
The tunable is used to determine whether to allocate all needed filesystem swap structures during the initialization of the filesystem swap device or wait until they are needed. Pre-allocation of all filesystem swap structures upon initialization saves time during later usage of the filesystem swap, and prevents later allocation failure due to physical memory contention. Dynamic allocation decreases the memory footprint of the filesystem swap system. Who is Expected to Change This Tunable? Anyone. Restrictions on Changing Changes to this tunable take effect at the next reboot. When Should the Value of This Tunable Be Raised? Systems under heavy memory load may not be able to acquire enough memory to hold the swap mapping structures for an addition of file system swap. These calls to add swap would fail with the error though presumably they would be retried. Frequent failure on file system swap addition with would merit enabling this tunable. What Are the Side Effects of Raising the Value? All the swap map structures for each file system swap device would be preallocated during swap initialization at kernel boot, increasing the memory footprint of the kernel. The amount of increase depends on the number and size of file system swap devices. When Should the Value of This Tunable Be Lowered? Systems with limited memory available to the kernel that also have limited use of file system swap devices should disable this tunable to decrease kernel memory usage. What Are the Side Effects of Lowering the Value? File system swap additions may fail with when memory contention is high. What Other Tunable Values Should Be Changed at the Same Time? None. WARNINGS
All HP-UX kernel tunable parameters are release specific. This parameter may be removed or have its meaning changed in future releases of HP-UX. Installation of optional kernel software, from HP or other vendors, may cause changes to tunable parameter values. After installation, some tunable parameters may no longer be at the default or recommended values. For information about the effects of installation on tun- able values, consult the documentation for the kernel software being installed. For information about optional kernel software that was factory installed on your system, see at AUTHOR
was developed by HP. Tunable Kernel Parameters allocate_fs_swapmap(5)
All times are GMT -4. The time now is 03:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy