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 ...
随机推荐
- Yii 2.0 数据库操作总结
1. 概述 操作数据库有2种方式: DAO(data access object),不安全 ORM(onject relational mapping) 2. DAO Yii::app()->d ...
- HDU1285 确定比赛名次
有N个比赛队(<=N<=),编号依次为1,,,....,N进行比赛,比赛结束后,裁判委员会要将所有参赛队伍从前往后依次排名,但现在裁判委员会不能直接获得每个队的比赛成绩,只知道每场比赛的结 ...
- java Web Servlet学习笔记-1 HttpServletQequest对象的学习
HttpServletQequest对象的学习 HttpServletRequest HttpServletRequest对象代表客户端的请求,当客户端通过HTTP协议访问服务器时,HTTP请求 ...
- EasyUI DataGrid使用示例
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="EasyUIDemo.aspx. ...
- python重试(指数退避算法)
本文实现了一个重试的装饰器,并且使用了指数退避算法.指数退避算法实现还是很简单的.先上代码再详细解释. 1.指数退避算法 欠奉.http://hugnew.com/?p=814 2.重试装饰器retr ...
- win10 UWP MessageDialog 和 ContentDialog
我之前开发一个软件 winMarkdown,这个软件在关闭需要提示用户还没有保存东西,需要保存,如果用户选择退出,那么把数据存放. 在Metro程序中,没有传统的窗口,当我们要用需要交互的消息提示时, ...
- win10 uwp iot
这篇文章主要译: https://msdn.microsoft.com/magazine/mt694090 有很多都是胡说,随便喷,但我不会理. https://blogs.msdn.microsof ...
- session多服务器共享的方案
session的存储了解以前是怎么做的,搞清楚了来龙去脉,才会明白进行共享背后的思想和出发点.我喜欢按照这样的方式来问(或者去搞清楚):为什么要session要进行共享,不共享会什么问题呢? php中 ...
- 【ASP.NET MVC 学习笔记】- 15 Unobtrusive Ajax
本文参考:http://www.cnblogs.com/willick/p/3418517.html 1.Unobtrusive Ajax允许我们通过 MVC 的 Help mothod 来定义 Aj ...
- 【ASP.NET MVC 学习笔记】- 08 URL Routing
本文参考:http://www.cnblogs.com/willick/p/3343105.html 1.URL Routing告诉MVC如何正确的定位Controller和Action. 2.URL ...