limit-resource cpu
Use limit-resource cpu to specify a CPU weight for an MDC.
Use undo limit-resource cpu to restore the default.
Syntax
limit-resource cpu weight weight-value
undo limit-resource cpu
Default
Each MDC has a CPU weight of 10.
Views
MDC view
Predefined user roles
network-admin
mdc-admin
Parameters
weight weight-value: Specifies a CPU weight value in the range of 1 to 10.
Usage guidelines
The CPU weight setting for an MDC applies to the following cards:
All MPUs.
All LPUs that the MDC is authorized to use.
The amount of CPU resources an MDC can use depends on the percentage of its CPU weight among the CPU weights of all MDCs that share the same CPU. For example, if three MDCs share the same CPU, setting their weights to 10, 10, and 5 is equivalent to setting their weights to 2, 2, and 1.
The two MDCs with the same weight can use the CPU for approximately the same period of time.
The third MDC can use the CPU for about half of the time for each of the other two MDCs.
You can use this command to change the CPU weight for a non-default MDC. The CPU weight for the default MDC cannot be changed.
Examples
# Set the CPU weight to 2 for MDC sub1.
<Sysname> system-view [Sysname] mdc sub1 [Sysname-mdc-2-sub1] limit-resource cpu weight 2