9.2.10.2 ahfctl setresourcelimit
Use the ahfctl setresourcelimit
command to restrict the CPU
and memory usage of Oracle Trace File Analyzer.
Note:
This feature is available only on Linux and only when Autonomous Health Framework is installed using a full installation by theroot
user.
AHF 25.1
CPU Resource Limiting on Oracle Linux 9
AHF now supports CPU resource limiting using cgroups
v2, which is the default on Oracle Linux 9.
By default, AHF’s CPU usage is automatically restricted through the Linux cgroups
feature, ensuring it does not consume excessive CPU resources out of the box. Users can easily adjust the CPU allocation for AHF to meet their specific needs. Oracle Linux 9 introduces the new cgroups
v2 as its default, and starting with AHF 25.1, both cgroups
v1 and v2 are fully supported by AHF.
Syntax
ahfctl setresourcelimit [-h]
[-tool {tfa}]
[-resource {cpu,kmem,swmem}]
[-value VALUE]
[-debug]
[-force]
Parameters
Table 9-32 ahfctl setresourcelimit Command Parameters
Parameter | Description |
---|---|
|
Set the limit to a minimum of 50% of a single CPU, and a maximum of 4 or 75% of the available CPUs, whichever is lower. By default, the CPU limit is set to the maximum. To limit TFA to a maximum of 50% of
a single CPU: You can limit memory usage either
at the system level using Set the kernel memory to a minimum of 500 MB, and a maximum of 2048 MB or 20% of the available memory, whichever is lower. By default, the kernel memory (kmem) limit is not set. Set the system and swap memory to a minimum of 1024 MB, and a maximum of 8192 MB or 50% of the available memory, whichever is lower. By default, the system and swap memory (swmem) limit is not set. |
|
Currently, you can only specify Default:
|
|
You can specify either CPU or memory. |
|
Specify to limit the value.
|
|
Specify to enable debugging. |
|
Specify to set the resource value beyond the
|
Example 9-35 setresourcelimit Examples
# ahfctl setresourcelimit
Tool TFA: Resource CPU: Limit value: 4
ahfctl setresourcelimit
Tool TFA: Resource CPU: Limit value: 3
# ahfctl setresourcelimit -value 2
Tool TFA: Resource CPU: Limit value: 2
ahfctl setresourcelimit -resource kmem -value 500
ahfctl setresourcelimit -resource swmem -value 1024
Parent topic: Running AHFCTL Commands to Limit CPU and Memory Usage