LinuxCacheMemory (cache memory)

Source: Internet
Author: User
Article Title: LinuxCacheMemory (cache memory ). Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

Different from windows, linux has Cache Memory, which is usually called Cache Memory. Sometimes you will find that no program is running, but the top or free command shows that the available Memory is very small. In this case, you can view the Linux system/proc/meminfo file and find a Cached Memory:

#>> Cat/proc/meminfo

MemTotal: 16414004 kB

MemFree: 10278960 kB

Buffers': 65588 kB

Cached: 1273692 kB

SwapCached: 15552 kB

Active: 5349400 kB

Inactive: 597340 kB

HighTotal: 0 kB

HighFree: 0 kB

LowTotal: 16414004 kB

LowFree: 10278960 kB

SwapTotal: 33551744 kB

SwapFree: 33315872 kB

Dirty: 64 kB

Writeback: 0 kB

Mapped: 4662772 kB

Slab: 134212 kB

CommitLimit: 41758744 kB

Committed_AS: 5048776 kB

PageTables: 14784 kB

VmallocTotal: 536870911 kB

VmallocUsed: 279436 kB

VmallocChunk: 536590975 kB

HugePages_Total: 0

HugePages_Free: 0

Hugepagesize: 2048 kB

  What is Cache Memory ):

When you read and write files, the Linux kernel caches the files in the Memory to improve the Read and Write efficiency and speed. This part of the Memory is Cache Memory ). The Cache Memory will not be automatically released even after your program runs. This will cause your program to read and write files frequently in Linux, and you will find that there is very little available physical memory.

In fact, this Cache Memory will be automatically released when you need to use the Memory, so you do not have to worry about no Memory available. You can also manually release the Cache Memory.

  Release Cache Memory (Cache Memory ):

Use the following command to release the Cache Memory:

Echo 3>/proc/sys/vm/drop_caches

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.