???????????е??????飬??????????????????????????/proc/sys ????????????Щ???????????????????????????????????????????????????????????????????????????????????????????????? ??????????????sysctl -a ????????Щ????????????????????????????????????????????
??????? / proc/sys/fs ???μ???????
????/proc/sys/fs ???μ?????????????????й??????????????????????????????????μ???????????
????/proc/sys/fs/fs/file-max?????????????????????? ???????????????<<linux ???????????>>???????????????Ч??????????Щ???????????????????/proc/sys/fs/file-max ????ó????????/proc/sys/fs/inode-max ?????/proc/sys/fs/fs/file-max ???3-4??????????????i ??????????á?
?????????????fs.file-max???????
/proc/sys/fs/file-max
This file defines a system-wide limit on the number of open files for all processes. (See also setrlimit(2)?? which can be used by a process to set the per-process limit??
RLIMIT_NOFILE?? on the number of files it may open.) If you get lots of error messages about running out of file handles?? try increasing this value:
echo 100000 > /proc/sys/fs/file-max
The kernel constant NR_OPEN imposes an upper limit on the value that may be placed in file-max.
If you increase /proc/sys/fs/file-max?? be sure to increase /proc/sys/fs/inode-max to 3-4 times the new value of /proc/sys/fs/file-max?? or you will run out of inodes.
????/proc/sys/fs/epoll/max_user_watches?????????????epoll ????????????????????? ??????????????????epoll??????????????????????????????epoll????????????????????epoll???????????????????????32λ??????????90???????????64λ??????????160?????????????????????????????epoll????????????????
???????? /proc/sys/net ???μ???????
?????????????????????????λ??/proc/sys/net ???£????к?TCP/IP Э????????????λ?????????????У?core ??ipv4 ??ipv6 ??
/proc/sys/net/core/somaxconn?????listen???????????????????????????????ESTABLISHED ????socket ????????
/proc/sys/net/ipv4/tcp_max_syn_backlog?????listen??????????????????ESTABLISHED????SYN_RCVD????socket????????
/proc/sys/net/ipv4/tcp_wmem??????????3??????????????socket??TCPд????????С?????????????
/proc/sys/net/ipv4/tcp_rmem??????????3??????????????socket??TCP??????????С?????????????
/proc/sys/net/ipv4/tcp_syncookies?????????TCP????????????????????cookie ????????????socket????????????????????????????????????????Σ?????????listen???????????????ν??SYN ?籩????
???????????????????????????????Щ????????????????????sysctl ??????????????????????????????????????????????/etc/sysctl.conf ????м???????????????????????????sysctl -p????Ч???????????????????????????????????