From 22125d8f2f6a29333f494796df9fc4d848c77fbc Mon Sep 17 00:00:00 2001 From: Shivam Durgbuns Date: Wed, 9 Mar 2022 18:39:55 +0530 Subject: [PATCH] Fixes 5544 * updated the osd_memory_target_cgroup_limit_ratio to 0.8 wrt bug 2012082 and Increased postgres max connections to 600 as per PR #860 Signed-off-by: Shivam Durgbuns --- ocs_ci/ocs/constants.py | 29 +++++++++++++++++++ .../test_ceph_default_values_check.py | 13 +++++++-- 2 files changed, 39 insertions(+), 3 deletions(-) diff --git a/ocs_ci/ocs/constants.py b/ocs_ci/ocs/constants.py index c67a1802fb3..0e5bd4f181c 100644 --- a/ocs_ci/ocs/constants.py +++ b/ocs_ci/ocs/constants.py @@ -1499,6 +1499,18 @@ osd_memory_target_cgroup_limit_ratio = 0.5 """ +ROOK_CEPH_CONFIG_VALUES_410 = """ +[global] +bdev_flock_retry = 20 +mon_osd_full_ratio = .85 +mon_osd_backfillfull_ratio = .8 +mon_osd_nearfull_ratio = .75 +mon_max_pg_per_osd = 600 +mon_pg_warn_max_object_skew = 0 +mon_data_avail_warn = 15 +[osd] +osd_memory_target_cgroup_limit_ratio = 0.8 +""" CEPH_DEBUG_CONFIG_VALUES = """ [mon] @@ -1526,6 +1538,23 @@ shared_preload_libraries = 'pg_stat_statements' """ +# Values from configmap noobaa-postgres-config wrt OCP version 4.10 and above +NOOBAA_POSTGRES_TUNING_VALUES_4_10 = """ +max_connections = 600 +shared_buffers = 1GB +effective_cache_size = 3GB +maintenance_work_mem = 256MB +checkpoint_completion_target = 0.9 +wal_buffers = 16MB +default_statistics_target = 100 +random_page_cost = 1.1 +effective_io_concurrency = 300 +work_mem = 1747kB +min_wal_size = 2GB +max_wal_size = 8GB +shared_preload_libraries = 'pg_stat_statements' +""" + WORKLOAD_STORAGE_TYPE_BLOCK = "block" WORKLOAD_STORAGE_TYPE_FS = "fs" # Components of OCS diff --git a/tests/manage/z_cluster/test_ceph_default_values_check.py b/tests/manage/z_cluster/test_ceph_default_values_check.py index c935508176c..8438105554a 100644 --- a/tests/manage/z_cluster/test_ceph_default_values_check.py +++ b/tests/manage/z_cluster/test_ceph_default_values_check.py @@ -112,8 +112,10 @@ def test_validate_ceph_config_values_in_rook_config_override(self): ocs_version = version.get_semantic_ocs_version_from_config() if ocs_version == version.VERSION_4_8: stored_values = constants.ROOK_CEPH_CONFIG_VALUES_48.split("\n") - elif ocs_version >= version.VERSION_4_9: + elif ocs_version == version.VERSION_4_9: stored_values = constants.ROOK_CEPH_CONFIG_VALUES_49.split("\n") + elif ocs_version >= version.VERSION_4_10: + stored_values = constants.ROOK_CEPH_CONFIG_VALUES_410.split("\n") else: stored_values = constants.ROOK_CEPH_CONFIG_VALUES.split("\n") assert collections.Counter(config_data) == collections.Counter(stored_values), ( @@ -164,8 +166,13 @@ def test_noobaa_postgres_cm_post_ocs_upgrade(self): "Validating that the values configured in noobaa-postgres configmap " "match the ones stored in ocs-ci" ) - stored_values = constants.NOOBAA_POSTGRES_TUNING_VALUES.split("\n") - stored_values.remove("") + ocs_version = version.get_semantic_ocs_version_from_config() + if ocs_version <= version.VERSION_4_9: + stored_values = constants.NOOBAA_POSTGRES_TUNING_VALUES.split("\n") + stored_values.remove("") + elif ocs_version >= version.VERSION_4_10: + stored_values = constants.NOOBAA_POSTGRES_TUNING_VALUES_4_10.split("\n") + stored_values.remove("") assert collections.Counter(config_data) == collections.Counter(stored_values), ( f"The config set in {constants.NOOBAA_POSTGRES_CONFIGMAP} " f"is different than the expected. Please inform OCS-QE about this discrepancy. "