CentOS 6.5 x86_64 system manually frees memory

Source: Internet
Author: User

1. Querying current memory usage and releasing cached parameters

Redismaster 10:29:24 [~] [root] free-m
Total used free shared buffers Cached
mem:7872 777 7095 0 117 435
-/+ buffers/cache:223 7648
swap:16383 0 16383

View the commands that release the cache parameters as follows:

Redismaster 10:29:27 [~] [root] cat/proc/sys/vm/drop_caches
0

2. Use the sync command to write dirty data from the system cache to disk, including modified I-node, deferred block I/O, and read-write mapping files, command

Redismaster 10:30:12 [~] [root] sync

3. The parameters of cache release are recorded in the configuration file/proc/sys/vm/drop_caches, and the command

Redismaster 10:30:44 [~] [root] echo 3 >/proc/sys/vm/drop_caches

4, do not restart the machine to change the configuration to take effect, command

Redismaster 10:32:20 [~] [root] sysctl-p

CentOS 6.5 x86_64 system manually frees memory

Related Article

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.