deartim

导航

 
[root@cdh-1 sbin]# free -g
              total        used        free      shared  buff/cache   available
Mem:             62          16          18           0          27          45
Swap:            15           0          15
[root@cdh-1 sbin]# cat /proc/vmstat | egrep "dirty|writeback" 
nr_dirty 62
nr_writeback 0
nr_writeback_temp 0
nr_dirty_threshold 3387573
nr_dirty_background_threshold 1129191
[root@cdh-1 sbin]# sysctl -w vm.swappiness=0 
vm.swappiness = 0
[root@cdh-1 sbin]# echo "vm.swappiness = 0">> /etc/sysctl.conf  
[root@cdh-1 sbin]# swapoff -a 
[root@cdh-1 sbin]# free -g
              total        used        free      shared  buff/cache   available
Mem:             62          16          18           0          27          45
Swap:             0           0           0
[root@cdh-1 sbin]# sysctl -p  
vm.swappiness = 10
vm.swappiness = 0
[root@cdh-1 sbin]# free -g
              total        used        free      shared  buff/cache   available
Mem:             62          16          18           0          27          45
Swap:             0           0           0

    第一部分Mem行解释:
       total:           内存总数;   

       used:          已经使用的内存数;

       free:           空闲的内存数;

       Buffers/cached:        磁盘缓存的大小。

 

       关系:  total = used + free +Buffers/cached

posted on 2019-04-10 16:40  deartim  阅读(8242)  评论(0编辑  收藏  举报