前几天进行线上的压测,发现应用的性能比之前还降低了就进行了一些分析。应用的结构是基础的apache+mod_jk+jboss的模式。主要的原因是之前的很多默认参数设置不合理,比如jk的配置worker.list=localworker.local.type=ajp13worker.local.host=localhostworker.local.port=8001worker.local.lbfactor=50worker.local.cachesize=100 #当前配置大于每个进程的最多线程数50,需要减小worker.local.cache_timeout=600 #闲置连接的清理时间worker.local.socket_keepalive=1worker.local.recycle_timeout=300 # #作用和cachesize类似但是在non-cache 的时候也能用
11:17:02.983554 IP (tos 0x0, ttl 64, id 26914, off set 0, flags [DF], proto 6, length: 60) 127.0.0.1.47060 > 127.0.0.1.7001: S [tcp sum ok] 3713142601:3713142601(0) win 3276711:17:02.983570 IP (tos 0x0, ttl 64, id 0, off set 0, flags [DF], proto 6, length: 60) 127.0.0.1.7001 > 127.0.0.1.47060: S [tcp sum ok] 3721181851:3721181851(0) ack 3713142602 win 32767 13:05:37.104641 IP (tos 0x0, ttl 64, id 0, off set 0, flags [DF], proto 6, length: 60) 127.0.0.1.7001 > 127.0.0.1.47265: S [tcp sum ok] 2010311520:2010311520(0) ack 2018476636 win 3276713:05:45.476963 IP (tos 0x0, ttl 64, id 17630, off set 0, flags [DF], proto 6, length: 60) 127.0.0.1.47280 > 127.0.0.1.7001: S [tcp sum ok] 2021138150:2021138150(0) win 3276713:05:45.476981 IP (tos 0x0, ttl 64, id 0, off set 0, flags [DF], proto 6, length: 60) 127.0.0.1.7001 > 127.0.0.1.47280: S [tcp sum ok] 2016571274:2016571274(0) ack 2021138151 win 3276713:06:11.061661 IP (tos 0x0, ttl 64, id 48536, off set 0, flags [DF], proto 6, length: 52) 127.0.0.1.7001 > 127.0.0.1.47265: F [tcp sum ok] 1642:1642(0) ack 467 win 819213:06:17.641781 IP (tos 0x0, ttl 64, id 13753, off set 0, flags [DF], proto 6, length: 52) 127.0.0.1.7001 > 127.0.0.1.47280: F [tcp sum ok] 1642:1642(0) ack 467 win 8192