This project will no longer be maintained by Intel.
This project has been identified as having known security escapes.
Intel has ceased development and contributions including, but not limited to, maintenance, bug fixes, new releases, or updates, to this project.
Intel no longer accepts patches to this project.
The Low-Level Persistence Library (LLPL) is a Java library that provides access to off-heap persistent memory. LLPL includes several kinds of components that can be allocated and used alone or together in building applications:
- heaps: a pool of memory and an allocator for it
- memory blocks: unstructured bytes that can be laid out for any purpose and linked to build data structures
- pre-built data structures: arrays, linked list, and radix trees
- memory pools: a process-shareable pool of memory
Data stored in the components above can persist beyond the life of a JVM instance, i.e. across application or system restarts. LLPL provides APIs that help developers ensure consistency of stored data.
Memory allocated using LLPL is not garbage-collected and must be explicitly deallocated using LLPL APIs.
LLPL uses the Persistent Memory Development Kit (PMDK). For more information on PMDK, please visit http://pmem.io and https://github.com/pmem/pmdk.
The following are the prerequisites for building this Java library:
- Linux operating system
- Persistent Memory Development Kit (PMDK) v1.5 or newer
- Java 8 or newer
- Build tools -
g++
compiler,CMake
andMaven
This library assumes the availability of hardware persistent memory or emulated persistent memory. Instructions for creating emulated persistent memory are shown below.
The preferred way is to create an in-memory DAX file system. This requires Linux kernel 4.2 or greater. Please follow the steps at:
http://pmem.io/2016/02/22/pm-emulation.html
Alternatively, for use with older kernels, create a tmpfs partition as follows (as root):
$ mount -t tmpfs -o size=4G tmpfs /mnt/mem # creates a 4GB tmpfs partition
$ chmod -R a+rw /mnt/mem # enables read/write permissions to all users
Once all the prerequisites have been satisfied:
$ git clone https://github.com/pmem/llpl.git
$ cd llpl
$ mvn test -Dtest.heap.path=<path to persistent memory mount point>
Available Maven commands include:
compile
- builds sourcestest
- builds and runs testsjavadoc:javadoc
- builds javadocs intotarget/site/apidocs
package
- builds jar file intotarget
directory
LLPL is available from the Maven central repository. Add the following dependency to your pom.xml:
<dependency>
<groupId>com.intel.pmem</groupId>
<artifactId>llpl</artifactId>
<version>1.2.1-release</version>
<type>jar</type>
</dependency>
To use this library in your Java application, build the LLPL jar and include its location in your Java classpath. For example:
$ mvn package
$ javac -cp .:<path>/llpl/target/llpl-<version>.jar <source>
$ java -cp .:<path>/llpl/target/llpl-<version>.jar <class>
Alternatively, include LLPL's target/classes
directory in your Java classpath and the
target/cppbuild
directory in your java.library.path
. For example:
$ mvn compile
$ javac -cp .:<path>/llpl/target/classes <source>
$ java -cp .:<path>/llpl/target/classes -Djava.library.path=<path>/llpl/target/cppbuild <class>
Thanks for your interest! Please see the CONTRIBUTING.md document for information on how to contribute.
We would love to hear your comments and suggestions via https://github.com/pmem/llpl/issues.
For more information on this library, contact Olasoji Denloye (olasoji.denloye@intel.com), Matt Welch (matt.welch@intel.com), or Steve Dohrmann (steve.dohrmann@intel.com).