CentOS 6.5 x86_64系统手动释放内存
2015-06-12 10:35
477 查看
1、查询当前内存使用情况和释放缓存的参数
redismaster 10:29:24 [~] [root] free -m
total used free shared buffers cached
Mem: 7872 777 7095 0 117 435
-/+ buffers/cache: 223 7648
Swap: 16383 0 16383
查看释放缓存参数的命令,如下所示:
redismaster 10:29:27 [~] [root] cat /proc/sys/vm/drop_caches
0
2、使用sync命令,将系统缓存区中的脏数据写入磁盘中,包括已修改的i-node、已延迟的块I/O和读写映射文件,命令
redismaster 10:30:12 [~] [root] sync
3、配置文件/proc/sys/vm/drop_caches中记录了缓存释放的参数,命令
redismaster 10:30:44 [~] [root] echo 3 > /proc/sys/vm/drop_caches
4、不重启机器使配置改生效,命令
redismaster 10:32:20 [~] [root] sysctl -p
redismaster 10:29:24 [~] [root] free -m
total used free shared buffers cached
Mem: 7872 777 7095 0 117 435
-/+ buffers/cache: 223 7648
Swap: 16383 0 16383
查看释放缓存参数的命令,如下所示:
redismaster 10:29:27 [~] [root] cat /proc/sys/vm/drop_caches
0
2、使用sync命令,将系统缓存区中的脏数据写入磁盘中,包括已修改的i-node、已延迟的块I/O和读写映射文件,命令
redismaster 10:30:12 [~] [root] sync
3、配置文件/proc/sys/vm/drop_caches中记录了缓存释放的参数,命令
redismaster 10:30:44 [~] [root] echo 3 > /proc/sys/vm/drop_caches
4、不重启机器使配置改生效,命令
redismaster 10:32:20 [~] [root] sysctl -p
相关文章推荐
- linux 进程管理相关命令汇总
- Linux系统日志API---------openlog(), syslog(), closelog()
- Linux常用操作命令
- linux 函数查询方法 网址
- Linux系统中怎么安装使用五笔输入法?
- 朝鲜创新操作系统:“红星Linux 3.0” 满满的苹果味
- Linux环境开发效率 那些强大的命令盘点
- 在 Linux 中用 nmcli 命令绑定多块网卡的方法
- Linux中应用程序如何使用系统调用syscall
- 技术人故事:父亲、Linux和我
- linux系统rman的自动备份脚本
- linux下syscall函数,SYS_gettid,SYS_tgkill
- Linux串口驱动
- 应用 Valgrind 发现 Linux 程序的内存问题
- SELinux 学习笔记
- Linux下ls命令颜色效果
- 在Linux中用chattr和lsattr命令管理文件和目录属性
- linux文件夹对比命令——meld
- 关于centos连接mssql的问题
- 嵌入式linux开机应用程序自启动