This section discusses the steps to enable and deactivate the PCAP tx_ring using NSX Advanced Load Balancer shell prompt.

The tx_ring method is the default transmission mechanism in the current non-DPDK environments for NSX Advanced Load Balancer SEs. The PCAP tx_ring method consumes more memory compared to the PCAP socket mechanism. Due to the higher memory consumption, the rest of the processes might run into memory allocation failures in SEs having limited resources.

Due to resource constraints on the system, the tx_ring mode can cause packet drop issues in the transmission path in the non-DPDK deployment. Whenever the issue occurs with the default tx_ring method, an alternative raw socket approach is used to transfer the packets in the transmission path.

Enabling Raw Socket Effect

If the system is running with less than or equal to 2 GB RAM, the raw socket method is used to transfer the packets. In other cases, the tx_ring is the default transmission mechanism. The pcap_tx_mode knob helps override the default behavior by forcing the SE to use the tx_ring method or the raw socket method. The configuration is part of the SE group properties and takes effect once SE is restarted.

The configuration parameter for the tx_ring transmission option is enable_pcap_tx_ring. To enable the raw socket effect, deactivate the enable_pcap_tx_ring flag using NSX Advanced Load Balancer CLI and restart all the respective SEs.

Note:

This applies to all non-DPDK environments.

Deactivating PCAP_TX_Ring

Login to the NSX Advanced Load Balancer shell prompt and use the configure serviceenginegroup mode to deactivate the enable_pcap_tx_ring transmission mode, as shown below:

[admin:<controller-ip>]: > configure serviceenginegroup Default-Group 
[admin:<controller-ip>]: serviceenginegroup> no enable_pcap_tx_ring 
[admin:<controller-ip>]: serviceenginegroup> save
[admin:<controller-ip>]: >

Once the above command is executed, restart the affected SEs.

Enabling pcap_tx_ring Option through NSX Advanced Load Balancer CLI

Login to the NSX Advanced Load Balancer shell prompt using credentials. Use the configure serviceenginegroup mode to enable pcap_tx_mode as shown below:

[admin:<controller-ip>]: > configure serviceenginegroup Default-Group 
[admin:<controller-ip>]: serviceenginegroup>pcap_tx_mode pcap_tx_ring 
[admin:<controller-ip>]: serviceenginegroup> save
[admin:<controller-ip>]: >

Enabling pcap_tx_socket Option through the NSX Advanced Load Balancer CLI

[admin:<controller-ip>]: > configure serviceenginegroup Default-Group 
[admin:<controller-ip>]: serviceenginegroup>pcap_tx_mode pcap_tx_socket 
[admin:<controller-ip>]: serviceenginegroup> save
[admin:<controller-ip>]: >

Re-enabling PCAP_TX_Ring

To switch the transmission mode back to the tx_ring method, log into the NSX Advanced Load Balancer CLI and re-enable the method as shown below:

[admin:<controller-ip>]: > configure serviceenginegroup Default-Group 
[admin:<controller-ip>]: serviceenginegroup>enable_pcap_tx_ring 
[admin:<controller-ip>]: serviceenginegroup> save
[admin:<controller-ip>]: >