Rate Limiting
Rate Limiting is implemented by monitoring the utilization of the device on a per-VF, per-service basis and comparing that to the SLA allocated to that VF and service.
Resources are shared across guests and the resource utilization of each guest is measured relative to the capacity of the physical function.
The feature is supported for SYM, ASYM, and DC services.
To enable the Rate Limiting feature:
Install the driver package on the host with Single-Root Input/Output Virtualization (SR-IOV) enabled.
Set
ServicesEnabled
toasym
orsym
ordc
.Perform
qat_service shutdown
andqat_service start
.
Service Level Agreement (SLA)
Service Level Agreement enforcement allocates a specified amount of capacity for a specified service to a specified VF: max SLA enforced = (number of VFs) X (number of services) where:
Number of VFs varies based on device type
Number of services = 2 (asymmetric or symmetric or compression)
SLA Units
SLA units are measured as follows:
Symmetric Crypto – 1Mbps of throughput.
Asymmetric Crypto – 1 operation (ops) of reference operation.
Compression - 1Mbps of throughput.
SLA Manager Application
The sla_mgr
tool is used to create, update, delete, list and get SLA capabilities.
The SLA Manager executable is available in $ICP_ROOT/build/sla_mgr
after the package is built and installed using ./configure; make install
commands.
SLA Commands
Operation |
Command |
---|---|
Create SLA |
|
Update SLA |
|
Delete SLA |
|
Delete all SLAs |
|
Query SLA capabilities |
|
Query list of SLAs |
|
Options:
pf_addr
- Physical address in domain:bus:device.function(xxxx:xx:xx.x) format.vf_addr
- Virtual address in domain:bus:device.function(xxxx:xx:xx.x) format.Service
- Asym(=0) or Sym(=1) or DC(=2).rate_in_sla_units
- [ 0-MAX]. MAX is found by querying the capabilities.sla_id
- Value returned bycreate
command.
One rate_in_sla_units
is equal to:
1 operation per second - for asymmetric service.
1 Megabits per second - for symmetric service/compression service.
SLA Manager Application Demo
Here is a demonstration of using the sla_mgr
tool to create, update, and delete SLAs.
The device utilization script from the previous section is used to visualize the SLAs in action.
The demo consists of the following steps:
Run Encryption workload without SLA in place to observe full utilization.
Create SLA enabling 75% of bandwidth and observe reduced utilization.
Update the SLA to enable 25% of bandwidth and observe reduced utilization.
Remove the SLA and verify full utilization.