关于web服务器访问速度慢的一些简单解决方法
首先要考虑下 访问的用户:
[root@app opt2]# netstat -ant | grep $ip:80 tcp 0 0 :::80 :::* LISTEN tcp 0 0 ::ffff:192.168.100.101:80 ::ffff:116.237.64.142:54210 TIME_WAIT tcp 0 0 ::ffff:192.168.100.101:80 ::ffff:120.198.245.30:57527 TIME_WAIT tcp 0 0 ::ffff:192.168.100.101:80 ::ffff:68.180.228.177:35642 ESTABLISHED tcp 0 128969 ::ffff:192.168.100.101:80 ::ffff:111.63.38.146:54201 FIN_WAIT1 tcp 0 0 ::ffff:192.168.100.101:80 ::ffff:66.249.67.98:57447 TIME_WAIT tcp 0 0 ::ffff:192.168.100.101:80 ::ffff:106.120.173.78:38925 ESTABLISHED tcp 0 0 ::ffff:192.168.100.101:80 ::ffff:66.249.67.98:55787 TIME_WAIT tcp 0 0 ::ffff:192.168.100.101:80 ::ffff:221.204.172.135:3905 FIN_WAIT2 tcp 0 0 ::ffff:192.168.100.101:80 ::ffff:68.180.228.177:34300 TIME_WAIT tcp 0 0 ::ffff:192.168.100.101:80 ::ffff:116.237.64.142:54208 TIME_WAIT tcp 0 0 ::ffff:192.168.100.101:80 ::ffff:116.237.64.142:54117 TIME_WAIT tcp 0 0 ::ffff:192.168.100.101:80 ::ffff:116.237.64.142:54211 TIME_WAIT tcp 0 0 ::ffff:192.168.100.101:80 ::ffff:66.249.67.92:47812 TIME_WAIT tcp 0 0 ::ffff:192.168.100.101:80 ::ffff:221.204.172.135:3907 FIN_WAIT2 tcp 0 0 ::ffff:192.168.100.101:80 ::ffff:221.204.172.135:3911 FIN_WAIT2 tcp 0 0 ::ffff:192.168.100.101:80 ::ffff:119.40.43.155:63376 ESTABLISHED tcp 0 0 ::ffff:192.168.100.101:80 ::ffff:66.249.67.92:45346 ESTABLISHED
当然我们也可以对ip进行 过来和统计
[root@app opt2]# netstat -ant | grep $ip:80 | grep EST | wc -l 2
当然关于更多的 netstat命令的状态解析请移步到: 这里
这里如果你的网站访问过慢还有一个可能就是 你的apache工作模式的调试 mpm的设置。如果设置不当,可能会导致资源利用不合理从而使网站访问过慢。这个问题网上资料比较多我这里就只指个方向。apache工作模式 即可获得更多信息