一、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