当前位置:网站首页>Clean up system cache and free memory under Linux
Clean up system cache and free memory under Linux
2022-07-01 22:33:00 【51CTO】
When linux After reading files frequently , Physical memory will soon run out , When the program is finished , Memory will not be released normally , But all the time caching, Therefore, it is necessary to manually clean up the system cache to free memory .
sync
The operating system is running , The accessed files will be placed in buffer in . To avoid power failure , Data loss caused by faults such as , We need to take buffer Cache data in is written to disk
Do it manually sync command ( describe :sync The command runs sync Subroutines . If you have to stop the system , Then run sync Command to ensure file system integrity .sync Command to write all unwritten system buffers to disk , Include modified i-node、 Delayed block I/O And read-write mapping files
Manual memory release command
drop_caches The value of can be 0-3 Number between , It means different things :
- 0: Don't release ( System default )
- 1: Free page cache
- 2: Release dentries and inodes
Look at the memory
Restore default settings
Caching can improve the efficiency of the system , If you find that the system memory is often insufficient , You should consider adding memory , Instead of cleaning up often
Link to the original text : https://rumenz.com/rumenbiji/linux_drop_caches.html
WeChat official account : Entry station
- reply 【1001】 obtain linux Quick reference manual of common commands
- reply 【10010】 obtain Alibaba cloud ECS Operation and maintenance Linux System diagnosis
- reply 【10012】 obtain Linux Learning notes 【 The strong summary is worth seeing 】
- reply 【10013】 obtain shell A concise tutorial

边栏推荐
- Manually implement function isinstanceof (child, parent)
- 【MySQL】索引的分类
- Redis配置与优化
- Qtreeview+qabstractitemmodel custom model: the third of a series of tutorials [easy to understand]
- Recent public ancestor (LCA) online practices
- Go - exe corresponding to related dependency
- 【MySQL】索引的创建、查看和删除
- A debugging to understand the slot mechanism of redis cluster
- The leader of the cloud native theme group of beacon Committee has a long way to go!
- Show member variables and methods in classes in idea
猜你喜欢

"The silk road is in its youth and looks at Fujian" is in the hot collection of works in the Fujian foreign youth short video competition

详解JMM

Go - exe corresponding to related dependency

List announced | outstanding intellectual property service team in China in 2021

三翼鸟两周年:羽翼渐丰,腾飞指日可待

Spark interview questions

Recent public ancestor offline practice (tarjan)

Sonic cloud real machine learning summary 6 - 1.4.1 server and agent deployment

plantuml介绍与使用

What is the difference between PMP and NPDP?
随机推荐
Show member variables and methods in classes in idea
News classification based on LSTM model
Medium pen test questions: flip the string, such as ABCD, print out DCBA
Design and practice of new generation cloud native database
[commercial terminal simulation solution] Shanghai daoning brings you Georgia introduction, trial and tutorial
Training on the device with MIT | 256Kb memory
What is the difference between consonants and Initials? (difference between initials and consonants)
Unity 使用Sqlite
locust 系列入门
[intelligent QBD risk assessment tool] Shanghai daoning brings you leanqbd introduction, trial and tutorial
Make a three digit number of all daffodils "recommended collection"
The difference between NiO and traditional IO
上半年暂停考试要补考?包含监理工程师、建筑师等十项考试
TOPS,处理器运算能力单位、每秒钟可进行一万亿次
Interview question: what is the difference between MySQL's Union all and union, and how many join methods MySQL has (Alibaba interview question) [easy to understand]
【MySQL】explain的基本使用以及各列的作用
Copy ‘XXXX‘ to effectively final temp variable
Application of real estate management based on 3D GIS
指标陷阱:IT领导者易犯的七个KPI错误
Tops, the unit of computing power of the processor, can be carried out 1 trillion times per second