Kernels 2.6.16 and newer provide a mechanism to have the kernel drop the page cache and/or inode and dentry caches on command, which can help free up a lot of memory.
To use /proc/sys/vm/drop_caches, just echo a number to it.
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
This is a non-destructive operation and will only free things that are completely unused. Dirty objects will continue to be in use until written out to disk and are not freeable. If you run "sync" first to flush them out to disk, these drop operations will tend to free more memory.
- UNIX Essential Skills
- UNIX Basic Commands
- Different RUN levels in Linux,Solaris and AIX
- Determine if your OS is 64-bit or 32-bit?
- How to find your MAC Add: Unix/Linux/Windows/Mac
- VI Editor Quick Reference
- dd command to create an ISO image
- TOP command - Useful switch
- Configure NTP server for time adjustment
- How to find larger file under Linux
- Adding a Swap File to an RHEL6 System
- How to find if its VM or Real host
- Find Files Based on Access/Modification/Change Time
- LINUX
- AIX
- SOLARIS
- Storage Area Network (SAN)
- NAS Netapp
- BACKUP Admin
No comments:
Post a Comment