nmon memory analysis

May refer to:

 

MemTotal: Displays the current physical memory size of the server, the server has about 8063180 KB≈7874 MB.

MemFree: Displays the current free memory size of the server, the server has about 5052336 KB≈4934 MB.

Buffers: Buffer display the current server (in memory to be written on the disk) cache size, the server has about 459108 KB≈448 MB, note that the value here is only the beginning of a static value of the acquisition, changes in the specific needs of Buffer look Sheet MEM.

Cached: Displays the current size of the cache server Cache (read from disk into memory), the server has about 1032572 KB≈1008 MB. , The value here is only the beginning of a static value of the acquisition, changes need to look at the specific Buffer Sheet MEM.

SwapCached: Swap space display server has current size of the cache, the server has not been used to Swap space.

SwapTotal: Swap space size displays the current server, the server has about 8385532 KB≈8189 MB.

SwapFree: Displays the current server Swap free space size, the server Swap space are idle.

 

These data indicate active memory is being used, or two or just used. These data indicate inactive memory is effective, but not recently been used. free, free memory, these spaces can be used at any time to the program.

When free memory falls below a certain value, the system will use the inactive resources.

Transforming relationship between active, inactive and free memory are as follows:

First, if inactive data has recently been called, the system will change their status to active, and then in the back of the original active logical memory address, if inactive memory data has not been used recently, but had been changed but not yet make changes in the appropriate virtual memory disk, the system will have the appropriate hard disk virtual memory to make changes, and this part of the physical memory release is free to use for the program. If the inactive memory available data is then mapped to the hard disk has not been changed, then released directly into free. Finally, if active memory has not been used for some time, it will be temporarily changed status to inactive.

If the system has a small amount of free memeory and a large number of inactive of memeory, explanation is enough memory, the system is running at its best, as long as necessary, the system will use them, do not worry. And conversely, if free memory and inactive memory systems are small, and a lot of active memory, indicating that not enough memory.

We need analysis phase is usually CPU (%), MEM (%), DISKBUSY (%), NET (MB) of several related values

      1. With regard to the effective line

       Since the start nmon time may not be the application of stationary time while nmon monitoring period may be longer than the application of pressure; it's often the result of nmon some obvious unreasonable data - such as the results of previous CPU occupancy and other obvious the average data less than the middle or the back of a few small sampling results; for such data to be filtered in the time we have to analyze;

      2. CPU occupancy

       CPU_ALL table, the column averaged to CPU% --- Note that the red box in the figure is invalid data;

  2. DISKBUSY  

    DISKBUSY table, for a single disk server directly to the SDA column averaging can; multi-server, then the case may be - there is only one disk Ruoguo pressure can then select the disk, and if they have two disks are combined take an average;

3. MEM% 

  Memory usage is calculated using the following formula for each row in the table inside MEM and averaged:

    (Memtotal - Memfree - cached - buffers)/Memtotal  * 100即( =(B2-F2-K2-N2)/B2*100)

Trend analysis by memory usage, memory leaks can be located if the circumstances.

Some people see the memory usage is 99%, they think with memory full, and does not distinguish what type of memory paging, so arbitrary to say with full memory is not scientific. On AIX primary concern is computer memory percentage of the total physical memory on linux main concern is the active memory percentage of the total physical memory.

4. NET (MB) network is the only occupation need to convert to MB instead of%

Find eth0-total eth1-total for that column is not 0, averaged and divided by 1024.

Note that here corresponds to write time monitoring nmon (direct execution key press n) of TRANS (OUT), read corresponds RECVS (IN)

To pay attention to changes in the law and the validity of the data, flexible filtering out invalid data, is generally used to filter invalid line CPU, and the other three in uniform with the number of effective lines is calculated;

 

Shell script to see linux system performance bottlenecks article has been written by a shell script, the script can be seen from how to get the value of the resources of the server from the linux command. An analysis can be combined with nmon.



Author: geeks and quants
link: https: //www.jianshu.com/p/105f2c9abff4
Source: Jane book
Jane book copyright reserved by the authors, are reproduced in any form, please contact the author to obtain authorization and indicate the source.

Guess you like

Origin www.cnblogs.com/python-xiakaibi/p/11118888.html