NSX Load Balancer custom performance profile removed after upgrade to 4.2.
search cancel

NSX Load Balancer custom performance profile removed after upgrade to 4.2.

book

Article ID: 423286

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

Following an upgrade of VMware NSX from version 3.2 to version 4.2, we observe that the custom Load Balancer performance profile (perf-profile) has been removed.

  • The Load Balancer performance is noticeably degraded compared to the pre-upgrade state.

  • For example, when applied with the http perf-profile, below is how the load-balancer perf-profile looks like prior to the upgrade:

    edge_hostname> get load-balancer perf-profile config
    Load Balancer Performance Config
    Profile                 :medium vm http profile
    Dataplane
      Cores               :0
      Kni Fifo Size       :2048
      Kni Mbuf Burst Num  :1024
      Rx Ring Size        :1024
      Tx Ring Size        :1024
    Dispatcher
      Cores               :3
    Kni
      Cores               :1
      Rps Cpus            :2
    Engine
        Cores               :3

  • Post upgrade, we see that the custom perf-profile is removed:

    edge_hostname> get load-balancer perf-profile config
    No performance profile applied

Environment

VMware NSX

Cause

The root cause is a file path migration during the upgrade process. In version 4.2, the Load Balancer configuration files are moved from the /config path to the /opt path.

Specifically, the folder /config/vmware/edge/lb/etc/perf is removed as part of this migration. The file perf_config resides within this folder and is deleted during the removal process, resulting in the loss of the custom performance configuration.

Resolution

This will be fixed in one of the upcoming release of NSX.

Until then, on the upgraded edge nodes hosting the load-balancers with custom perf-profile, please apply the below workaround:

  1. Connect to the edge node using SSH and login with the root account.

  2. Copy the below content as it is and paste on the SSH session:

    cat <<EOF > /tmp/tmp.diff
    --- /opt/vmware/nsx-edge/bin/lb-perf-config.py  2000-01-01 00:00:00.000000000 +0000
    +++ /opt/vmware/nsx-edge/bin/lb-perf-config-2.py        2025-12-22 13:08:25.747380214 +0000
    @@ -14,6 +14,7 @@
     '''

     import argparse
    +import grp
     import logging
     import logging.handlers
     import os
    @@ -34,8 +35,9 @@
     EDGE_FLAVOR_SVM ='svm'

     LB_PERF_CONFIG_PATH = "/opt/vmware/nsx-edge/lb/etc/perf"
    +LB_PERF_CONFIG_OUTPUT_PATH = "/config/vmware/edge/lb/etc/perf"
     LB_PERF_PROFILE_FILE = LB_PERF_CONFIG_PATH + "/%s_%s_profile.json"
    -LB_PERF_CONFIG_FILE = "%s/perf_config" % LB_PERF_CONFIG_PATH
    +LB_PERF_CONFIG_FILE = "%s/perf_config" % LB_PERF_CONFIG_OUTPUT_PATH

     logger = logging.getLogger(__name__)

    @@ -324,6 +326,14 @@
             if 'rps_cpus' not in self.config['kni']:
                 self.config['kni']['rps_cpus'] = idle_procs

    +        if not os.path.exists(LB_PERF_CONFIG_OUTPUT_PATH):
    +            os.mkdir(LB_PERF_CONFIG_OUTPUT_PATH)
    +            group_id = grp.getgrnam("nsx").gr_gid
    +            os.chown(LB_PERF_CONFIG_OUTPUT_PATH, -1, group_id)
    +            os.chmod(LB_PERF_CONFIG_OUTPUT_PATH, 0o770)
    +            logger.debug(f"Directory '{LB_PERF_CONFIG_OUTPUT_PATH}' created.")
    +        else:
    +            logger.debug(f"Directory '{LB_PERF_CONFIG_OUTPUT_PATH}' already exists.")
             logger.debug("perf config: %s", str(self.config))
             with open(LB_PERF_CONFIG_FILE, 'w') as fp:
                 simplejson.dump(self.config, fp)
    EOF

  3. Run the below command to apply the patch:

    patch /opt/vmware/nsx-edge/bin/lb-perf-config.py /tmp/tmp.diff

  4. Run the below command to set the required perf-profile (http (or) https (or) l4):

    set load-balancer perf-profile <perf-profile-type>

  5. Repeat the above steps on all the edge nodes in the cluster that are hosting the load balancers with the custom perf-profile.