< Home

assign resource-class

Function

The assign resource-class command allocates a resource class to the virtual system.

The undo assign resource-class command deletes the resource class allocated to the virtual system.

Format

assign resource-class resource-class-name

undo assign resource-class

Parameters

Parameter Description Value
resource-class-name Specifies the name of a resource class. It must be the name of an existing resource class.

Views

Management view of the virtual system

Default Level

2: Configuration level

Usage Guidelines

By default, virtual systems are not associated with any resource classes. That is, virtual systems can use all resources of the device.

Application Scenarios

In case of multiple virtual systems on the FW, if a virtual system uses too many resources, other virtual systems may be unable to obtain resources, and services become abnormal. For example, a virtual system has many P2P services that consume too many bandwidth and connection resources, affecting the services of other virtual systems. In this case, you can bind virtual systems to resource classes to restrict the use of resources. In this manner, each virtual system can run properly.

Prerequisites

The resource-class command has been used to create a resource class for a virtual system.

Configuration Impact

After a virtual system is associated with a resource class, the resource class determines the resources available for the virtual system. For example, if the maximum number of IPv4 sessions in the resource class is 50,000, the virtual system can use a maximum of 50,000 concurrent sessions.

After a virtual system is bound to a resource class, the remaining number of a resource item in the global resource table is changed. For example, the guaranteed number of IPv4 session entries in a resource class is 20000. After the resource class is bound to a virtual system, the remaining number of session entries is reduced by 20000 (you can use the display resource global-resource command to check the global resource table).

If a virtual system is not bound to any resource class, the virtual system has no restriction on the use of resources. The virtual system preempts the remaining resources of the device with the root system and other virtual systems that are not bound to any resource class.

If no maximum value and guaranteed value is specified for some resource items of the resource class bound to the virtual system, the virtual system has no restriction on the use of these resource items. The virtual system preempts the remaining resources of the device with the root system and other virtual systems that have no restriction on the use of the resource items.

Subsequent Configuration

After a virtual system is bound to a resource class, you can run the display resource resource-usage command to view the resource usage of the virtual system. If the used number of a specific resource item approaches or reaches the maximum value, you need to increase the maximum value of the resource item to ensure service continuity. If the used number of a resource item is smaller than the guaranteed value, you can decrease the guaranteed value of the resource item to release some resources to other virtual systems.

Precautions

A resource class can be bound to multiple virtual systems, whereas a virtual system can be bound to only one resource class.

Before binding a resource class to a virtual system, ensure that the number of resources in the class meet the service requirements of the virtual system.

If you are unclear about the service quantity of the virtual system, do not bind any resource class to the virtual system.

Example

# Allocate a resource class to the virtual system.

<sysname> system-view
[sysname] vsys name vsys1
[sysname-vsys-vsys1] assign resource-class class1 
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >