Swap space and system performance monitoring

Source: Internet
Author: User

When the system's physical memory is insufficient, a portion of the physical memory needs to be released for use by the currently running program. The allocation of Swap space is important, but the performance monitoring during system operation is more valuable. Through performance monitoring tools, you can check the performance indicators of the system and find the bottleneck of the system performance. This article only describes some Swap-related commands and usage in Solaris.

The most common command is that the Vmstat command has such commands on most Unix platforms. This command can be used to view most performance indicators.

For example:

 
 
  1. # vmstat 3 procs  -------memory--------  -swap-  --io--  -system-  ---cpu--- r b w  
  2. swpd  free buff cache  si  so  bi  bo   in   cs  us sy  id 0 0 0     0 93880 3304  
  3. 19372   0   0  10   2  131   10   0  0  99 0 0 0     0 93880 3304 19372   0   0   0   0  
  4. 109    8   0  0 100 0 0 0     0 93880 3304 19372   0   0   0   0  112    6   0  0 100  
  5.       …………  

Swap space commands:

Parameters after vmstat specify the time interval for performance indicator capture. 3 indicates capture every three seconds. The first line of data does not need to be viewed and has no value. It only reflects the average performance since the startup. Starting from the second line, the system performance indicators within three seconds are reflected. The following items are related to the Swap space in these performance indicators:

W under procs

It indicates the number of processes that need to be released and swapped out within three seconds.

Swap under memory

It indicates the size of the Swap space used.

Si, so in Swap space

Si indicates the total number of Swap in memory exchanged per second within the current three seconds. Unit: kbytes; so indicates the total number of Swap out memory exchanged per second within the current three seconds. Unit: kbytes.

The larger the number of indicators, the more busy the system. The system busy level of these indicators depends on the specific configuration of the system. During normal system operation, the system administrator should write down the values of these indicators and compare them when a system problem occurs. Then, the system administrator will soon find the problem, standard indicators for normal operation of the system are formulated for performance monitoring.

In addition, you can use Swapon-s to easily view the current usage of Swap resources.
Example: # swapon-s Filename Type Size Used Priority/dev/hda9 partition 361420 0 3

It is easy to see the size of Swap space used and unused resources. Swap load should be kept below 30% to ensure good system performance.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.