linux 释放cache 内存
释放内存前
# free -m
total used free shared buffers cached
Mem: 7831 7704 127 0 256 6813
-/+ buffers/cache: 634 7197
Swap: 7999 0 7999
sync && echo 1 > /proc/sys/vm/drop_caches
sync && echo 2 > /proc/sys/vm/drop_caches
sync && echo 3 > /proc/sys/vm/drop_caches
Writing to this will cause the kernel to drop clean caches, dentries and inodes from memory, causing that memory to become free.
To free pagecache:
* echo 1 > /proc/sys/vm/drop_caches
To free dentries and inodes:
* echo 2 > /proc/sys/vm/drop_caches
To free pagecache, dentries and inodes:
* echo 3 > /proc/sys/vm/drop_caches
As this is a non-destructive operation, and dirty objects are notfreeable, the user should run "sync" first in order to make sure allcached objects are freed.
This tunable was added in 2.6.16.
释放内存后
# free -m
total used free shared buffers cached
Mem: 7831 365 7466 0 0 18
-/+ buffers/cache: 346 7485
Swap: 7999 0 7999
转载于:https://blog.51cto.com/lihongweibj/1616892
linux 释放cache 内存相关推荐
- linux怎么释放cached中内存,Linux 释放cached内存
使用free -m 查看系统使用的内存情况: # free -m total used free shared buffers -/+ buffers/cach ...
- Linux中Cache内存占用过高解决办法
在Linux系统中,我们经常用free命令来查看系统内存的使用状态.在一个RHEL6的系统上,free命令的显示内容大概是这样一个状态: 这里的默认显示单位是kb,我的服务器是128G内存,所以数字显 ...
- Linux buffer/cache 内存占用过高的原因以及解决办法
表现现象 在Linux系统中,我们经常用free命令来查看系统内存的使用状态.在一个 CoreOS 的系统上,free命令的显示内容大概是这样一个状态: core@localhost ~ $ free ...
- linux缓冲区内容占用较多什么原因,Linux中Cache内存占用太高解决办法
在Linux系统中,咱们常常用free命令来查看系统内存的使用状态.在一个RHEL6的系统上,free命令的显示内容大概是这样一个状态:html 这里的默认显示单位是kb,个人服务器是128G内存,因 ...
- linux释放cache
Cache:存放从硬盘上读出的数据,即缓存. 释放cache: echo 3 > /proc/sys/vm/drop_caches
- node linux cache补释放,linux下释放cache内存
细心的朋友会注意到,当你在linux下频繁存取文件后,物理内存会很快被用光,当程序结束后,内存不会被正常释放,而是一直作为caching.这个问题,貌似有不少人在问,不过都没有看到有什么很好解决的办法 ...
- Linux 释放cpugpu内存、显存和硬盘
free -m free -mtotal used free shared buff/cache available Mem: 128831 15666 23617 406 89547 111448 ...
- 手工释放cache内存
服务器buff/cache占用过高,手工释放 1. 查看内存使用情况 free -h 2. 执行sync命令 内存缓冲块数据强制写入磁盘,以防重新启动,关机,或者是不正常断电的情况下,数据还没来得及存 ...
- linux怎么修改内存缓存,Linux内存、缓存、Swap等修改
1. Linux 修改系统内存大小:修改启动文件,增加mem=300M,如下: vi /boot/grub/grub.conf ...... title CentOS (2.6.18-194.3.1. ...
最新文章
- 将php-fpm添加至service服务
- bilibili源码_selenium+phantomjs爬取bilibili
- spring原始注解开发-01
- 龙岩学院计算机专业宿舍,龙岩学院的各个学院位置有谁能说下
- line-height的一点见识
- 隔行变色java代码_jquery入门—选择器实现隔行变色实例代码
- 畅通工程(HDU-1232)
- java day46【AJAX 、JSON】
- 在win7 64位上安装VS2015的问题汇总
- mac tree命令
- usc2_今天发布:与USC合作的新游戏设计课程
- maxon电机/步科电机 CANOpen协议指令速度模式
- 什么软件可以让头发变黑_吃什么可以让头发变黑?
- 码率、帧率和I B P帧
- eclipse 64位 免安装_超详细:64位Linux下安装PS模拟器ePSxe
- 郭长波连任OpenStack基金会独立董事 继续推动中国力量话语权
- 类似于wps的linux软件,出了Office、WPS还有哪些好用的办公软件?
- 深入浅出理解类和对象
- 利用Hackrf One进行GPS定位欺骗制作超级跑马机
- DC-DC电源芯片(VIPER22A)的BUCK电路使用说明