针对现有缓冲区替换算法无法充分发挥闪存数据库性能的不足,研究了缓冲区存取方法.根据数据库OLTP应用中IO行为的特点以及闪存的物理特性,提出一种新的缓冲区存取算法——基于页面权重的最近最少使用替换(PWLRU).PWLRU首先对缓冲区内的页面设定权重,在扫描与修改某页面时对权重进行调节,并优先替换权重为零的页面.实验选用基于MYSQL的TPC-C测试标准作为模拟仿真环境,实验结果证明:PWLRU不仅能保证缓存命中率不低于经典的最近最少使用替换算法(LRU),而且在闪存上的IO平均读取代价和能耗均优于LRU和之前面向嵌入式闪存环境提出的先清除-最近最少使用替换算法(CFLRU),是一种特别适合闪存数据库的缓冲区存取算法.
Studied the buffer page replacement methods on flash-based database,in order to address the performance inadequacy of the current methods therein.Proposed a new buffer page replacement algorithm named page-weight-least-recent-used(PWLRU),based on the characteristic analysis of the I/O and the flash media in OLTP application.PWLRU algorithm set sdefault reserved weight for each page in the buffer,and adjusts the weight when the corresponding page is scanned or modified,furthermore,the page with weight zero will be evicted from the buffer.The simulation conducted on the TPC-C benchmark and MYSQL database indicated that PWLRU are more efficient on both energy costs and I/O performance than the traditional least-recent-used(LRU)and clean-first-least-recent-used(CFLRU),which is tailored for the embedded flash environment.Therefore,PWLRU algorithm is suitable for page replacement in flashbased database management system