用轻量级线程重温用户空间的交换
Revisiting Swapping in User-space with Lightweight Threading
摘要:
内存密集型应用程序,如内存数据库、缓存系统和键值存储,越来越需要更大的主内存来适应其工作集。传统的交换可以通过将非活动页分页到磁盘来扩大内存容量。然而,繁重的I/O堆栈使得传统的基于内核的交换受到一些关键性能问题的影响。在本文中,我们重新设计了交换系统,并提出了LightSwap,一个高性能的用户空间交换计划,支持本地SSD和远程内存分页。首先,为了避免涉及内核,提出了一种新的页面错误处理机制,在用户空间处理页面错误,并进一步消除了沉重的I/O堆栈的帮助下,用户空间的I/O驱动程序。其次,我们将Lightswap与轻量级线程(LWT)进行协同设计,以提高系统吞吐量,并使其对用户应用程序透明。最后,我们在Lightswap中提出了一个try-catch框架来处理由于进程技术的扩展而加剧的分页错误。我们在生产级系统中实现了Lightswap,并使用在memcached上运行的YCSB工作负载对其进行了评估。实验结果表明,与现有交换系统相比,Ligthswap减少了3--5倍的页面错误处理延迟,提高了memcached的吞吐量40%以上。
英文摘要:
Memory-intensive applications, such as in-memory databases, caching systems and key-value stores, are increasingly demanding larger main memory to fit their working sets. Conventional swapping can enlarge the memory capacity by paging out inactive pages to disks. However, the heavy I/O stack makes the traditional kernel-based swapping suffers from several critical performance issues. In this paper, we redesign the swapping system and propose LightSwap, an high-performance user-space swapping scheme that supports paging with both local SSDs and remote memories. First, to avoids kernel-involving, a novel page fault handling mechanism is proposed to handle page faults in user-space and further eliminates the heavy I/O stack with the help of user-space I/O drivers. Second, we co-design Lightswap with light weight thread (LWT) to improve system throughput and make it be transparent to user applications. Finally, we propose a try-catch framework in Lightswap to deal with paging errors which are exacerbated by the scaling in process technology. We implement Lightswap in our production-level system and evaluate it with YCSB workloads running on memcached. Results show that Ligthswap reduces the page faults handling latency by 3--5 times, and improves the throughput of memcached by more than 40% compared with the stat-of-art swapping systems.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。