Reduce high CPU usage by TFA
February 23, 2021 Leave a comment
Problem:
Cluster nodes experienced high CPU usage, after investigation one of the top CPU consumers on the server has been found to be a TFA process (2nd place):
# Fri Feb 19 17:44:01 2021
AllCPU OneCPU PID User PR NI STime RSS Name
--------------------------------------------------------------------------------
11.75% 94.02% 23895 root 20 0 17:43 87M ora_m001_ORCL2
1.42% 11.39% 2468 root 20 0 Feb02 736M /opt/oracle.ahf/jre/bin/java -server -Xms256m -Xmx512m -Djava.awt.headless=true -Ddisable.checkForUpdate=true -XX:HeapDumpPath=/u01/app/oracle.ahf/data/rac02/diag/tfa -XX:ParallelGCThreads=5 oracle.rat.tfa.TFAMain /opt/oracle.ahf/tfa
Workaround:
In newer version of TFA, you can set CPU resource limit.
tfactl setresourcelimit
[-tool tool_name]
[-resource resource_type]
[-value value]
To limit TFA to a maximum of 50% of a single CPU, run the following:
# tfactl setresourcelimit -value 0.5
For more information, please check TFA official documentation.
If you don’t have newer version of TFA, you need to upgrade it first.