计算机与现代化

• 网络与通信 • 上一篇    下一篇

面向网络流量的缓存替换算法比较与分析

  

  1.  (1. 中国科学院声学研究所国家网络新媒体工程技术研究中心,北京100190;
      2. 中国科学院大学电子电气与通信工程学院,北京100049)
  • 收稿日期:2018-11-21 出版日期:2019-08-15 发布日期:2019-08-16
  • 作者简介:曹作伟(1991-),男,湖南安乡人,博士研究生,研究方向:软件定义网络,可编程数据平面,E-mail: caozw@dsp.ac.cn; 陈晓(1964-),男,研究员,硕士,研究方向:网络通信,新媒体技术; 倪宏(1964-),男,研究员,硕士,研究方向:网络通信,新媒体技术。
  • 基金资助:
    国家科技重大专项资助项目(2017ZX03001019)

Comparison and Analysis of Cache Replacement Algorithms for Network Traffic

  1. (1. National Network New Media Engineering Research Center, Institute of Acoustics,
      Chinese Academy of Sciences, Beijing 100190, China; 2. School of Electronic, Electrical and Communication
      Engineering, University of Chinese Academy of Sciences, Beijing 100049, China)
  • Received:2018-11-21 Online:2019-08-15 Published:2019-08-16

摘要: 缓存替换算法对优化网络处理应用的性能起到关键作用,但目前面向网络流量的缓存替换算法研究主要集中在算法设计和领域应用方面,较少有文献对现有的缓存替换算法在网络环境下的性能进行分析比较。对此,本文针对主要的6种缓存替换算法进行分析和比较。通过分析网络流量的新近度与频度特征,为基于最近最少使用(Least Recently Used, LRU)和最近最不常使用(Least Frequently Used, LFU)的缓存替换算法给出实际依据。对仿真环境和实际系统的实验结果表明,类LRU算法较LFU算法更适用于网络流量,而缓存空间较大时,随机替换算法较LRU算法更适用于多核环境。

关键词: 网络流量特征, 缓存替换算法, LRU算法, LFU算法

Abstract: The cache replacement algorithm plays a key role in optimizing the performance of network processing applications. The research on cache replacement algorithms for network traffic is mainly concentrated on the design and application of cache replacement algorithm. Yet analysis and comparative study for the performance of the existing cache replacement algorithm in the network environment are fewer. This paper analyzes and compares six major cache replacement algorithms. By analyzing the recency and frequency characteristics of network traffic, the practical basis for the cache replacement algorithm based on Least Recently Used (LRU) and Least Frequently Used (LFU) is given. The experimental results of the simulation environment and the actual system show that the LRU-like algorithm is more suitable for network traffic than the LFU algorithm, and the random replacement algorithm is more suitable for the multi-core environment than the LRU algorithm.

Key words: network traffic characteristics, cache replacement algorithm, LRU algorithm, LFU algorithm

中图分类号: