2010年10月7日 星期四

Performance

Memory

1. look the memory usage
{{{
[Andy@localhost source]$ free -m
total used free shared buffers cached
Mem: 4038 3631 406 0 248 2219
-/+ buffers/cache: 1163 2875
Swap: 5535 120 5415


}}}




-------------------------------------------
Release cache memory

{{{
I have cleaned the blast2 cache memory from 378G uesed memory to 38G used memory.

The following is the blast2 memory status in processing clean processing:
Original memory status:
Mem: 528654244k total, 377,362,648k used (377G), 151,291,596k free (151G), 56240k buffers
After cleaned chache memory:
Mem: 528654244k total, 38,823,964k used (38G), 489,830,280k free (489G), 3216k buffers

Conclusion:
Data will in cache becuase previous we interrupt some jobs,
we can use sync; echo 3 > /proc/sys/vm/drop_caches command to release cache memory.
there we are 489G free memory.



Solution:
Because most memory is in cache and can release
{{{
[Andy@blast2 Data]$ free -m
total used free shared buffers cached
Mem: 516263 368477 147786 0 54 315990 (315G)
}}}

I refer to the 'google' and type following command:
{{{
[root@blast2 ~]# sync
[root@blast2 ~]# echo 3 > /proc/sys/vm/drop_caches
}}}

Note: Sync is used to synchronize the data in the memory to disk, as some data in disk might be cached in the memory for easy access. Use of sync will prevent any sort of data loss or file system corruption.


Reference:
http://www.linuxforums.org/forum/miscellaneous/29900-release-cache-memory.html


}}}

沒有留言:

張貼留言