centOS7 关闭swap
[root@cdh- sbin]# free -g
total used free shared buff/cache available
Mem:
Swap:
[root@cdh- sbin]# cat /proc/vmstat | egrep "dirty|writeback"
nr_dirty
nr_writeback
nr_writeback_temp
nr_dirty_threshold
nr_dirty_background_threshold
[root@cdh- sbin]# sysctl -w vm.swappiness=
vm.swappiness =
[root@cdh- sbin]# echo "vm.swappiness = 0">> /etc/sysctl.conf
[root@cdh- sbin]# swapoff -a
[root@cdh- sbin]# free -g
total used free shared buff/cache available
Mem:
Swap:
[root@cdh- sbin]# sysctl -p
vm.swappiness =
vm.swappiness =
[root@cdh- sbin]# free -g
total used free shared buff/cache available
Mem:
Swap:
第一部分Mem行解释:
total: 内存总数;
used: 已经使用的内存数;
free: 空闲的内存数;
Buffers/cached: 磁盘缓存的大小。
关系: total = used + free +Buffers/cached
centOS7 关闭swap的更多相关文章
- centos7 关闭防火墙
centos7 关闭防火墙 1.firewall相关的操作 查看防火墙状态 firewall-cmd --state 关闭防火墙 systemctl stop firewalld.s ...
- Centos7 开启swap分区
阿里云购买的机器,默认不会开启swap分区,如有需要,需自行开启. 阿里当前的做法是: 1.不创建swap分区,由镜像决定 2.将vm.swappiness设定为0,即永不使用swap分区 开启swa ...
- 关闭swap
#(1)临时关闭swap分区, 重启失效; swapoff -a #(2)永久关闭swap分区 sed -ri 's/.*swap.*/#&/' /etc/fstab
- linux关闭swap
#(1)临时关闭swap分区, 重启失效; swapoff -a #(2)永久关闭swap分区 sed -ri 's/.*swap.*/#&/' /etc/fstab 也可以在sysctl.c ...
- Centos7 增加swap分区的内存大小
Centos7 增加swap分区的内存大小 对 swap 空间的适当大小实际上取决于您的个人偏好和您的应用程序要求.通常,等于或双倍于系统内存的量是一个很好的选择 添加swap分区使用dd命令创建/h ...
- CentOS7关闭/开启防火墙出现 Unit iptables.service failed to load
在vm中安装好tomcat,而且在liunx中使用nc命令可以返回成功,但是更换到window中访问不到tomcat的情况,是由于linux防火墙的问题造成的,传统的解决方式有2中 第一种解决方案: ...
- Centos7调整swap分区
如何让服务器响应更快?如何避免应用出现内存不足的错误?最简单的方法就是增加交换空间.Swap是存储盘上的一块自留地,操作系统可以在这里暂存一些内存里放不下的东西. 这从某种程度上相当于增加了服务器的可 ...
- CentOS7 关闭防火墙和selinux
本文将简单介绍在CentOS7上如何临时和永久关闭防火墙和selinux. 关闭防火墙 # 查看防火墙状态 [root@localhost ~]# systemctl status firewalld ...
- centos7 关闭默认firewalld,开启iptables
编者按: 对于使用了centos6系列系统N年的运维来说,在使用centos7的时候难免会遇到各种不适应.比如防火墙问题.本文主要记录怎么关闭默认的firewalld防火墙,重新启用iptables. ...
随机推荐
- django orm 管理器 objects
给某张表的管理器重命名 class User(models.Model): name = models.CharField(max_length=100) people = models.Manage ...
- react连连看
// Math.floor(t * Math.random()); var isInclude = function (array, element) { let alen = array.len ...
- 猜测的rpc负载均衡原理,基于dubbo的架构
集群层(Cluster):封装多个提供者的路由及负载均衡,并桥接注册中心,以Invoker为中心,扩展接口为Cluster.Directory.Router和LoadBalance.将多个服务提供方组 ...
- 进程间传递文件描述符——sendmsg和recvmsg函数
先引入一个例子,该程序的目的是子进程向父进程传递文件描述符,并通过该文件描述符读取buf. #include <func.h> int main(){ int fds[2]; pipe(f ...
- note 12 集合Set
集合Set +无序不重复元素(键)集 +和字典类似,但是无"值" 创建 x = set() x = {key1,key2,...} 添加和删除 x.add('body') x.re ...
- UIView和CALayer区别
(1)首先UIView可以响应用户的触摸事件,Layer不可以. (2)View中frame getter方法,bounds和center,UIView并没有做什么工作:它只是简单的各自调用它底层的C ...
- C++ 64位操作系统调用 RegOpenKey() 读取注册表,返回 2, ERROR_FILE_NOT_FOUND
环境:64位操作系统, VS2017 首先在命令行执行 REG ADD HKLM\Software\seastarsun /v serial /t REG_SZ /d 58ae4cb077a4e1 在 ...
- spark2.1源码分析1:Win10下IDEA源码阅读环境的搭建
环境:win10.IDEA2016.3.maven3.3.9.git.scala 2.11.8.java1.8.0_101.sbt0.13.12 下载: #git bash中执行: git clone ...
- [org.springframework.context.annotation.ComponentScanBeanDefinitionParser] are only available on JDK 1.5 and higher 问题--MyEclipse设置JDK版本
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML doc ...
- Python 编码的一些问题
>>> ord('中') 20013 >>> chr(65) 'A' >>> chr(20013) '中' - Python文件默认是UTF-8编 ...