Since MariaDB Server 10.5.1, a build configuration is supported but not enabled in our packages:
cmake -DWITH_PMEM=ON
This will depend on libpmem-dev and introduce a small library dependency to the generated server package.
I think that we should enable Persistent Memory support in MariaDB 10.6 on all applicable operating systems. Having the InnoDB redo log in a mount -o dax device should vastly reduce the transaction commit latency. This task would be a prerequisite for that.
Attachments
Issue Links
relates to
MDEV-25124benchmark 10.6 performance for PMEM enabled builds
Otto Kekäläinen
added a comment - marko Which version is required? There is libpmem1-dev and libpmem2-dev available. See "binaries" at https://tracker.debian.org/pkg/pmdk
Currently testing the latter commit on old buildbot does not work as it fails on `Unmet build dependencies: libpmem-dev` until dbart has added package libpmem-dev to builders that run the 10.6 branch.
Otto Kekäläinen
added a comment - - edited Work-in-progress PR available at https://github.com/MariaDB/server/pull/1773/commits (see second commit).
Old buildbot: http://buildbot.askmonty.org/buildbot/grid?branch=ok-10.6-uring-pmem&category=main&category=experimental
Currently testing the latter commit on old buildbot does not work as it fails on `Unmet build dependencies: libpmem-dev` until dbart has added package libpmem-dev to builders that run the 10.6 branch.
otto, thank you , I was not aware that libpmem2-dev exists. A quick look suggests that libpmem2 is an overkill for us; it seems to provide more high-level operations. We actually only use a tiny subset of what libpmem1 provides.
It might be acceptable to just invoke the IA-32/AMD64 clflush instruction directly, and in MDEV-14425 (hopefully 10.7) I might just do that. (There are also clflushopt and clwb in more recent processors, but for our limited ‘write-only’ use case of redo log blocks, any of these instructions should be fine.) Obviously, if we decide to go down this route later, we should invoke similar instructions on all supported processor architectures.)
Marko Mäkelä
added a comment - otto , thank you , I was not aware that libpmem2-dev exists. A quick look suggests that libpmem2 is an overkill for us; it seems to provide more high-level operations. We actually only use a tiny subset of what libpmem1 provides.
It might be acceptable to just invoke the IA-32/AMD64 clflush instruction directly, and in MDEV-14425 (hopefully 10.7) I might just do that. (There are also clflushopt and clwb in more recent processors, but for our limited ‘write-only’ use case of redo log blocks, any of these instructions should be fine.) Obviously, if we decide to go down this route later, we should invoke similar instructions on all supported processor architectures.)
Otto Kekäläinen
added a comment - Note that libpmem-dev is only available on amd64, arm64 and ppc64el (not x86): https://packages.debian.org/search?searchon=names&keywords=libpmem-dev
libpmem-dev is also not available on Ubuntu Xenial, but that is going away next month so I don't think I will even bother making any releases for that
Daniel Bartholomew
added a comment - libpmem-dev is also not available on Ubuntu Xenial, but that is going away next month so I don't think I will even bother making any releases for that
Daniel Bartholomew
added a comment - libpmem-dev is now installed on:
buster-amd64-build
focal-amd64-build
groovy-amd64-build
sid-amd64-build
libpmem-devel is now installed on:
fedora32-amd64-build
fedora33-amd64-build
opensuse150-amd64-build
sles150-amd64-build
Package libpmem-dev is available on platforms amd64, arm64 and ppc64el.
On Bionic the apt-madison tool when run by autobake-deb.sh sees libpmem-dev in the repositories so it should be installable (from bionic-updates, which is apparently enabled).
Otto Kekäläinen
added a comment - - edited Thanks dbart !
Also the following builders would need the libpmem-dev:
kvm-deb-bionic-amd64
kvm-deb-focal-ppc64le
kvm-deb-groovy-aarch64
kvm-deb-groovy-ppc64le
Package libpmem-dev is available on platforms amd64, arm64 and ppc64el.
On Bionic the apt-madison tool when run by autobake-deb.sh sees libpmem-dev in the repositories so it should be installable (from bionic-updates, which is apparently enabled).
(the ARMv8 and POWER platforms that otto mentioned did not start the build yet)
I confirmed that the following are using libpmem:
kvm-deb-sid-amd64
kvm-rpm-fedora32-amd64
kvm-rpm-fedora32-amd64
I also checked that kvm-deb-sid-x86 works, but without the library.
Marko Mäkelä
added a comment - We have a build failure on the following platforms due to missing libpmem-dev :
kvm-deb-bionic-amd64
amd64-ubuntu-1804-deb-autobake
(the ARMv8 and POWER platforms that otto mentioned did not start the build yet)
I confirmed that the following are using libpmem :
kvm-deb-sid-amd64
kvm-rpm-fedora32-amd64
kvm-rpm-fedora32-amd64
I also checked that kvm-deb-sid-x86 works, but without the library.
libpmem-dev/devel is now installed on the following:
kvm-deb-groovy-aarch64
kvm-deb-groovy-ppc64le
kvm-deb-focal-aarch64
kvm-deb-focal-ppc64le
kvm-rpm-centos73-amd64
kvm-rpm-centos74-amd64
kvm-rpm-centos75-amd64
kvm-rpm-centos8-amd64
kvm-rpm-rhel8-amd64
kvm-zyp-sles123-amd64
libpmem-dev/devel is not available on:
kvm-deb-bionic-ppc64le
kvm-deb-bionic-aarch64
kvm-rpm-centos73-ppc64le
kvm-rpm-centos73-ppc64
kvm-rpm-centos74-aarch64
kvm-deb-stretch-ppc64le
kvm-deb-stretch-aarch64
kvm-deb-xenial-aarch64
kvm-deb-xenial-amd64
kvm-deb-xenial-ppc64le
kvm-deb-xenial-x86
We don't have a valid subscription for rhel8-ppc64le, so this builder does not
have libpmem-devel:
kvm-rpm-rhel8-ppc64le
Daniel Bartholomew
added a comment - libpmem-dev/devel is now installed on the following:
kvm-deb-groovy-aarch64
kvm-deb-groovy-ppc64le
kvm-deb-focal-aarch64
kvm-deb-focal-ppc64le
kvm-rpm-centos73-amd64
kvm-rpm-centos74-amd64
kvm-rpm-centos75-amd64
kvm-rpm-centos8-amd64
kvm-rpm-rhel8-amd64
kvm-zyp-sles123-amd64
libpmem-dev/devel is not available on:
kvm-deb-bionic-ppc64le
kvm-deb-bionic-aarch64
kvm-rpm-centos73-ppc64le
kvm-rpm-centos73-ppc64
kvm-rpm-centos74-aarch64
kvm-deb-stretch-ppc64le
kvm-deb-stretch-aarch64
kvm-deb-xenial-aarch64
kvm-deb-xenial-amd64
kvm-deb-xenial-ppc64le
kvm-deb-xenial-x86
We don't have a valid subscription for rhel8-ppc64le, so this builder does not
have libpmem-devel:
kvm-rpm-rhel8-ppc64le
The Debian packaging change (setting WITH_PMEM=yes) that was contributed by otto as well as a change to replace WITH_PMEM:BOOL=OFF with WITH_PMEM:STRING=auto have now been pushed to 10.6 after a (mostly) successful bb-10.6-release staging run.
Marko Mäkelä
added a comment - - edited The Debian packaging change (setting WITH_PMEM=yes ) that was contributed by otto as well as a change to replace WITH_PMEM:BOOL=OFF with WITH_PMEM:STRING=auto have now been pushed to 10.6 after a (mostly) successful bb-10.6-release staging run.
Installed libpmem onto the rhel8-install VM as rhel8 is our bintar builder for 10.6 and so the install VM needs the lib to be able to run tests.
Daniel Bartholomew
added a comment - Installed libpmem onto the rhel8-install VM as rhel8 is our bintar builder for 10.6 and so the install VM needs the lib to be able to run tests.
Assigning to abychko to install libpmem-dev/devel into the Jenkins builders. After which this issue can be closed.
Daniel Bartholomew
added a comment - Assigning to abychko to install libpmem-dev/devel into the Jenkins builders. After which this issue can be closed.
Alexey Bychko (Inactive)
added a comment - libpmem-dev is available from bionic and later https://packages.ubuntu.com/search?keywords=+libpmem-dev&searchon=names
marko Which version is required? There is libpmem1-dev and libpmem2-dev available. See "binaries" at https://tracker.debian.org/pkg/pmdk