摘要: 提出一种基于分段的线程池尺寸自适应调整算法。该算法将用户请求量分为上升段、平衡段和下降段3段,根据当前用户请求数、线程数自适应调整线程池尺寸,从而满足用户需求。实验结果表明,相比基于平均数的调整算法,该算法能更好地处理并发的用户请求,响应时间更短。
关键词:
线程池,
并发用户请求,
尺寸自适应调整
Abstract: This paper presents a thread pool size adaptive adjusting algorithm based on segmentation. User request quantity is divided into rising balancing and dropping section. This algorithm changes the size of the thread pool based on present request and thread in order to meet need of user requirement. Experimental results show that this algorithm can effectively process multiple concurrent requests, its response time is shorter compared with adjusting algorithm based average value.
Key words:
thread pool,
concurrent user request,
size adaptive adjusting
中图分类号:
孙旭东, 韩江洪, 刘征宇, 解新胜. 基于分段的线程池尺寸自适应调整算法[J]. 计算机工程, 2011, 37(2): 43-44.
SUN Xu-Dong, HAN Jiang-Hong, LIU Zheng-Yu, JIE Xin-Qing. Thread Pool Size Adaptive Adjusting Algorithm Based on Segmentation[J]. Computer Engineering, 2011, 37(2): 43-44.