- 论坛徽章:
- 0
|
本帖最后由 剑啸易水寒 于 2013-05-08 17:34 编辑
lvs+keepalived--->nginx+apache 结构,未上lvs前nginx+phpcgi单台并发2K,
LVS:(DR模式)
Prot LocalAddress ort Scheduler Flags
-> RemoteAddress ort Forward Weight ActiveConn InActConn
TCP 192.168.3.100:80 wlc persistent 60
-> 192.168.3.101:80 Route 100 447 614
-> 192.168.3.102:80 Route 100 481 330
同一台RS:
netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}'
TIME_WAIT 2236
FIN_WAIT1 4
FIN_WAIT2 2
ESTABLISHED 437
SYN_RECV 18
CLOSING 1
LAST_ACK 12
页面: http://localhost/status
Active connections: 11780
server accepts handled requests
390245 390245 1834096
Reading: 614 Writing: 834 Waiting: 10332
两种查看并发的方法,数据差距很大
是否是内核设置或者长连接问题?该从何处入手?
lvs :
ipvsadm -Ln --timeout
Timeout (tcp tcpfin udp): 120 60 120
nginx:
keepalive_timeout 60;
proxy_connect_timeout 600;
proxy_send_timeout 600;
proxy_read_timeout 600;
apache:
Timeout 30
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
请各位帮忙看一下是什么问题。谢谢。 |
|