一、清理yum缓存
yum clean all
二、释放内存方法
1、释放网页缓存(To free pagecache):
sync; echo 1 > /proc/sys/vm/drop_caches
2、释放目录项和索引(To free dentries and inodes):
sync; echo 2 > /proc/sys/vm/drop_caches
3、释放网页缓存,目录项和索引(To free pagecache, dentries and inodes):
sync; echo 3 > /proc/sys/vm/drop_caches
当centos频繁读取文件后,物理内存会很快被用完,当程序结束后,内存不会被正常释放,而是一直caching,因此有必要手动清理系统缓存释放内存。