欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

性能压测前linux操作系统的检查

程序员文章站 2022-06-03 18:52:33
...

If you run an agent in Linux, you may need to configure ulimit to run many threads. please check followings.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
ulimit -a                                                                                                                                        
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 30676
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 16000
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 32768
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

If your machine has small "max user processes" and "open files" entry when you run "ulimit -a", please make it at least over 10000. Open /etc/security/limits.conf file in the root account and add followings.

1
2
3
4
5
6
7
8
 
root         soft    nproc           32768
root         hard    nproc           32768
root         soft    nofile          16000
root         hard    nofile          16000