Replication-based object persistence by reachability
Abstract
The emergence of non-volatile memory (NVM) presents opportunities for making in-memory data of application programs persistent at a small cost. An adequate abstraction is required for programming languages to be able to utilize NVM. Here, persistence by reachability is a suitable abstraction for managed languages. In this abstraction, all objects are volatile when they are created and become persistent later depending on their reachability from the predefined roots. The state-of-the-art in the implementations of persistence by reachability creates objects in DRAM and moves them to NVM when they become persistent. This implementation has two inefficiencies. One is the read barriers to get the current location of objects; the other is to read values of persistent objects from NVM, which is slower than DRAM.
This paper proposes a new algorithm to realize persistence by reachability. The proposed algorithm does not move objects to NVM to make them persistent. Rather, it creates replicas of the objects in NVM. After replication, the original copy in DRAM is kept synchronized with the replica. The program can obtain the contents of a persistent object by reading from DRAM without read barriers. We preliminarily implemented it in the HotSpot VM of OpenJDK and evaluated its overhead. The results showed that the overhead of making objects persistent was 2.7% on average. The overhead of writing to persistent objects varied from 0.4% to 335.5%, depending on write frequency. The overhead imposed on programs that do not make any object persistent was similar to the previous work.