摘要
本文提出了一种基于POSIX线程库的线程池反馈算法,通过对线程池响应进间和吞吐量进行监控,对线程池的下一步行为进行决策,调整线程池中的线程数及线程单次处理的任务数。实验结果显示,这种算法能很好地稳定线程池吞吐量和响应时间,避免性能出现大幅波动。
In this paper, we propose a feedback algorithm of thread pool based on POSIX thread library. The number of thread and the tasks which will be handled in a single thread is adjusted and the behavior of the thread pool is determined by monitoring the response time and throughput of thread pool. The experiment shows that this algorithm can stabilize the throughput and response time, avoiding the huge performance fluctuation.
出处
《微型电脑应用》
2006年第5期52-55,58,共5页
Microcomputer Applications