L.2 ahfctl setresourcelimit

Use the ahfctl setresourcelimit command to restrict the CPU and memory usage of Oracle Trace File Analyzer.

Syntax

ahfctl setresourcelimit 
[-tool tool_name] 
[-resource resource_type] 
[-value value]

Parameters

Table L-2 ahfctl setresourcelimit Command Parameters

Parameter Description

value

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: ahfctl setresourcelimit -value 0.5

You can limit memory usage either at the system level using ahfctl setresourcelimit -resource kmem or combined system and swap memory using ahfctl setresourcelimit -resource swmem.

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.

tool

Currently, you can only specify tfa.

Default: tfa

resource

You can specify either CPU or memory.

Example L-2 setresourcelimit Examples

On a server with 10 CPUs, the default limit will be 4 CPUs:
# ahfctl setresourcelimit
Tool TFA: Resource CPU: Limit value: 4
On a server with 4 CPUs, the default limit will be 3 CPUs (75% of available CPUs):
ahfctl setresourcelimit
Tool TFA: Resource CPU: Limit value: 3
# ahfctl setresourcelimit -value 2
Tool TFA: Resource CPU: Limit value: 2
To limit the memory usage to only 500 MB of system memory run:
ahfctl setresourcelimit -resource kmem -value 500
To limit the combined total of system memory and the swap memory to 1 GB run:
ahfctl setresourcelimit -resource swmem -value 1024