当前位置:网站首页>linux下清理系统缓存并释放内存
linux下清理系统缓存并释放内存
2022-07-01 18:38:00 【InfoQ】
sync
> sync;sync;sync
手动释放内存的命令
> echo 3>/proc/sys/vm/drop_caches
- 0:不释放(系统默认值)
- 1:释放页缓存
- 2:释放dentries和inodes
查看内存
> free -h
total——总物理内存
used——已使用内存,一般情况这个值会比较大,因为这个值包括了cache+应用程序使用的内存
free——完全未被使用的内存
shared——应用程序共享内存
buffers——缓存,主要用于目录方面,inode值等(ls大目录可看到这个值增加)
cached——缓存,用于已打开的文件
恢复默认设置
> echo 0>/proc/sys/vm/drop_caches
- 回复【1001】获取 linux常用命令速查手册
- 回复【10010】获取 阿里云ECS运维Linux系统诊断
- 回复【10012】获取 Linux学习笔记【强悍总结值得一看】
- 回复【10013】获取 shell简明教程

边栏推荐
- golang 错误处理
- Lumiprobe lumizol RNA extraction reagent solution
- 斯坦福、Salesforce|MaskViT:蒙面视觉预训练用于视频预测
- Navicat premium 15 permanent cracking and 2021 latest idea cracking (valid for personal testing)
- 解决方案:可以ping别人,但是别人不能ping我
- 关于企业中台规划和 IT 架构微服务转型
- code
- 研究了11种实时聊天软件,我发现都具备这些功能…
- Leetcode-128 最长连续序列
- Li Kou daily question - Day 32 -589 N × Preorder traversal of tree
猜你喜欢
随机推荐
Lumiprobe lumizol RNA extraction reagent solution
Memo - about C # generating barcode for goods
Five degrees easy chain enterprise app is newly upgraded
Excel之VBA简单宏编程
Is Alipay wallet convenient to use?
实现一个Prometheus exporter
Mysql database of easyclick
[image denoising] matlab code for removing salt and pepper noise based on fast and effective multistage selective convolution filter
12种数据量纲化处理方式
Leetcode-141环形链表
Halcon image calibration enables subsequent image processing to become the same as the template image
Implement a Prometheus exporter
app发版后的缓存问题
《Go题库·16》读写锁底层是怎么实现的
Lumiprobe non fluorescent alkyne EU (5-ethynyluridine)
ACM MM 2022视频理解挑战赛视频分类赛道冠军AutoX团队技术分享
[Chongqing Guangdong education] basic psychology reference materials of Tianjin Normal University
Reading notes series "modern methods of C language programming" -- Chapter 2
Privacy sandbox is finally coming
Three. JS learning - basic operation of camera (learn from)








