Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to clean up the system memory space under CentOS

Shulou Source: shulou.com Published: 2022-06-01 17:40:39 11月14日 Update

This article mainly shows you "how to clean up the system memory space under CentOS", the content is easy to understand, clear, hope to help you solve doubts, the following let the editor lead you to study and learn "how to clean up the system memory space under CentOS" this article.

After opening a lot of programs that will take up memory, after closing these programs, you find that the memory space is still the same as when you did not close the application, so that the memory of other applications is not enough or very stuck. So at this time, you want to clean up the memory occupied by the previous programs, and most of them are occupied by cached data, so how to clean up the memory? You can use the following steps to clean up memory:

Most GNU Linux have the caching mechanism enabled by default. If the configuration file cat / proc/sys/vm/drop_caches is 0, it means that the caching mechanism is enabled. This mechanism is very effective when running a service all the time, making it easy for the service itself to read quickly. As a desktop user, the open program is not so single, so desktop users still recommend setting this profile to 1. Clean up the system cache in time to free up space for use by other programs.

1. Memory usage before cleanup

Free-h

two。 Start cleaning up.

Echo 1 > / proc/sys/vm/drop_caches

3. Memory usage after cleanup

Free-h

About drop_caches means that the system cleans up the cache of memory pages to get more available memory.

The above is all the contents of the article "how to clean up the system memory space under CentOS". 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!

Tags: Memory program space system cache content mechanism article application situation file more desktop user or open time learning help application service Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL Redmi Shulou Information NVidia Shulou Tech Info