affinity location-set

Use affinity location-set to set the affinity of a process to a set of CPUs.

Use undo affinity location-set to remove the configuration.

Syntax

affinity location-set { slot slot-number }&<1-5> { attract strength | default | none | repulse strength }

undo affinity location-set { slot slot-number }&<1-5>

Default

No location affinity is set for any process.

Views

Placement process view

Predefined user roles

network-admin

Parameters

attract strength: Sets a positive affinity in the range of 1 to 100000. The higher the value, the stronger the preference for the process to run in the specified CPU.

default: Sets the affinity to the default, a positive affinity of 200.

none: Sets the affinity to 0, which means the active process has no preference for any location and the system determines its location.

repulse strength: Sets a negative affinity in the range of 1 to 100000. The higher the value, the weaker the preference for the process to run in the specified CPU.

Usage guidelines

This command sets the preference for a process to run on a specific CPU. You can specify up to five CPUs in this command.

Examples

# Configure a positive affinity of 500 to IRF member device 3 for BGP.

<Sysname> system-view
[Sysname] placement program bgp
[Sysname-program-bgp] affinity location-set slot 3 attract 500