Soft Updates Made Simple and Fast on Non-Volatile Memory

Soft Updates Made Simple and Fast on Non-Volatile Memory

Soft Updates Made Simple and Fast on Non-volatile Memory Mingkai Dong and Haibo Chen, Institute of Parallel and Distributed Systems, Shanghai Jiao Tong University https://www.usenix.org/conference/atc17/technical-sessions/presentation/dong This paper is included in the Proceedings of the 2017 USENIX Annual Technical Conference (USENIX ATC ’17). July 12–14, 2017 • Santa Clara, CA, USA ISBN 978-1-931971-38-6 Open access to the Proceedings of the 2017 USENIX Annual Technical Conference is sponsored by USENIX. Soft Updates Made Simple and Fast on Non-volatile Memory Mingkai Dong, Haibo Chen Institute of Parallel and Distributed Systems, Shanghai Jiao Tong University Abstract back/forward to resolve cyclic dependencies, which also Fast, byte-addressable NVM promises near cache la- lead to double writes) [1, 3, 9, 13, 22]. A known file sys- tency and near memory bus throughput for file system tem developer Valerie Aurora argued that “soft updates operations. However, unanticipated cache line eviction are, simply put, too hard to understand, implement, and may lead to disordered metadata update and thus exist- maintain to be part of the mainstream of file system de- ing NVM file systems (NVMFS) use synchronous cache velopment” [1]. flushes to ensure consistency, which extends critical path In this paper, we revisit soft updates for NVM and ar- latency. gue that two main sources of the complexity are: 1) the In this paper, we revisit soft updates, an intriguing mismatch between per-pointer based dependency track- idea that eliminates most synchronous metadata updates ing and the block-based interface of traditional disks; 2) through delayed writes and dependency tracking, in the excessively delayed writes that complicate dependency context of NVMFS. We show that on one hand byte- tracking. We then show that soft updates can be made addressability of NVM significantly simplifies depen- simple by taking advantage of the byte-addressability dency tracking and enforcement by allowing better di- and low latency offered by NVM. Byte-addressability rectory organization and closely matching the per-pointer matches the per-pointer based dependency tracking by dependency tracking of soft updates. On the other hand, eliminating false sharing among different data struc- per-cache-line failure atomicity of NVM cannot ensure tures and avoiding cyclic dependencies and complex roll- the correctness of soft updates, which relies on block back/forward. Byte-addressability also allows the use of write atomicity; page cache, which is necessary for dual more efficient data structures like hash tables in the di- views in soft updates, becomes inefficient due to double rectory organization to further simplify the dependen- writes and duplicated metadata. To guarantee the correct- cies of file system operations. Besides, page cache and ness and consistency without synchronous cache flushes disk scheduler can be excluded from the storage hierar- and page cache, we propose pointer-based dual views, chy because of the byte-addressability and low latency of which shares most data structures but uses different point- NVM, so that soft updates can use in-place writes with ers in different views, to allow delayed persistency and delayed persistency to simplify the dependency track- eliminate file system checking after a crash. In this ing. The simplified storage hierarchy also eliminates the way, our system, namely SoupFS1, significantly short- gap between the page cache and the file system, mak- ens the critical path latency by delaying almost all syn- ing the dependency tracking and enforcement semantic- chronous cache flushes. We have implemented SoupFS as aware and even simpler. a POSIX-compliant file system for Linux and evaluated However, there is still a major challenge that im- it against state-of-the-art NVMFS like PMFS and NOVA. pedes the application of soft updates to NVM. Since page Performance results show that SoupFS can have notably cache, the software cache layer designed for slow storage lower latency and modestly higher throughput compared media, is removed for performance concerns, file sys- to existing NVMFS. tem updates are directly written to CPU cache and per- sisted to NVM later. Unlike page cache that can be pre- 1. Introduction cisely controlled by file systems, CPU cache is hardware- managed such that file systems cannot control the evic- Soft updates, which uses delayed writes for metadata up- tion of cache lines. State-of-the-art NVM file systems dates, tracks per-pointer dependencies among updates in (NVMFS) [8, 45], like traditional disk-based file systems, memory, and enforces such dependencies during write use logging or shadow copying to ensure crash consis- back to disk, is an intriguing idea that promises metadata tency. Yet, instead of buffering data for explicit and peri- update latency and throughput close to memory-only file odic flushing later, NVMFS has to eagerly flush critical systems [10, 11, 23, 35]. However, soft updates is also metadata in case of accidental eviction of such metadata known for its high complexity, especially the complex to NVM in a wrong order. This necessitates the uses of dependency tracking as well as enforcement (like roll- high latency operations like clflush/clflushopt+sfence in 1 Short for Soft updates inspired File System USENIX Association 2017 USENIX Annual Technical Conference 719 the critical path of file system related syscalls, which in- 2. Background and Motivation evitably extends the critical path latency. 2.1 NVM and NVMFS To overcome the consistency issue from unanticipated cache line eviction without page cache and cache flush Emerging NVM technologies such as PCM, STT- operations, we review dual views, a latest view and a con- MRAM, Memristor, NVDIMM and Intel/Micron’s 3D sistent view, which is used in soft updates for file system XPoint are revolutionizing the storage hierarchy by offer- metadata. All metadata in the consistent view is always ing features like byte-addressability, non-volatility, and persisted and consistent, while metadata in the latest view close-to-DRAM speed. STT-RAM has lower latency than is always up-to-date and might be volatile. Without caring DRAM but high cost, making it a promising replacement about the cache line eviction, a syscall handler operates for on-chip cache instead of DRAM replacement [47]. directly in the latest view and tracks the dependencies Other emerging NVM media like PCM or 3D XPoint of modifications. Unanticipated cache line eviction in the generally have higher latency especially higher write la- latest view can never affect the persisted metadata in the tency than DRAM, which indicates that synchronous consistent view by design. Background persisters are re- write to NVM would cause higher latency than that to sponsible for asynchronously persisting metadata from DRAM. NVDIMM, a commercially available NVM so- the latest view to the consistent view according to the lution, generally has the same performance character- tracked dependencies. They use clflush/clflushopt+sfence istics with DRAM as it is essentially battery-backed operations to enforce the update dependencies in back- DRAM, though it is usually with 10–20X higher price ground without affecting the syscall latency. A naive ap- than DRAM according to a recent price quotation. proach to providing dual views is duplicating all metadata Applications Pipeline in the file system. Such an approach doubles the memory SYSCALL usage and causes unnecessary memory copies when syn- Store Buffer chronizing metadata between the latest view and the con- Disk/SSD FS NVMFS L1/L3/LLC ~1/8/40 cycles sistent view. To implement dual views efficiently, we pro- Page Cache Caches (L1/L2/LLC) pose pointer-based dual views, in which most structures Device Mapper are shared by both views and different views are observed Block Layer WC Buffer by following different pointers. Thanks to pointer-based Device Drivers Memory Controller dual views, SoupFS avoids almost all synchronous cache 64 bit Memory 512/4096B load/store Bus 64 bit Memory Bus flushes in the critical path, and the consistent view can be Disk Cmds I/O Bus immediately used without performing file system check- ~180 cycles ~600 cycles DRAM NVRAM ing or recovery after crashes. Disk/SSD NVM We have implemented SoupFS as a POSIX- (a) Storage stack (b) CPU path 2 compliant , NVM-based file system at the backend Figure 1: Storage stack and path of the virtual file system in Linux. Evaluations using dif- While new software can leverage the load/store in- ferent NVM configurations show that SoupFS provides terface to access NVM directly, quite a lot of software notably lower latency and modestly higher throughput may continue to access persistent data in NVM through compared to state-of-the-art NVM file systems such as the file system interface. Hence, there have been inten- PMFS and NOVA. Specifically, SoupFS achieves up to sive efforts in designing NVM file systems (NVMFS) [4– 80% latency reduction for file system related syscalls in 6, 8, 25, 44, 45]. Figure 1(a) illustrates the storage stacks the micro-benchmarks and improves the throughput by from applications to persistent storage for disks (includ- up to 89% and 50% for Filebench and Postmark. ing SSD) and NVM. Compared to disk file systems, In summary, the contributions of this paper include: NVMFS can avoid major storage software layers like • A detailed analysis of the complexity of soft updates page cache, device mapper, block layer and drivers, but and the argument that soft updates can be made simple instead only relies on memory management for space for NVM (§2). management. However, there are also several challenges • A review of the update dependencies of file systems that require a redesign of file systems for NVM. on NVM, a simple semantic-aware dependency track- Fine-grained Failure-Atomic Updates: Although it ing and enforcement mechanism and efficient pointer- is claimed that memory controllers supporting Intel based dual views (§3).

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    15 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us