Skip to content

Commit

Permalink
Fixes 5544
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
shivamdurgbuns authored Mar 9, 2022
1 parent 1a63661 commit 22125d8
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 3 deletions.
29 changes: 29 additions & 0 deletions ocs_ci/ocs/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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
Expand Down
13 changes: 10 additions & 3 deletions tests/manage/z_cluster/test_ceph_default_values_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -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), (
Expand Down Expand Up @@ -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. "
Expand Down

0 comments on commit 22125d8

Please sign in to comment.