Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Example Analysis of Linux Server memory

2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you a sample analysis of Linux server memory, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

1. First of all, the results of free-m viewing are analyzed.

View plaincopy to clipboardprint?

Linux-8v2i:~ # free-m

Total used free shared buffers cached

Mem: 3952 2773 178 0 130 1097

-/ + buffers/cache: 1545 2406

Swap: 2055 0 2055

Linux-8v2i:~ # free-m

Total used free shared buffers cached

Mem: 3952 2773 178 0 130 1097

-/ + buffers/cache: 1545 2406

Swap: 2055 0 2055

The meaning of each parameter:

Total: total physical memory

Used: memory used

Free: completely unused memory

Shared: application shared memory

Buffers: cache, mainly used for directory, inode value, etc.

Cached: cache, for open files

-buffers/cache: the amount of memory used by the application, used minus cache value

+ buffers/cache: all the memory available to the application, free plus cache value

Where:

Total = used + free

-buffers/cache=used-buffers-cached, which is the actual amount of memory used by the application

+ buffers/cache=free+buffers+cached, which is the real amount of memory available on the server.

2. Memory allocation of Linux

As we all know, in order to improve efficiency, the Linux server will apply for memory in advance, even if the memory is not used by specific applications, Linux will apply for the memory in advance, and then use the memory for caching, that is, the newly opened file system will be stored in cache, so the corresponding server free value will become less and less, buffers and cached will become larger and larger, so it will give you the impression that there is less and less memory, and everyone will be nervous. In fact, we do not need to be nervous at all. When we find that the Linux server is out of memory, we will automatically clean up the cached area, release memory, and then continue to increase cache,free and continue to decrease.

The above is all the contents of the article "sample Analysis of Linux Server memory". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report