zoukankan      html  css  js  c++  java
  • centOS7 关闭swap

    [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

  • 相关阅读:
    shader变体
    正向渲染
    LWPR
    blend
    slua
    unity
    jsBridge
    浏览器
    数据运营系统
    广告
  • 原文地址:https://www.cnblogs.com/silgogo/p/10684370.html
Copyright © 2011-2022 走看看