Author: Chen Yan Fan Xinyuan Yang Wenjun Chen Kai Xu Guozhi
Publisher: Inderscience Publishers
ISSN: 1740-0562
Source: International Journal of High Performance Computing and Networking, Vol.3, Iss.1, 2005-09, pp. : 33-44
Disclaimer: Any content in publications that violate the sovereignty, the constitution or regulations of the PRC is not accepted or approved by CNPIEC.
Abstract
Recent research has revealed that the conventional threaded programming model exhibits poor performance under high concurrency workloads. Moreover, with emerging stateful network services, where concurrent states can go to thousands, the traditional 'thread per request' solution is no longer feasible. To meet this challenge, people promote a new parallel programming model, stage-based programming, where the whole service logic is viewed as a set of stages, each driven by a limited number of threads and capable of communicating with others through message passing. In this paper, we show two main streams of stage design, Thread-Over-Stages and Thread-Per-Stage. Due to the advantages in Thread-Per-Stage, we promote this solution and reveal three key design principles for delivering a high performance stage-based design. They are: on a uniprocessor system, the number of stages should not be too large - for most fine grained network services, it should not be over ten; for stages with blocking calls, a good estimation of the number of threads for that stage can be gotten by (call arrival rate × blocking time); and to deliver temporary messages quickly, it is much better to locate this part of the services in a separate nonblocking stage. We implement a sample SIP proxy server to prove our arguments.
Related content
Efficient high-level parallel programming
Theoretical Computer Science, Vol. 196, Iss. 1, 1998-04 ,pp. :
The model of queueing network with parallel routes
By Dudin A. Lee Moon Choe Chang-Hui
Automation and Remote Control, Vol. 68, Iss. 6, 2007-06 ,pp. :