osalbahr / pmem-redirection

I/O Redirection of Workflows to Local and Disaggregate Persistent Memory. This repo is for CSC 499, Summer 2023.
https://arcb.csc.ncsu.edu/~mueller/cluster/arc/
GNU Affero General Public License v3.0
1 stars 1 forks source link

Install PMDK #2

Closed osalbahr closed 1 year ago

osalbahr commented 1 year ago

This issue will track installing PMDK libraries, such as libpmem, libpmem2, and libpmemobj to be used in this project. The latter might only be used for experimental reasons, as to avoid unnecessary overhead. I plan to add installation instructions for CentOS 7, and optionally ubuntu-latest (ubuntu-22.04 as of now). See c-cpp.yml for more on the latter.

osalbahr commented 1 year ago

Actually, libpmem might be too bare-bones?

WARNING: There is nothing transactional about the pmem_persist(3) or pmem_msync(3) calls in this example. Interrupting the program may result in a partial write to pmem. Use a transactional library such as libpmemobj(7) to avoid torn updates.

Similarly for libpmem2:

WARNING: There is nothing transactional about the persist from pmem2_get_persist_fn(3) call in this example. Interrupting the program may result in a partial write to pmem. Use a transactional library such as libpmemobj(7) to avoid torn updates.

osalbahr commented 1 year ago

libpmemobj might be a better tool for the job, unless the overhead must be avoided

Note: for some reason, "libpmemobj requires the -std=gnu99 compilation flag to build properly"

The documentation offers a notable contrast:

libpmemobj is one of a collection of persistent memory libraries available. The others are:

    libpmemblk(7), providing pmem-resident arrays of fixed-sized blocks with atomic updates.

    libpmemlog(7), providing a pmem-resident log file.

    libpmem(7), low-level persistent memory support.

I'm not really sure what this means. What I've collected so far is that libpmemobj builds on top of libpmem and offers a higher level API with some guarantees (that may or may not be needed for this project's use cases)