当前位置:网站首页>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
边栏推荐
- TOPS,处理器运算能力单位、每秒钟可进行一万亿次
- AIDL基本使用
- CNN convolution neural network principle explanation + image recognition application (with source code) [easy to understand]
- Matlab traverses images, string arrays and other basic operations
- 使用闭包实现点击按钮切换 toggle
- Using closures to switch toggle by clicking a button
- 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]
- QT版本华睿相机的Demo程序实现
- keras训练的H5模型转tflite
- The leader of the cloud native theme group of beacon Committee has a long way to go!
猜你喜欢
locust 系列入门
园区全光技术选型-中篇
MySQL learning notes - SQL optimization of optimization
List announced | outstanding intellectual property service team in China in 2021
PyTorch磨刀篇|argmax和argmin函数
AirServer2022最新版功能介绍及下载
Recent public ancestor (LCA) online practices
上半年暂停考试要补考?包含监理工程师、建筑师等十项考试
EasyExcel 复杂数据导出
Getting started with the lockust series
随机推荐
One of the basic learning of function
【生态伙伴】鲲鹏系统工程师培训
CSDN购买的课程从哪里可以进入
Make a three digit number of all daffodils "recommended collection"
Redis配置与优化
Yyds dry goods inventory # solve the real problem of famous enterprises: egg twisting machine
【直播回顾】战码先锋首期8节直播完美落幕,下期敬请期待!
plantuml介绍与使用
详解LockSupport的使用
Little p weekly Vol.11
Icml2022 | interventional contrastive learning based on meta semantic regularization
MySQL的存储过程
Mysql——》索引存储模型推演
[commercial terminal simulation solution] Shanghai daoning brings you Georgia introduction, trial and tutorial
并发编程系列之FutureTask源码学习笔记
"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
[STM32] stm32cubemx tutorial II - basic use (new projects light up LED lights)
Spark interview questions
Mysql——》Innodb存储引擎的索引
List announced | outstanding intellectual property service team in China in 2021