| 本文已被:浏览 5313次 下载 6779次 |
 码上扫一扫! |
|
|
| 基于序列模式的Servlet容器缓存替换 |
|
李洋1,2, 张文博1,2, 魏峻1, 钟华1, 黄涛1
|
|
1.中国科学院,软件研究所,软件工程技术中心,北京,100080;2.中国科学院,研究生院,北京,100049
|
|
| 摘要: |
| Servlet缓存能够有效地提高Servlet容器的吞吐量,缩短用户请求的响应时间.然而,Servlet缓存的性能受到缓存替换算法的影响.Servlet容器中的Servlet对应着一定的业务功能,挖掘Servlet之间的业务关联来指导缓存替换算法的设计可以提高Servlet缓存的命中率,进而提高Servlet容器的性能.然而,目前常见的LRU(least recently used),LFU(least frequently used),GDSF(greedy dual size frequency)等缓存替换算法均没有考虑上述问题.将Servlet对应的业务关联定义为Servlet容器序列模式,并提出k步可缓存转移概率图的概念加以表示,给出了序列模式发现算法KCTPG_Discovery.最后,基于Servlet容器序列模式设计了缓存替换算法KP-LRU(k-steps prediction least recently used)和KP-GDSF(k-steps prediction least frequently used).实验结果表明,KP-LRU与KP-GDSF算法比对应的LRU算法和GDSF算法具有更高的缓存命中率,有效地提高了Servlet容器的性能. |
| 关键词: Servlet缓存 序列模式 序列模式发现 缓存替换算法 |
| DOI: |
| 分类号: |
| 基金项目:Supported by the National Natural Science Foundation of China under Grant No.60573126 (国家自然科学基金); the National Basic Research Program of China under Grant No.2002CB312005 (国家重点基础研究发展计划(973)) |
|
| Sequential Patterns-Based Cache Replacement in Servlet Container |
|
LI Yang,ZHANG Wen-Bo,WEI Jun,ZHONG Hua,HUANG Tao
|
| Abstract: |
| Servlet cache can effectively improve the throughput of Servlet container and reduce the response time experienced by the users. But the cache effect is dependent on the hit rate determined by the cache replacement algorithms. Servlets represent some business functions, so mining the business association among Servlets can improve the hit rate of cache replacement algorithms which in turn exhances the performance of Servlet container consequently. However existing literatures such as LRU (least recently used), LFU (least frequently used), GDSF (greedy dual size frequency) rarely take into account the relationships between the Servlets. This paper denotes the business associations as sequential patterns of Servlet container, and presents a k-steps transfer probability graph to denote the access sequential patterns of Servlet container and designs a sequential patterns discovery algorithm KCTPG_Discovery. Two cache replacement algorithms KP-LRU and KP-GDSF are introduced based on the research of the sequential patterns of the Servlets. Comparing with the traditional algorithms such as LRU and GDSF, the experimental results confirm that the hit radio of the cache can be enhanced by using the above algorithms, the two algorithms effectively improve the performance of Servlet container. |
| Key words: Servlet caching sequential pattern sequential pattern discovery cache replacement algorithm |