c71c91e2b0
#### Why I did it Profiling the system state on init after fast-reboot during create_switch function execution, it is possible to see few python scripts running at the same time. This parallel execution consume CPU time and the duration of create_switch is longer than it should be. Following this finding, and the motivation to ensure these services will not interfere in the future, PMON is delayed in 90 seconds until the system finish the init flow after fastboot. #### How I did it Add a timer for PMON service. Exclude for MLNX platform the start trigger of PMON when SYNCD starts in case of fastboot. Copy the timer file to the host bin image. #### How to verify it Run fast-reboot on MLNX platform and observe faster create_switch execution time.
57 lines
3.5 KiB
Django/Jinja
57 lines
3.5 KiB
Django/Jinja
{
|
|
"DEVICE_METADATA": {
|
|
"localhost": {
|
|
"buffer_model": {% if default_buffer_model == "dynamic" %}"dynamic"{% else %}"traditional"{% endif %},
|
|
"default_bgp_status": {% if shutdown_bgp_on_start == "y" %}"down"{% else %}"up"{% endif %},
|
|
"default_pfcwd_status": {% if enable_pfcwd_on_start == "y" %}"enable"{% else %}"disable"{% endif %}
|
|
}
|
|
},
|
|
"CRM": {
|
|
"Config": {
|
|
"polling_interval": "300",
|
|
{%- for crm_res in ["ipv4_route", "ipv6_route", "ipv4_nexthop", "ipv6_nexthop", "ipv4_neighbor",
|
|
"ipv6_neighbor", "nexthop_group_member", "nexthop_group", "acl_table",
|
|
"acl_group", "acl_entry", "acl_counter", "fdb_entry", "snat_entry", "dnat_entry", "ipmc_entry"] %}
|
|
"{{crm_res}}_threshold_type": "percentage",
|
|
"{{crm_res}}_low_threshold": "70",
|
|
"{{crm_res}}_high_threshold": "85"{% if not loop.last %},{% endif -%}
|
|
{% endfor %}
|
|
}
|
|
},
|
|
{%- set features = [("bgp", "enabled", false, "enabled"),
|
|
("database", "always_enabled", false, "always_enabled"),
|
|
("dhcp_relay", "enabled", false, "enabled"),
|
|
("lldp", "enabled", true, "enabled"),
|
|
("pmon", "enabled", true, "enabled"),
|
|
("radv", "enabled", false, "enabled"),
|
|
("snmp", "enabled", true, "enabled"),
|
|
("swss", "enabled", false, "enabled"),
|
|
("syncd", "enabled", false, "enabled"),
|
|
("teamd", "enabled", false, "enabled")] %}
|
|
{%- if sonic_asic_platform == "vs" %}{% do features.append(("gbsyncd", "enabled", false, "enabled")) %}{% endif %}
|
|
{%- if include_iccpd == "y" %}{% do features.append(("iccpd", "disabled", false, "enabled")) %}{% endif %}
|
|
{%- if include_mgmt_framework == "y" %}{% do features.append(("mgmt-framework", "enabled", true, "enabled")) %}{% endif %}
|
|
{%- if include_mux == "y" %}{% do features.append(("mux", "{% if 'subtype' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['subtype'] == 'DualToR' %}enabled{% else %}always_disabled{% endif %}", false, "enabled")) %}{% endif %}
|
|
{%- if include_nat == "y" %}{% do features.append(("nat", "disabled", false, "enabled")) %}{% endif %}
|
|
{%- if include_restapi == "y" %}{% do features.append(("restapi", "enabled", false, "enabled")) %}{% endif %}
|
|
{%- if include_sflow == "y" %}{% do features.append(("sflow", "disabled", false, "enabled")) %}{% endif %}
|
|
{%- if include_system_telemetry == "y" %}{% do features.append(("telemetry", "enabled", true, "enabled")) %}{% endif %}
|
|
"FEATURE": {
|
|
{# has_timer field if set, will start the feature systemd .timer unit instead of .service unit #}
|
|
{%- for feature, state, has_timer, autorestart in features %}
|
|
"{{feature}}": {
|
|
"state": "{{state}}",
|
|
"has_timer" : {{has_timer | lower()}},
|
|
"has_global_scope": {% if feature + '.service' in installer_services.split(' ') %}true{% else %}false{% endif %},
|
|
"has_per_asic_scope": {% if feature + '@.service' in installer_services.split(' ') %}true{% else %}false{% endif %},
|
|
"auto_restart": "{{autorestart}}",
|
|
{%- if include_kubernetes == "y" %}
|
|
{%- if feature in ["dhcp_relay", "lldp", "pmon", "radv", "snmp", "telemetry"] %}
|
|
"set_owner": "kube", {% else %}
|
|
"set_owner": "local", {% endif %} {% endif %}
|
|
"high_mem_alert": "disabled"
|
|
}{% if not loop.last %},{% endif -%}
|
|
{% endfor %}
|
|
}
|
|
}
|