Linux机器内核参数理解(一)

一、fs.aio-nr & fs.aio-max-nr

aio-nr is the running total of the number of events specified on the
io_setup system call for all currently active aio contexts. If aio-nr
reaches aio-max-nr then io_setup will fail with EAGAIN. Note that
raising aio-max-nr does not result in the pre-allocation or re-sizing
of any kernel data structures.
aio-nr shows the current system-wide number of asynchronous io requests.  
aio-max-nr allows you to change the maximum value aio-nr can grow to.
​
aio-nr      当前系统上的异步IO请求个数
aio-max-nr  系统上允许同时进行的最大异步IO请求个数
#查看
$ cat /proc/sys/fs/aio-nr
1536
$ cat /proc/sys/fs/aio-max-nr
65536

二、fs.file-max & fs.file-nr

The value in file-max denotes the maximum number of file-
handles that the Linux kernel will allocate. When you get lots
of error messages about running out of file handles, you might
want to increase this limit.
​
Historically,the kernel was able to allocate file handles
dynamically, but not to free them again. The three values in
file-nr denote the number of allocated file handles, the number
of allocated but unused file handles, and the maximum number of
file handles. Linux 2.6 always reports 0 as the number of free
file handles -- this is not an error, it just means that the
number of allocated file handles exactly matches the number of
used file handles.
​
max-file 表示系统级别的能够打开的文件句柄的数量。是对整个系统的限制,并不是针对用户的。
file-nr 三个值分别是系统级别当前打开的文件句柄数量、已经打开但是未使用的文件句柄数量、系统级别支持的最大文件句柄数量
​
#查看
$ cat /proc/sys/fs/file-max
95296
$ cat /proc/sys/fs/file-nr
992 0   95296

三、fs.nr_open

This denotes the maximum number of file-handles a process can
allocate. Default value is 1024*1024 (1048576) which should be
enough for most machines. Actual limit depends on RLIMIT_NOFILE
resource limit.
​
nr_o
  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值