最终50个请求共产生24个线程,总用时约35.9秒。
光看数据不够形象,用简单的代码把数据转换成图形吧,下面是100个请求的处理过程。
498)this.width=498;'' onmousewheel = ''javascript:return big(this)'' alt="" src="http://images.myeducs.cn/files/uploadimg/20120331/1113511.png" />
我们可以看到,当WEB线程长时间被占用时,请求会由于线程池而阻塞,同时产生大量的线程,最终响应时间变长。
作为对比,我们列出处理时间10毫秒的数据。
- TId:6 App:44665200 Begin:41:07,9932 End:41:08,0032 TPool:2
- TId:5 App:37489757 Begin:41:07,9932 End:41:08,0032 TPool:2
- TId:5 App:44665200 Begin:41:08,0042 End:41:08,0142 TPool:2
- TId:6 App:37489757 Begin:41:08,0052 End:41:08,0152 TPool:2
- TId:5 App:44665200 Begin:41:08,0142 End:41:08,0242 TPool:2
- TId:6 App:37489757 Begin:41:08,0152 End:41:08,0252 TPool:2
- TId:5 App:44665200 Begin:41:08,0242 End:41:08,0342 TPool:2
- TId:6 App:37489757 Begin:41:08,0252 End:41:08,0352 TPool:2
- TId:5 App:44665200 Begin:41:08,0342 End:41:08,0442 TPool:2
- TId:6 App:37489757 Begin:41:08,0352 End:41:08,0452 TPool:2
- TId:5 App:44665200 Begin:41:08,0442 End:41:08,0542 TPool:2
- TId:6 App:37489757 Begin:41:08,0452 End:41:08,0552 TPool:2
- TId:5 App:44665200 Begin:41:08,0542 End:41:08,0642 TPool:2
- TId:6 App:37489757 Begin:41:08,0552 End:41:08,0652 TPool:2
- TId:5 App:44665200 Begin:41:08,0642 End:41:08,0742 TPool:2
- TId:6 App:37489757 Begin:41:08,0652 End:41:08,0752 TPool:2
- TId:5 App:44665200 Begin:41:08,0742 End:41:08,0842 TPool:2
- TId:6 App:37489757 Begin:41:08,0752 End:41:08,0852 TPool:2
- TId:5 App:44665200 Begin:41:08,0842 End:41:08,0942 TPool:2
- TId:6 App:37489757 Begin:41:08,0852 End:41:08,0952 TPool:2
- TId:5 App:44665200 Begin:41:08,0942 End:41:08,1042 TPool:2
- TId:6 App:37489757 Begin:41:08,0952 End:41:08,1052 TPool:2
- TId:5 App:44665200 Begin:41:08,1042 End:41:08,1142 TPool:2
- TId:6 App:37489757 Begin:41:08,1052 End:41:08,1152 TPool:2
- TId:5 App:44665200 Begin:41:08,1142 End:41:08,1242 TPool:2
- TId:6 App:37489757 Begin:41:08,1152 End:41:08,1252 TPool:2
- TId:5 App:44665200 Begin:41:08,1242 End:41:08,1342 TPool:2
- TId:6 App:37489757 Begin:41:08,1252 End:41:08,1352 TPool:2
- TId:5 App:44665200 Begin:41:08,1342 End:41:08,1442 TPool:2
- TId:6 App:37489757 Begin:41:08,1352 End:41:08,1452 TPool:2
- TId:5 App:44665200 Begin:41:08,1442 End:41:08,1542 TPool:2
- TId:6 App:37489757 Begin:41:08,1452 End:41:08,1552 TPool:2
- TId:5 App:44665200 Begin:41:08,1542 End:41:08,1642 TPool:2
- TId:6 App:37489757 Begin:41:08,1552 End:41:08,1652 TPool:2
- TId:5 App:44665200 Begin:41:08,1642 End:41:08,1742 TPool:2
- TId:6 App:37489757 Begin:41:08,1652 End:41:08,1752 TPool:2
- TId:5 App:44665200 Begin:41:08,1742 End:41:08,1842 TPool:3
- TId:7 App:12547953 Begin:41:08,1752 End:41:08,1852 TPool:3
- TId:6 App:37489757 Begin:41:08,1762 End:41:08,1862 TPool:3
- TId:5 App:44665200 Begin:41:08,1842 End:41:08,1942 TPool:3
- TId:7 App:12547953 Begin:41:08,1852 End:41:08,1952 TPool:3
- TId:6 App:37489757 Begin:41:08,1862 End:41:08,1962 TPool:3
- TId:5 App:44665200 Begin:41:08,1942 End:41:08,2042 TPool:3
- TId:7 App:12547953 Begin:41:08,1952 End:41:08,2092 TPool:3
- TId:6 App:37489757 Begin:41:08,1962 End:41:08,2102 TPool:3
- TId:5 App:44665200 Begin:41:08,2052 End:41:08,2152 TPool:3
- TId:7 App:12547953 Begin:41:08,2092 End:41:08,2192 TPool:3
- TId:6 App:37489757 Begin:41:08,2102 End:41:08,2202 TPool:3
- TId:5 App:44665200 Begin:41:08,2152 End:41:08,2252 TPool:3
- TId:7 App:12547953 Begin:41:08,2192 End:41:08,2292 TPool:3
共