linux内存参数笔记
来源:互联网 发布:有关数据库的参考文献 编辑:程序博客网 时间:2024/05/21 11:05
* 当值是1 或者2 的时候,使用场景是让系统panic,这样在集群系统中就会导致failover了
sysctl vm.min_free_kbytes
系统保留的空闲内存,会增加oom的风险。
但是保留的内存用于干啥来?
min_free_kbytes:This is used to force the Linux VM to keep a minimum numberof kilobytes free. The VM uses this number to compute awatermark[WMARK_MIN] value for each lowmem zone in the system.Each lowmem zone gets a number of reserved free pages basedproportionally on its size.Some minimal amount of memory is needed to satisfy PF_MEMALLOCallocations; if you set this to lower than 1024KB, your system willbecome subtly broken, and prone to deadlock under high loads.Setting this too high will OOM your machine instantly.
sysctl vm.admin_reserve_kbytes
admin_reserve_kbytesThe amount of free memory in the system that should be reserved for userswith the capability cap_sys_admin.admin_reserve_kbytes defaults to min(3% of free pages, 8MB)That should provide enough for the admin to log in and kill a process,if necessary, under the default overcommit 'guess' mode.Systems running under overcommit 'never' should increase this to accountfor the full Virtual Memory Size of programs used to recover. Otherwise,root may not be able to log in to recover the system. 这句话读懂了,如果overcommit是never,那么系统只会在有那么多内存的情况下才会分配,如果我们运行某个程序,需要100MB,但是实际上只要有个10MB就好了,如果我们剩余内存只有11MB,运行在never的情况下就是不可能成功运行的,而在0和1的时候是可以运行的。How do you calculate a minimum useful reserve?sshd or login + bash (or some other shell) + top (or ps, kill, etc.)For overcommit 'guess', we can sum resident set sizes (RSS).On x86_64 this is about 8MB.For overcommit 'never', we can take the max of their virtual sizes (VSZ)and add the sum of their RSS.On x86_64 this is about 128MB.Changing this takes effect whenever an application requests memory.
0 0
- linux内存参数笔记
- DDR内存参数笔记
- Linux内存参数介绍
- linux内存参数和oracle参数
- linux 内存管理笔记
- linux内存管理笔记
- 笔记:linux内存管理机制
- [笔记]linux内存管理机制
- Linux内存参数参考-与oracle相关
- Linux内核参数-共享内存信号量设置
- LINUX内存相关的内核参数
- Linux内存参数参考-与oracle相关
- LINUX内存相关的内核参数
- LINUX内存相关的内核参数
- linux下 C程序 参数和内存
- Linux启动命令参数和内存识别
- linux内存子系统常用参数调优
- linux内存管理学习笔记
- 我要开始摇一摇了
- HttpServletResponse 找不到
- java JVM内存分析
- 从一个字符串中剔除连续的字符,只留一个。
- matlab循环读写文件、变量
- linux内存参数笔记
- linux中的task_struct结构体
- mac系统还原和更新
- Bagging和RandomForest学习
- c++的vector和iterator实现
- java 泛型实现原理与类型擦除
- NVARCHAR2和VARCHAR2的小区别
- 用VMware创建虚拟机系统
- 投影矩阵与最小二乘(一)