Skip to content

Bug: 'config apply-patch' takes a lot of time to execute #22370

@ayurkiv-nvda

Description

@ayurkiv-nvda

patch_1.txt
patch_3.txt
patch_2.txt

Is it platform specific

generic

Importance or Severity

High

Description of the bug

During testing sonic-mgmt/tests/generic_config_updater/test_dynamic_acl.py::test_gcu_acl_scale_rule on different platforms, we found correlation between number of ports on switch and time of executing config apply-patch acl.patch (acl.patch contains 150 ACL rules)

If there are more than 500 ports on switch it may take almost 10 minutes to execute the script, where 8 minutes is sorting, and 2 minutes is applying 150 ACL rules one by one.

Observation:

Steps to Reproduce

Auto:
Run sonic-mgmt/tests/generic_config_updater/test_dynamic_acl.py::test_gcu_acl_scale_rules
Measure time of executing config apply-patch patch_with_150_rules

Manual steps:

config apply-patch patch_1.txt
config apply-patch patch_2.txt
config apply-patch patch_3.txt

Actual Behavior and Expected Behavior

Actual - script execution may take minutes

Expected - script execution should take seconds

Relevant log output

Output of show version, show techsupport

Platform: x86_64-nvidia_sn5600-r0
HwSKU: Mellanox-SN5600-C256S1
ASIC: mellanox
ASIC Count: 1
Serial Number: MT2307XZ02H5
Model Number: SN5600
Hardware Revision: A4
Uptime: 16:31:14 up  9:01,  1 user,  load average: 1.28, 1.38, 1.38
Date: Fri 18 Apr 2025 16:31:14

Attach files (if any)

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions