手动释放Linux内存
2016-12-26 13:55
453 查看
1. 执行sync命令
sync
说明:使用sync命令以确保文件系统的完整性,sync 命令运行 sync 子例程,将所有未写的系统缓冲区写到磁盘中,包含已修改的 i-node、已延迟的块 I/O 和读写映射文件。
2. 修改/proc/sys/vm/drop_caches
echo 3 > /proc/sys/vm/drop_caches
说明:
Writing to this file causes the kernel to drop clean caches,dentries and inodes from memory, causing that memory to becomefree.
To free pagecache, use echo 1 > /proc/sys/vm/drop_caches;
to free dentries and inodes, use echo 2 > /proc/sys/vm/drop_caches;
to free pagecache, dentries and inodes, use echo 3 >/proc/sys/vm/drop_caches.
Because this is a non-destructive operation and dirty objects are not freeable, the user should run sync first.
sync
说明:使用sync命令以确保文件系统的完整性,sync 命令运行 sync 子例程,将所有未写的系统缓冲区写到磁盘中,包含已修改的 i-node、已延迟的块 I/O 和读写映射文件。
2. 修改/proc/sys/vm/drop_caches
echo 3 > /proc/sys/vm/drop_caches
说明:
Writing to this file causes the kernel to drop clean caches,dentries and inodes from memory, causing that memory to becomefree.
To free pagecache, use echo 1 > /proc/sys/vm/drop_caches;
to free dentries and inodes, use echo 2 > /proc/sys/vm/drop_caches;
to free pagecache, dentries and inodes, use echo 3 >/proc/sys/vm/drop_caches.
Because this is a non-destructive operation and dirty objects are not freeable, the user should run sync first.
相关文章推荐
- 手动释放linux内存cache和脚本定时释放
- 如何手动释放Linux内存的方法
- 手动释放linux内存和缓存
- 手动释放linux内存cache
- 手动释放linux内存cache
- Linux内存手动释放方法
- linux内存cached手动释放
- linux手动释放内存
- 手动释放linux内存
- 手动清理linux缓存,释放内存
- 如何手动释放linux内存
- 图一时之快:手动释放Linux服务器内存
- linux命令-- 手动释放linux内存
- Linux - 手动释放Linux服务器内存(具体操作步骤)
- 手动释放linux内存cache
- linux下手动释放内存
- linux内存cached手动释放
- linux内存cached手动释放
- 手动释放linux内存cache和脚本定时释放
- 手动释放linux内存cache和脚本定时释放