zz Release memory in Linux (Unused or Cached)
|
In computer science, Memory Leakage occurs when a computer software or program consumes required memory but unable to memory after completing its task or when no longer needed to Operating System. There are two types of Memory Leakage. One is Virtual Memory Leakage and another is Real Memory Leakage. |
||||||||||||||||||||
|
Now first Identify cached memory or unused memory by executing, |
||||||||||||||||||||
|
# free -m |
||||||||||||||||||||
|
||||||||||||||||||||
|
Flush file system buffers by executing, |
||||||||||||||||||||
|
# sync |
||||||||||||||||||||
|
Kernels 2.6.16.x and newer versions of kernel provide a mechanism to have the kernel drop the page cache and/or inode and dentry caches on command, which can be helpful to free up a lot of memory. |
||||||||||||||||||||
|
To free page cache: |
||||||||||||||||||||
|
# echo 1 > /proc/sys/vm/drop_caches |
||||||||||||||||||||
|
To free dentries and inodes: |
||||||||||||||||||||
|
# echo 2 > /proc/sys/vm/drop_caches |
||||||||||||||||||||
|
To free page cache, dentries and inodes: |
||||||||||||||||||||
|
echo 3 > /proc/sys/vm/drop_caches |
||||||||||||||||||||
|
Above commands are non-destructive and will only release unused memory. As we have used sync, so it will flush all Dirty Objects which are not free able and make it as unused memory. |
zz Release memory in Linux (Unused or Cached)的更多相关文章
- [转载]linux 清除系统cached
FROM: http://cqfish.blog.51cto.com/622299/197230 linux 清除系统cached top查看系统内存使用情况 Mem: 16432180k ...
- Linux Buffers和Cached的区别(转)
在linux下使用free命令查看内存使用情况,有buffers和cached两项,以下是它们的区别: buffers是为块设备设计的缓冲.比如磁盘读写,把分散的写操作集中进行,减少磁盘I/O,从而提 ...
- [zz]安装PostgreSQL数据库(Linux篇)
0.编译环境 Linux: CentOS 5.5 gcc: 4.1.2 1. 安装PostgreSQL 1) 解压postgresql-9.1.7.tar.bz2 #tar jxvf postgres ...
- Multi-core compute cache coherency with a release consistency memory ordering model
A method includes storing, with a first programmable processor, shared variable data to cache lines ...
- linux make virtual memory more efficient three components
Page Cache This is used to speed up access to images and data on disk. As pages are read into memory ...
- linux memory dump--http://www.forensicswiki.org/wiki/Tools:Memory_Imaging
Linux provides two virtual devices for this purpose, '/dev/mem' and '/dev/kmem', though many distrib ...
- Memory layout of x86_64 in Linux
Blue : User Space 128TBRed : Kernel Space 512MBThe rest of the address space goes to various parts o ...
- Linux Communication Mechanism Summarize
目录 . Linux通信机制分类简介 . 控制机制 0x1: 竞态条件 0x2: 临界区 . Inter-Process Communication (IPC) mechanisms: 进程间通信机制 ...
- Linux kernel memory-faq.txt
## Linux kernel memory-faq.txt What is some existing documentation on Linux memory management? Ulric ...
随机推荐
- 2015南阳CCPC D - Pick The Sticks dp
D - Pick The Sticks Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 无 Description The story happened lon ...
- C语言调用Lua函数
记得上学时,初中英文课本中,上网叫做surfing the internet,中文叫网上冲浪. 那个时期,人们常常称互联网为赛博空间.现在工作了,大量的零碎时间用于上微博,知乎,QQ.这些碎片化的阅读 ...
- 对CAB文件进行数字签名
对CAB文件进行数字签名 传说中数字签名之后就能够不出现提示而自己主动下载,所以也试试: 在\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin 中间有三个小 ...
- SlideLayout
https://github.com/rey5137/SlideLayout
- Android实现图表绘制和展示
本文演示在Android平台中绘制和展示图表示例,本示例是基于RChart 2实现的. 在一个系统中经常要用到图表统计数据,在WEB开发中图表绘制是一件简单的事情,因为有比较多的开源方案.但在Andr ...
- oc-02-NSLog使用
#import <Foundation/Foundation.h> /* NSLog() : C语言中的 printf的增强版 作用: 向控制台输出打印数据. 增强的地方 : 打印时间 , ...
- VMware 9 安装 OS X 10.8.4 并安装 Xcode 4.6
转自:http://blog.csdn.net/weizi4332/article/details/9264799 学习Objective-C必须要有运行环境,Xcode是最好的选择.不过Window ...
- Ejection chain 与交错路
相关文献: Rego, C. (1998). "A Subpath Ejection Method for the Vehicle Routing Problem." Manage ...
- 架构师书单 2nd Edition--转载
作者:江南白衣,原文出处: http://blog.csdn.net/calvinxiu/archive/2007/03/06/1522032.aspx,转载请保留. 为了2007年的目标,列了下面待 ...
- 快递鸟电子面单API对接方法?
之前说了一下快递公司.菜鸟和快递鸟的电子面单接口,很多人不知道快递鸟要怎么对接,现在为大家讲解一下.快递鸟是全球物流接口服务商,为电商 ERP.电商平台.仓储.清关公司提供物流跟踪.电子面单.智选物流 ...