From 7cf0b2a9001beade52f126e93a64df9604067d7e Mon Sep 17 00:00:00 2001 From: Alexandre Derumier Date: Tue, 9 Jan 2024 15:50:29 +0100 Subject: [PATCH 1/4] cherry-pick safety fix for building rocksdb in debug mode source: https://github.com/ceph/ceph/pull/54891 build packages with 'RelWithDebInfo' to avoid to build rocksdb in debug This is already the default in ubuntu packages https://bugs.launchpad.net/ubuntu/+source/ceph/+bug/1894453 --- patches/0021-debian-rules-fix-buildtype.patch | 22 +++++++++++++++++++ patches/series | 1 + 2 files changed, 23 insertions(+) create mode 100644 patches/0021-debian-rules-fix-buildtype.patch diff --git a/patches/0021-debian-rules-fix-buildtype.patch b/patches/0021-debian-rules-fix-buildtype.patch new file mode 100644 index 000000000..8b6ef6b56 --- /dev/null +++ b/patches/0021-debian-rules-fix-buildtype.patch @@ -0,0 +1,22 @@ +From 1f4b106d49fc916994d97e273599f75caa904c3b Mon Sep 17 00:00:00 2001 +From: Mark Nelson +Date: Thu, 14 Dec 2023 05:19:46 +0000 +Subject: [PATCH] debian/rules: Fix build_type for massive performance gain + +Signed-off-by: Mark Nelson +--- + debian/rules | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/debian/rules b/debian/rules +index ed7f4a255ed4b..b28abb7d62788 100755 +--- a/debian/rules ++++ b/debian/rules +@@ -29,6 +29,7 @@ extraopts += -DWITH_PYTHON3=3 + extraopts += -DWITH_CEPHFS_JAVA=ON + extraopts += -DWITH_CEPHFS_SHELL=ON + extraopts += -DWITH_SYSTEMD=ON -DCEPH_SYSTEMD_ENV_DIR=/etc/default ++extraopts += -DCMAKE_BUILD_TYPE=RelWithDebInfo + extraopts += -DWITH_GRAFANA=ON + ifeq ($(DEB_HOST_ARCH), amd64) + extraopts += -DWITH_RBD_RWL=ON diff --git a/patches/series b/patches/series index 67a52ae7c..d9a3ff8f4 100644 --- a/patches/series +++ b/patches/series @@ -13,3 +13,4 @@ 0016-d-rules-fix-no-restart-on-upgrade.patch 0017-python3.10-pep-620.patch 0020-fix-4759-run-ceph-crash-daemon-with-www-data-group-f.patch +0021-debian-rules-fix-buildtype.patch \ No newline at end of file From 65acd0c2447412ae2fb1014b48f3d6ed32142b8b Mon Sep 17 00:00:00 2001 From: Alexandre Derumier Date: Tue, 9 Jan 2024 15:50:30 +0100 Subject: [PATCH 2/4] cherry-pick fix so rocksdb build inherits parent's CMAKE_CXX_FLAGS cherry-pick both, beb1a624921 ("cmake/modules/BuildRocksDB.cmake: inherit parent's CMAKE_CXX_FLAGS") and 620b68a348f ("cmake/modules/BuildRocksDB.cmake: use string(APPEND ..) when appropriate") upstream PR: https://github.com/ceph/ceph/pull/54918 Signed-off-by: Alexandre Derumier [TL: squash patches actually ] Signed-off-by: Thomas Lamprecht --- ...ocksb-inherit-parent-cmake-cxx-flags.patch | 47 +++++++++++++++++++ patches/series | 3 +- 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 patches/0022-rocksb-inherit-parent-cmake-cxx-flags.patch diff --git a/patches/0022-rocksb-inherit-parent-cmake-cxx-flags.patch b/patches/0022-rocksb-inherit-parent-cmake-cxx-flags.patch new file mode 100644 index 000000000..2b35fa59b --- /dev/null +++ b/patches/0022-rocksb-inherit-parent-cmake-cxx-flags.patch @@ -0,0 +1,47 @@ +From 620b68a348f07145c49c12668576a89dee8198cb Mon Sep 17 00:00:00 2001 +From: Kefu Chai +Date: Fri, 15 Dec 2023 19:01:46 +0800 +Subject: [PATCH] cmake/modules/BuildRocksDB.cmake: inherit parent's CMAKE_CXX_FLAGS + +CMake allows us to customize `CMAKE_CXX_FLAGS` by setting CXXFLAGS +environmental variable. and Debian's debhelper also sets CXXFLAGS +when it builds cmake projects for customizing the building flags. + +but we fail to populate this setting down when building external +projects. this is important when it comes to the projects which +is critical to the performance. RocksDB is one of them. + +in this change, we pass the `CMAKE_CXX_FLAGS` down in +`BuildRocksDB.cmake` so that its `CMAKE_CXX_FLAGS` contains +the same set of `CMAKE_CXX_FLAGS` used by its parent project. + +this should help with the performance in the bluestore, where +RocksDB is used. + +Signed-off-by: Kefu Chai + (cherry-picked from beb1a624921d7589db63dea066935b3aa9ce2698) +--- + cmake/modules/BuildRocksDB.cmake | 4 ++-- + cmake/modules/BuildRocksDB.cmake | 1 + + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/cmake/modules/BuildRocksDB.cmake b/cmake/modules/BuildRocksDB.cmake +index f9a28274c40..e0208f6545b 100644 +--- a/cmake/modules/BuildRocksDB.cmake ++++ b/cmake/modules/BuildRocksDB.cmake +@@ -57,12 +57,13 @@ function(build_rocksdb) + endif() + include(CheckCXXCompilerFlag) + check_cxx_compiler_flag("-Wno-deprecated-copy" HAS_WARNING_DEPRECATED_COPY) ++ set(rocksdb_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + if(HAS_WARNING_DEPRECATED_COPY) +- set(rocksdb_CXX_FLAGS -Wno-deprecated-copy) ++ string(APPEND rocksdb_CXX_FLAGS " -Wno-deprecated-copy") + endif() + check_cxx_compiler_flag("-Wno-pessimizing-move" HAS_WARNING_PESSIMIZING_MOVE) + if(HAS_WARNING_PESSIMIZING_MOVE) +- set(rocksdb_CXX_FLAGS "${rocksdb_CXX_FLAGS} -Wno-pessimizing-move") ++ string(APPEND rocksdb_CXX_FLAGS " -Wno-pessimizing-move") + endif() + if(rocksdb_CXX_FLAGS) + list(APPEND rocksdb_CMAKE_ARGS -DCMAKE_CXX_FLAGS='${rocksdb_CXX_FLAGS}') diff --git a/patches/series b/patches/series index d9a3ff8f4..eddd47031 100644 --- a/patches/series +++ b/patches/series @@ -13,4 +13,5 @@ 0016-d-rules-fix-no-restart-on-upgrade.patch 0017-python3.10-pep-620.patch 0020-fix-4759-run-ceph-crash-daemon-with-www-data-group-f.patch -0021-debian-rules-fix-buildtype.patch \ No newline at end of file +0021-debian-rules-fix-buildtype.patch +0022-rocksb-inherit-parent-cmake-cxx-flags.patch \ No newline at end of file From b86639eccc44d122d328f2b5eafd85488dda80aa Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Tue, 9 Jan 2024 16:52:36 +0100 Subject: [PATCH 3/4] patches: fix missing newline at end of file Signed-off-by: Thomas Lamprecht --- patches/series | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patches/series b/patches/series index eddd47031..73f66396c 100644 --- a/patches/series +++ b/patches/series @@ -14,4 +14,4 @@ 0017-python3.10-pep-620.patch 0020-fix-4759-run-ceph-crash-daemon-with-www-data-group-f.patch 0021-debian-rules-fix-buildtype.patch -0022-rocksb-inherit-parent-cmake-cxx-flags.patch \ No newline at end of file +0022-rocksb-inherit-parent-cmake-cxx-flags.patch From 2dd3854d5b35a35486e86e2616727168e244f470 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Tue, 9 Jan 2024 17:12:45 +0100 Subject: [PATCH 4/4] bump version to 17.2.7-pve2 Signed-off-by: Thomas Lamprecht --- changelog.Debian | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/changelog.Debian b/changelog.Debian index cbdd4b942..aa6faac40 100644 --- a/changelog.Debian +++ b/changelog.Debian @@ -1,3 +1,10 @@ +ceph (17.2.7-pve2) bookworm; urgency=medium + + * ensure RocksDB sub-component is build in release mode to avoid performance + regressions + + -- Proxmox Support Team Tue, 09 Jan 2024 17:11:23 +0100 + ceph (17.2.7-pve1) bookworm; urgency=medium * new upstream quincy 17.2.7 stable release