节点文献
改进单服务器性能
Improving the Performance of the Single Server
【作者】 姚念民;
【导师】 鞠九滨;
【作者基本信息】 吉林大学 , 计算机软件与理论, 2003, 博士
【摘要】 在计算机与网络的发展过程中,计算机的计算能力和网络的带宽一直在飞速增长。网络上服务器的负载越来越重。如何提高服务器的性能成为当今计算机研究的热点问题。提高服务器性能有两类方法。一类是用多个服务器节点组成服务器群,另一类是充分挖掘单个服务器的潜力。本文的工作专注于第二类方法。主要有以下三个方面: 1) 总结了当前流行的服务器的结构,对各个服务器的结构进行了分类和评述。进而提出了一个新的服务器结构:流水线结构(Pipeline)。并且针对缓存操作提出了“资源管理者模式”。根据上述设计,实现了一个真实的Web 服务器PRWS,并对之做了性能测试。实验表明,PRWS 的性能大大高于其它Web 服务器。2) 针对服务器过载时的性能对Linux 的相关源代码进行了分析。用排队论分析了内核的收包过程,得出了关于服务器在过载时性能的几个结论。基于上述分析提出并在Linux上实现了提高服务器在过载时性能的方法。实验显示这些方法能有效防止活锁现象,大大提高服务器在高负载情况下的性能。3) 重新定义了调度算法的公平性的量度,提出一个新的调度算法即多优先级队列-有限优先权调度算法(MPQ-LP)。处理器共享算法(PS)具有最高的公平性。最短剩余处理时间优先(SRPT)算法具有最小的平均等待时间,即效率。MPQ-LP 结合了这两个算法的优点,它可以根据实际需要在公平性和效率之间进行静态或动态调节,而且对于每一个具体作业,都有固定的最长完成时间,即没有SRPT 调度算法的饿死现象,而且减少了算法的时间复杂度。该算法特别适用于对服务器请求的调度。
【Abstract】 1. Subject: Improving the Performance of the Single Server 2. Major: Computer’s Software and Theory 3. Tutor: Professor Ju Jiu-Bin 4. Content: Now the performance of Web servers play a key role in satisfying the needs of a large and growing community of Web users. How to improve the performance of servers is the hot spot in the study of the current computer science. There are two kinds of methods to improve the servers’performance. One is to make use of many servers to compose of a cluster of servers. And the other one which is the main focus of this paper is to make full use of the single server. The works described in this paper are listed below: (1) Methods to improve the performance of Web servers are summarized and architectures of existing Web servers are analyzed in this paper. A new taxonomy of architectures of servers is presented. Based on above analysisses, we point out the future development direction of servers’architecture design. Architectures of servers, namely the server’s concurrency and I/O strategies, have very important effects on their performance. This paper indicates some shortcomings of the existing design of servers’architectures and presents some design principals. (2) Based on the analysisses of the servers’architectures, a new architecture of servers “pipeline”is presented in this paper. The pipeline architecture accords with the design principles we point out, and it has many virtues such as good concurrency, full use of the SMP, decreasing the fragments of RAM, fine modularity and so on. We implemented simple prototypes of pipeline and thread pool servers based on the same code base and tested their performance. The test results indicate that in performance pipeline servers are much better than thread pool servers. (3) Dealing with the cache in servers should be very careful. The reason is that the operations on the cache must be mutually exclusive and there may be I/O operations while updating the cache. So the situation that many worker threads are waiting for operating on the cache and blocked may happen. To avoid this problem, a design pattern “resource manager”is proposed in this paper. (4) A real Web server namely PRWS (Pipeline and Resource Manager Web Server) is