13-11-2012, 11:52 AM
High Performance Database Logging Storage Class Memory
High Performance Database.doc (Size: 107 KB / Downloads: 28)
INTRODUCTION
In recent years, research and development efforts are underway worldwide on novel
non-volatile memory technologies, collectively called storage class memory (SCM).
SCM blends the best properties of memory and hard disk drive (HDD), which include
High performance, byte addressable(similar to Dynamic Random Access Memory(DRAM)),
data persistence, and more energy efficient (similar to HDD).
Phase Change Memory (PCM) is one of the technologies competing to become the SCM
of choice. Studies [1][2] show that the access speed of PCM is two to four orders of
magnitude faster than flash (SSD) or disk for typical filesystem I/Os, and within an
order of magnitude of DRAM. Compared to flash, PCM has a much longer write
endurance time. Currently, a flash bit will fail after being written 104–105times, while
PCM bit is designed to sustain 108–1012 writes .More importantly, flash devices only
allow block-based access, which results in latency and system implementation
complexity. PCM is byte-addressable; accessing PCM is similar to accessing DRAM.
So the complex data format transformation can be eliminated.
Moreover, PCM has higher chip density than DRAM, thus creating opportunities for building affordable machines with large amount of main memory in the future, which will reduce or eliminate the need of frequent random I/O’s to page-in and page-out data. I/O performance, both latency and bandwidth, has long been the key bottleneck of data management system and applications. Due to the big difference in access speed between memory and disk, “hiding” I/O during application execution has become a very important tactic in software system design. Researchers and practitioners have been putting significant effort in trying to reduce or hide I/O
Performance impact. This, unfortunately, makes data management system design and application building rather complicated.
TECHNOLOGY USED
PCM, as the new class of memory technology of SCM, employs the reversible phase change in materials to store information, and provides non-volatility and byteaddressability.
Unlike DRAM,, PCM is made from a chalcogenide glass, a material that can be switched between
Two “phases”, crystalline and amorphous, by heating it to 650 C and then cooling it either slowly or rapidly. These phases have different resistivity, which are used to represent 0 and 1.
The access latency of PCM is at the level of hundreds of nanoseconds, which is only 2–5 times slower than DRAM. To take advantage of this access speed and byte-addressability feature, it is proposed in [13] that PCM can be placed directly on the memory bus, side-by-side with DRAM. The 64-bit physical address space will then be divided between volatile and non-volatile memories, so the CPU can directly address PCM with common loads and stores.
To provide safety and consistency, software must reason about when and in what order the writes to PCM are madedurable. Existing cache hierarchies and memory controller may reorder writes to improve performance. As with the problem of ordering, software system also needs to enforce
write atomicity with respect to power failure. Thus, if a write to the persistent memory is interrupted by a power failure, the PCM could be left in an intermediate state, violating
consistency. In [13], it proposes that the hardware could provide two primitives, atomic 8-byte write and epoch barrier, to guarantee the atomicity and ordering of SCM writing.
COMPARISON WITH OTHER TECHNOLOGIES
In current DBMSs, as shown in Fig. 1, transactions write data and log records in DRAM buffers first; then move them to a stable storage, such as HDD, to guarantee the durability as needed or upon transactions commit. The log records must be flushed to log files on disk before any associated data changes are made to the data files (write-ahead-logging) [3]. If a system failure occurs, such as hardware failure or system power interruption, the recovery process is started when the system restarts, to read the log files and apply log records to restore the database to a consistent state.
Writing and flushing log records to log files is an important step that cannot be bypassed during database transaction processing. However, because of the disk I/O barrier, significant overhead is incurred during writing and flushing log records, which often becomes the key inhibitor for high
Performance transaction processing. To address this problem, most modern DBMSs use a system-throughput-oriented approach called “group committing” [4] which tries to reduce
the number of disk writes by grouping log writes of multiple committing transactions into one single disk write. However, from a single transaction perspective, group committing
degrades average response time. It also leads to increased lock/latch contentions
CONCLUSION
Storage class memory is an emerging memory technology, which has numerous advantages compared to the current DRAM and HDD, such as fast access time, non-volatility,
byte-addressability and energy efficiency. With these great properties, SCM will have huge impact on the next generation system and software design in the near future. System
performance can be drastically improved by eliminating traditional slow I/O bottlenecks; and a much simpler system design can be accomplished by avoiding complicated data
format transformation and I/O latency hiding.
The objective of our work is to design new DBMS technologies to leverage these SCM advantages. Logging is one of the key components in DBMS in terms of transaction support. It is also one of the major performance bottlenecks in DBMSs because of the slow speed of disk I/Os. In this paper, we introduce a new design of an SCM-based database logging approach for DBMSs to reduce the logging overhead and simplify the database logging logic. In this new approach,
traditional in-memory log buffers and disk-based log files are replaced by a single log space in SCM. Using SCM, log records can be directly written into this persistent memory,
which simplifies the traditional two-layer logging design, provides better concurrency support and improves the transaction latency. We also studied several major problems
when using SCM during system crash and developed new recovery algorithm to cope with these issues.
To prove the feasibility of our new design, we built a prototype based on the IBM Solid DB and an SCM simulator. In common circumstances, our experimental results show that the new SCM-based logging component can provide 7x throughput improvement over disk-based logging on the
TATP benchmark. If all the transactions are write transactions, the performance improvement can be as much as 29x times.