高级检索

    基于超低延迟SSD的页交换机制关键技术

    Key Techniques of Swapping Mechanism Based on Ultra-Low Latency SSD

    • 摘要: 随着内存密集型应用的快速发展,应用对单机内存容量的需求日益增大. 然而,受到颗粒密度的限制,内存容量的扩展度较低. 页交换机制是进行内存扩展的经典技术,该机制通过将较少使用的内存页面暂存在存储设备,以达到扩展内存的目的. 过去页交换机制由于慢速磁盘的读写速度限制,无法被广泛应用. 近年来,得益于超低延迟固态硬盘(solid state drive, SSD)的快速发展,页交换机制可以利用其低延迟的读写特性,提升页交换效率. 然而,在低I/O延迟的情况下,传统页交换机制的I/O栈存在巨大的软件开销. 首先对使用超低延迟SSD的Linux页交换机制进行测试与分析,发现现有页交换机制的主要瓶颈在于发送请求时存在队头阻塞问题、I/O合并和调度开销,以及内核返回路径上的中断处理和直接内存回收开销. 基于分析结果,提出基于超低延迟SSD的页交换机制Ultraswap.Ultraswap在Linux I/O栈的基础上增加对轮询请求的处理,并降低I/O合并与调度开销,实现轻量级的I/O栈. 基于Ultraswap的I/O栈,对内核页交换机制的换入与换出路径进一步优化. 通过优化对缺页、直接内存回收的处理,降低页交换机制关键路径上的时间开销. 实验结果表明Ultraswap在应用测试场景下相比Linux页交换机制能够提升19%的平均性能;在可使用内存比例为20%的情况下,Ultraswap可达到33%的性能提升.

       

      Abstract: With the rapid increase of memory-intensive applications, memory capacity is playing an increasingly prominent role in application requirements. However, particle density puts constraints on the DRAM memory capacity scalability. The swapping mechanism, known as a common memory-expansion technology, is to temporarily store less-used memory pages in devices to expand memory. In the past, the disk’s read/write speed was the main limit to prevent the wide adoption of the swapping mechanism. In recent years, with the rapid development of ultra-low latency SSDs, the swapping mechanism can take advantage of its low-latency read and write characteristics to improve the efficiency of swapping. The I/O stack of the swapping approach, however, has a significant software overhead with low I/O latency. We analyze and evaluate the Linux swapping mechanism using ultra-low latency SSDs and design Ultraswap, a swapping mechanism based on ultra-low latency SSDs. Ultraswap adds the processing of polling requests to the Linux I/O stack and reduces the I/O merging and scheduling overhead to achieve a lightweight I/O stack. Based on Ultraswap’s I/O stack, the swap-in and swap-out paths of the kernel swapping mechanism are further optimized. By optimizing the handling of faulted pages and direct memory recycling, the time overhead on the critical path of the swapping mechanism is reduced. The results show that Ultraswap can improve the average performance by 19% compared with Linux swapping mechanism; with 20% of local memory, Ultraswap can achieve a 33% performance improvement, effectively reducing the time overhead on the critical path of the swapping path.

       

    /

    返回文章
    返回