Giter Site home page Giter Site logo

sylab / libpm Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 2.17 MB

Sources for the LibPM system as described in the paper: LibPM: Simplifying Application Usage of Persistent Memory, ACM Transactions on Storage, November 2018

CMake 0.08% C 98.95% C++ 0.17% Shell 0.07% PostScript 0.70% Gnuplot 0.01% Jupyter Notebook 0.02% GDB 0.01%

libpm's Introduction

Required Software

* CMake: CMake is cross-platform free and open-source software for managing
    the build process of software using a compiler-independent method.

How to compile the library

First, get a copy of the source. Assuming that we store the path to the code folder in a variable called PMLIB_TOP, we compile the code by issuing the following commands:

$ cd $PMLIB_TOP

Now we create a folder in which we will compile the code. This is convenient because it separates the binaries from the source.

$ mkdir build
$ cd build
$ cmake ../src
$ make

If everything went well, we should have a libpm.a file in the build folder along with other test files in $PMLIB_TOP/build/tests

NOTE: If you want to debug the code, you should consider compiling it with debugging symbols. This can be done by telling cmake that we want a Debug build type like this.

$ cmake -DCMAKE_BUILD_TYPE=Debug ../src

Testing

The folder tests contains simple programs that test specific functionalities of the library.

Benchmark

The benchmark folder contains benchmarks use to tests the performance of the library. As of now, the only comparison point we use is TPL.

Settings

The library provides both logging and stats. These could be very helpful when debugging the code but it can also add a significant overhead. Both logging and stats can be disabled by updating the settings.h file.

Environment Variables

The following environment variables could be set to change the default behavior of the library.

PMLIB_CLOSURE=0     Disables the closure computation. (Defaults 1)

PMLIB_FIX_PTRS=0    No metadata about persistent pointers is store and the
                    pointers are not fixed after a container restore. This
                    only applies when we can guarantee that the container
                    was mmap at the same address on which is was created.
                    (Defaults 1)

PMLIB_LOG_LEVEL=n   Sets the log level to n. Msg(s) with log-level bigger
                    than n will not be logged.

PMLIB_LOG_FILE=/path/to/file
                    Define the log file

PMLIB_INIT_SIZE=n   Initializes the container file to n bytes.

PMLIB_CONT_FILE=/path/to/file
                    Create container at the given path

PMLIB_USE_FMAPPER=1 Use Fixed Mapper page allocator (default)

PMLIB_USE_NLMAPPER=1
                    Use Non-Linear Mapper page allocator

Running tests with large containers

The current design maps portions of the backend-file into the process address space. When large containers are used, it's possible to exceed the default maximum number of mmap regions per process. To solve this problem we change this limit following these instructions.

To check the current value

    $ sysctl  vm.max_map_count

To change the value to n

    # sysctl -w vm.max_map_count=n

libpm's People

Contributors

ashikeeg avatar

Stargazers

Jintian Wu avatar Jeff Carpenter avatar

Watchers

Ashikee Ghosh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.