前言
今天进行压力测试,一顿操作猛如虎,回头一看报错了,你问我怎么办?
看情况,分析问题,随机应变:
### 基本配置
[
root@VM_10_190_centos ~]# sysctl -p /etc/sysctl.conf
net.ipv4.ip_forward = 0
net.nf_conntrack_max = 655360
net.netfilter.nf_conntrack_tcp_timeout_established = 1200
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 0
kernel.msgmnb = 65536
kernel.msgmax = 65536
net.ipv6.conf.lo.disable_ipv6 = 1
net.ipv4.conf.all.promote_secondaries = 1
net.ipv4.conf.default.promote_secondaries = 1
net.ipv6.neigh.default.gc_thresh3 = 4096
net.ipv4.neigh.default.gc_thresh3 = 4096
kernel.softlockup_panic = 1
kernel.sysrq = 1
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
kernel.numa_balancing = 0
kernel.shmmax = 68719476736
kernel.printk = 5
fs.inotify.max_user_instances = 1024
fs.inotify.max_user_watches = 81920000
以下才是关键:
ab -n 10000 -c1000 -r http://xxxx
问题解决