From: Shweta Bhosale Date: Fri, 11 Apr 2025 04:09:43 +0000 (+0530) Subject: mgr/nfs: Changed IOPS max limit to 409600 and Bandwidth max limit to 100GB X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f54ce5329e0df8259b09ee753342384daccb8169;p=ceph.git mgr/nfs: Changed IOPS max limit to 409600 and Bandwidth max limit to 100GB Fixes: https://tracker.ceph.com/issues/69458 Signed-off-by: Shweta Bhosale --- diff --git a/src/pybind/mgr/nfs/qos_conf.py b/src/pybind/mgr/nfs/qos_conf.py index 60111dc0638a..02863a756caf 100644 --- a/src/pybind/mgr/nfs/qos_conf.py +++ b/src/pybind/mgr/nfs/qos_conf.py @@ -38,22 +38,22 @@ class QOSType(Enum): def _validate_qos_bw(bandwidth: str) -> int: - min_bw = 1000000 # 1MB - max_bw = 4000000000 # 4GB + min_bw = 1024 * 1024 # 1MiB + max_bw = 100 * 1024 * 1024 * 1024 # 100GiB bw_bytes = with_units_to_int(bandwidth) if bw_bytes != 0 and (bw_bytes < min_bw or bw_bytes > max_bw): raise Exception( - f"Provided bandwidth value is not in range, Please enter a value between {min_bw} (1MB) and {max_bw} (4GB) bytes per second." + f"Provided bandwidth value is not in range, Please enter a value between {min_bw} (1MiB) and {max_bw} (100GiB) bytes per second." ) return bw_bytes def _validate_qos_ops(count: int) -> int: min_cnt = 10 - max_cnt = 16384 + max_cnt = 409600 if count != 0 and (count < min_cnt or count > max_cnt): raise Exception( - f"Provided IOS count value is not in range, Please enter a value between {min_cnt} and {max_cnt} bytes per second." + f"Provided IOS count value is not in range, Please enter a value between {min_cnt} and {max_cnt} count per second." ) return count diff --git a/src/pybind/mgr/nfs/tests/test_nfs.py b/src/pybind/mgr/nfs/tests/test_nfs.py index 97fb151d8192..f574f48ecd38 100644 --- a/src/pybind/mgr/nfs/tests/test_nfs.py +++ b/src/pybind/mgr/nfs/tests/test_nfs.py @@ -150,7 +150,7 @@ QOS { enable_bw_control = true; combined_rw_bw_control = false; qos_type = 3; - max_export_write_bw = 1000000; + max_export_write_bw = 2000000; max_export_read_bw = 2000000; max_client_write_bw = 3000000; max_client_read_bw = 4000000; @@ -164,7 +164,7 @@ QOS_BLOCK { enable_qos = true; enable_bw_control = true; combined_rw_bw_control = false; - max_export_write_bw = 1000000; + max_export_write_bw = 2000000; max_export_read_bw = 2000000; max_client_write_bw = 3000000; max_client_read_bw = 4000000; @@ -181,7 +181,7 @@ QOS_BLOCK { "max_client_read_bw": "4.0MB", "max_client_write_bw": "3.0MB", "max_export_read_bw": "2.0MB", - "max_export_write_bw": "1.0MB", + "max_export_write_bw": "2.0MB", "qos_type": "PerShare_PerClient", "enable_iops_control": False } @@ -193,7 +193,7 @@ QOS_BLOCK { "max_client_read_bw": "4000000", "max_client_write_bw": "3000000", "max_export_read_bw": "2000000", - "max_export_write_bw": "1000000", + "max_export_write_bw": "2000000", "qos_type": "PerShare_PerClient", "enable_iops_control": False } @@ -205,7 +205,7 @@ QOS_BLOCK { "max_client_read_bw": "4.0MB", "max_client_write_bw": "3.0MB", "max_export_read_bw": "2.0MB", - "max_export_write_bw": "1.0MB", + "max_export_write_bw": "2.0MB", "enable_iops_control": False } qos_export_dict_bw_in_bytes = { @@ -215,7 +215,7 @@ QOS_BLOCK { "max_client_read_bw": "4000000", "max_client_write_bw": "3000000", "max_export_read_bw": "2000000", - "max_export_write_bw": "1000000", + "max_export_write_bw": "2000000", "enable_iops_control": False } @@ -1460,7 +1460,7 @@ EXPORT { assert qos.enable_qos == True assert qos.bw_obj.enable_bw_ctrl == True assert isinstance(qos.qos_type, QOSType) - assert qos.bw_obj.export_writebw == 1000000 + assert qos.bw_obj.export_writebw == 2000000 assert qos.bw_obj.export_readbw == 2000000 assert qos.bw_obj.client_writebw == 3000000 assert qos.bw_obj.client_readbw == 4000000 @@ -1469,7 +1469,7 @@ EXPORT { assert qos.enable_qos == True assert qos.bw_obj.enable_bw_ctrl == True assert qos.qos_type is None - assert qos.bw_obj.export_writebw == 1000000 + assert qos.bw_obj.export_writebw == 2000000 assert qos.bw_obj.export_readbw == 2000000 assert qos.bw_obj.client_writebw == 3000000 assert qos.bw_obj.client_readbw == 4000000