affinity self
Use affinity self to set the affinity of one instance of a process to any other instance of the same process.
Use undo affinity self to remove the configuration.
Syntax
affinity self { attract strength | default | none | repulse strength }
undo affinity self
Default
No self affinity is set for any process.
Views
Placement process view
Predefined user roles
network-admin
Parameters
attract strength: Specifies a positive affinity in the range of 1 to 100000. The higher the value, the stronger the preference for all the instances of the current process to run on the same location.
default: Sets the affinity to the default, a positive affinity of 200.
none: Sets the affinity to 0, which means the instances of the process have no preference to run on the same location and the system determines their locations.
repulse strength: Sets a negative affinity in the range of 1 to 100000. The higher the value, the weaker the preference for all the instances of the current process to run on the same location.
Usage guidelines
This command sets the preference for a process to run all its instances on the same location or different locations. If the process has only one instance, the command does not take effect.
The self affinity in the placement process view of a process and any of its instances overwrite each other, and whichever is configured the last takes effect on all the instances of the process.
To view the instances of a process, use the display placement program all command.
Examples
# Configure a negative self affinity of 200 for BGP.
<Sysname> system-view [Sysname] placement program bgp [Sysname-program-bgp] affinity self repulse 200
Related commands
affinity location-set
affinity location-type