No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade
Knowledge Base

VM's Memory Usage Displayed on the PC Differs Greatly from That Displayed on FusionCompute

Publication Date:  2019-06-28  |   Views:  278  |   Downloads:  0  |   Document ID:  EKB1100020374

Contents

Issue Description

The VM's memory usage on the PC differs greatly from that displayed on FusionCompute R6.

VM's memory usage displayed on FusionCompute:




You can run top on the VM to check its memory usage, as shown in the figure below:




According to the feedback from frontline engineers, the total memory is 65954112 KB and the used memory is 26481829 KB. The memory utilization is 40%, which is different from that displayed on FusionCompute.


Alarm Information

None

Handling Process

1.       After confirmation, the used memory checked by running top is inaccurate. No other company in the industry has used this method to calculate the memory usage.

2.       In most cases of the industry, the memory usage of a Linux OS is calculated based on the values in the second line of the free –m command output. For details, visit the following website: http://www.cnblogs.com/black-mamba/p/5918688.html

For example:

Root Cause

The VM's memory usage on the PC is different from that displayed on FusionCompute. After you divide the used VM memory by the total VM memory, the calculated value differs greatly from the value displayed on FusionCompute. The formula for calculating the internal memory usage of a VM is as follows:

(Used memory – Cached memory)/Total memory;

In Linux OS, a new program applies for memory from free partitions by default. When the memory is used up, the memory is preferentially released to cached memory or buffered memory. When the program needs to apply for memory again, the cached memory is used. Therefore, to calculate the memory usage, the value of cached memory needs to be reduced. In extreme cases, the remaining memory of free partitions may be 0, but the buffered and cached memory is large. In this case, the VM can run properly.

Solution

Use the values in the second line of the free –m command output. For details, visit http://www.cnblogs.com/black-mamba/p/5918688.html.

Suggestions

The memory usage and CPU usage on the FusionCompute are different from those on your PC. You are advised to confirm the calculation method with engineers.