linux系统高并发socket最大连接数优化

参考:https://lanjingling.github.io…

可以通过ulimit –a命令来查看系统的一些资源限制情况,如下

# ulimit -a
core file size          (blocks, -c) 1024
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 127422
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 20480
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) unlimited
cpu time               (seconds, -t) unlimited
max user processes              (-u) 81920
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

# 注意:这里重点关注open files和max user processes。分别表示:单个进程打开的最大文件数;系统可以申请最大的进程数。
    原文作者:YPHP
    原文地址: https://segmentfault.com/a/1190000007959713
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞