清除Linux OS 缓存
2015-12-23 17:27
726 查看
1.查看内存使用情况
m代表以MB为单位,显示OS缓存为20890MB
2.释放前最好sync一下,防止丢数据
3.清除缓存
4.查看效果
可以看到此时缓存大小减少为541MB
[root@ip-172-31-25-243 tpch_2_17_0]# free -m total used free shared buffers cached Mem: 34304 34142 162 0 39 20890 -/+ buffers/cache: 13211 21092 Swap: 0 0 0
m代表以MB为单位,显示OS缓存为20890MB
2.释放前最好sync一下,防止丢数据
[root@ip-172-31-25-243 tpch_2_17_0]# sync
3.清除缓存
[root@ip-172-31-25-243 tpch_2_17_0]# echo 1 > /proc/sys/vm/drop_caches
4.查看效果
[root@ip-172-31-25-243 tpch_2_17_0]# free -m total used free shared buffers cached Mem: 34304 13168 21135 0 1 541 -/+ buffers/cache: 12626 21678 Swap: 0 0 0
可以看到此时缓存大小减少为541MB
相关文章推荐
- centos6下安装teamviewer
- 【Linux】用Winscp远程访问无图形界面的Linux系统
- Linux守护进程的编程实现
- 运用Python语言编写获取Linux基本系统信息(二):文件系统使用情况获取
- kickstart安装centos6
- Linux下利用backtrace追踪函数调用堆栈以及定位段错误
- Linux下制作Ubuntu的U盘启动盘
- linux命令(2):less
- linux su和sudo命令的区别
- Linux软连接和硬链接
- linux笔记
- centos7 安装opencv-3.0.0
- linux编程进阶书推荐APUE,UNP
- 关于linux内核模块Makefile的解析
- linux编程进阶书推荐APUE,UNP
- Linux strace命令
- (原)Linux下 安装jdk8
- centos6.4安装及升级gcc 4.8.2(已实践)
- linux中查看硬件温度的命令
- linux命令(1):touch