fs-max、file-nr和nofile的关系
1. file-max
/proc/sys/fs/file-max:
这个文件决定了系统级别所有进程可以打开的文件描述符的数量限制,如果内核中遇到VFS: file-max limit <number> reached
的信息,那么就提高这个值。
设置方式:
# /etc/sysctl.conf
fs.file-max = 6553500
sysctl -p
2. file-nr
这个是一个状态指示的文件,一共三个值,第一个代表全局已经分配的文件描述符数量,第二个代表自由的文件描述符(待重新分配的),第三个代表总的文件描述符的数量。
cat /proc/sys/fs/file-nr
3. nofile
nofile全称number of open files
,最大可打开的文件描述符数量,这个限制是针对用户和进程来说的。
3.1. 全局修改,永久生效,需要重启
# /etc/security/limits.conf
* soft nofile 65535
* hard nofile 65535
注意:对于ubuntu系统,还需要加载相应的pam模块才能生效
# /etc/pam.d/login
# Sets up user limits according to /etc/security/limits.conf
# (Replaces the use of /etc/limits in old login)
session required pam_limits.so
3.2. 临时调整
ulimit -HSn 655350
fs-max、file-nr和nofile的关系的更多相关文章
- supervisor监管进程max file descriptor配置不生效的问题
配置了 sudo vim /etc/security/limits.conf * soft nofile * hard nofile 单独起进程没问题, 放到supervisor下监管启动,则报错 ...
- ES部署报错 max file size 和 kibana 报错File size limit exceeded
启动失败一 ERROR: [2] bootstrap checks failed [1]: max file descriptors [4096] for elasticsearch process ...
- 安装排错 max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
https://blog.csdn.net/cookzrk/article/details/80179006 转载:https://my.oschina.net/u/2510243/blog/8105 ...
- 记一次环境变量导致的elasticsearch启动错误:max file descriptors [65535] for elasticsearch process is too low, incre
问题描述,elasticsearch启动时报max file descriptors错误: [hadoop@node-33 elasticsearch-5.4.0]$ bin/elasticsearc ...
- 3ds Max File Format (Part 3: The department of redundancy department; Config)
Now we'll have a look at the Config stream. It begins like follows, and goes on forever with various ...
- 3ds Max File Format (Part 1: The outer file format; OLE2)
The 3ds Max file format, not too much documentation to be found about it. There are some hints here ...
- FS,FT,DFT,DFS和DTFT的关系
对于初学数字信号(Digital Signal Processing,DSP)的人来说,这几种变换是最为头疼的,它们是数字信号处理的理论基础,贯穿整个信号的处理. FS:时域上任意连续的周期信号可以分 ...
- linux alsa音频中采样率fs、比特率BCLK 、主时钟MCLK关系
转:https://blog.csdn.net/lugandong/article/details/72468831 一.拿512fs说话: 看图知道采样的位深是32bit(位),左右声道各占了8*3 ...
- 3ds Max File Format (Part 5: How it all links together; ReferenceMaker, INode)
At this point, you should start to familiarize yourself a bit with the publicly available 3ds Max AP ...
随机推荐
- Android02-控件
在android studio中,新建一个module时布局文件中就会默认带一个TextView,里面显示着一句话:Hello World ! 布局中通常放置的是android控件,下面介绍几个an ...
- vue2购物车ch1-(安装依赖、简单配置、 axios获取api的模拟数据)
0--项目说明 说明此项目源自某课网购物车教程,但是在开发过程中,发现在开发过程中用的还是 vue-resource(宣布不更新的类$.ajx()插件),为了以后的发展使用axios.js,详情参考 ...
- Java面向对象 集合(下)
Java面向对象 集合(下) 知识概要: (1)Map集合的体系结构 (2)Map集合的方法 (3)HashMap TreeMap (4)集合框架中的常用工具类 ( ...
- ReactiveCocoa基础和一些常见类介绍
一 导入ReactiveCocoa框架 通常都会使用CocoaPods(用于管理第三方框架的插件)帮助我们导入 podfile如果只描述pod 'ReactiveCocoa', '~> 4.0. ...
- log4j2配置文件解读
log4j2可以按照开发人员预先的设定,在指定的位置和情况下打印log语句,并且可以酌情关闭某些log语句,如开发阶段debug类型的语句等.并且,可以使用layout来定义输出语句的格式. 使用前需 ...
- 博客发在oschina
国内git.oschina做的很好,看到oschina还有博客 直接导入csdn博客 http://my.oschina.net/lindexi/blog
- ASP.NET没有魔法——ASP.NET MVC 直连路由(特性路由)
之前对Controller创建的分析中,知道了Controller的创建是有两个步骤组成,分别是Controller的类型查找以及根据类型创建Controller实例. 在查询Controller的类 ...
- 关于EF Code First模式不同建模方式对建表产生的影响
今天在学EF Code First模式的时候,发现几个很有趣的问题,问题如下: 1.当编写玩实体后,不指定任何主键约束,EF会找长的最像Id的,然后设置其为主键,验证代码如下: //User类 cla ...
- LINUX 笔记-grep命令
grep [-acinv] [--color=auto] '查找字符串' filename 它的常用参数如下: -a :将binary文件以text文件的方式查找数据 -c :计算找到'查找字符串'的 ...
- C++内联函数(03)
在C++中我们通常定义以下函数来求两个整数的最大值: 代码如下: int max(int a, int b){ return a > b ? a : b;} 为这么一个小的操作定义一个函数的好处 ...