当前位置:网站首页>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
边栏推荐
- 使用闭包实现点击按钮切换 toggle
- Burpsuite simple packet capturing tutorial [easy to understand]
- spark analyze命令使用及其作用 map join broadcast join 广播join
- MySQL之MHA高可用配置及故障切换
- Chapter 9 Yunji datacanvas company has been ranked top 3 in China's machine learning platform market
- Sonic云真机学习总结6 - 1.4.1服务端、agent端部署
- [ecological partner] Kunpeng system engineer training
- Qtreeview+qabstractitemmodel custom model: the third of a series of tutorials [easy to understand]
- Case of camera opening by tour
- linux下清理系统缓存并释放内存
猜你喜欢
随机推荐
LIS (longest ascending subsequence) problem that can be understood [easy to understand]
List announced | outstanding intellectual property service team in China in 2021
Tops, the unit of computing power of the processor, can be carried out 1 trillion times per second
Sonic cloud real machine learning summary 6 - 1.4.1 server and agent deployment
【目标跟踪】|单目标跟踪指标
【MySQL】索引的创建、查看和删除
名单揭晓 | 2021年度中国杰出知识产权服务团队
locust 系列入门
按照功能对Boost库进行分类
企业架构与项目管理的关联和区别
基于三维GIS的不动产管理应用
三翼鸟两周年:羽翼渐丰,腾飞指日可待
IDA动态调试apk
收到一封CTO来信,邀约面试机器学习工程师
高攀不起的希尔排序,直接插入排序
焱融看 | 混合云时代下,如何制定多云策略
Gaussdb (DWS) active prevention and troubleshooting
业务可视化-让你的流程图'Run'起来
Mysql——》MyISAM存储引擎的索引
[STM32] stm32cubemx tutorial II - basic use (new projects light up LED lights)