IBM Support

IBM APM 8.1 : how to limit Response Time agent cpu usage?

How To


Summary

How to limit response time agent's analyzer cpu usage?

Objective

The objective is to reduce the cpu usage of kfcmserver.exe process [on Windows(tm)], or kfcm120.exe process [on UNIX(tm) or Linux(tm)].

Environment

Application Performance Management version 8.1
Response Time agent 8.1

Steps

As documented in this IBM Knowledge Center documentation link:
https://www.ibm.com/support/knowledgecenter/en/SSHLNR_8.1.4/com.ibm.pm.doc/install/wrt_config_cpulimit.html
You can define 2 parameters inside kfcmenv file:
KFC_MAX_PROTOCOL_PACKETRATE
KFC_CPUTHROTTLE_TARGET
Windows(tm) example:
KFC_MAX_PROTOCOL_PACKETRATE=5000
KFC_CPUTHROTTLE_TARGET=1.5
The value of KFC_MAX_PROTOCOL_PACKETRATE is the initial processing rate when KFC_CPUTHROTTLE_TARGET is set.
It then speeds up to get the suitable processing rate of the system.
If you do not set KFC_MAX_PROTOCOL_PACKETRATE, Packet Analyzer increases the processing rate from 50.

 
It means that if you set the KFC_THROTTLE_TARGET, the packet rate value is increasing (starting from 50 per second) until the ceiling level of the CPU target is met.
Without setting the CPU target, the Packet Analyzer continues to take CPU and increases the packet rate to the maximum it can achieve (given the rate at which the packets are being received).
If you do set the KFC_CPUTHROTTLE_TARGET, then it dictates the maximum packet rate that can be achieved regardless of what you set.

Based on a combination of KFC_MAX_PROTOCOL_PACKETRATE and KFC_CPU_THROTTLE_TARGET, the agent will handle packets at the rate set by you until CPU hits the throttle target. At this point, it will drop packets to maintain the CPU level within your set limit so in reality the packet rate is dynamically scaled back to keep to the CPU limit.
If you need, you can add the following line inside kfcmenv file:
KBB_RAS1=ERROR (UNIT:CPUThrottleProvider ALL ER)
Then, restart the response time agent. You will get extra tracing inside the analyzer's log file.
If you look at the log file content [kfcm120*.log on UNIX(tm), or kfcmserver*.log on Windows(tm)], you will see entries like documented in this log's snippet:
For example, if you have set:
KFC_MAX_PROTOCOL_PACKETRATE=5000
KFC_CPUTHROTTLE_TARGET=1.5
then, here the packet analyzer of Response Time agent can monitor only around 50 packets/second.
Remark 1: 50 packets/second is the minimal value of KFC_MAX_PROTOCOL_PACKETRATE, by code. 

cputhrottleprovider.cpp,144,"CPUThrottleProvider::newCycle") Cycle Refresh allocationleft = 5000
cputhrottleprovider.cpp,130,"CPUThrottleProvider::newCycle") Used packet rate is 2450.000000 pprate = 0.008041 newrate = 186 oldrate=5000 leftover=0
cputhrottleprovider.cpp,140,"CPUThrottleProvider::newCycle") Current CPU is 19.700116% current rate = 186 allocationleft = 0
cputhrottleprovider.cpp,140,"CPUThrottleProvider::newCycle") Current CPU is 2.925503% current rate = 95 allocationleft = 0
cputhrottleprovider.cpp,140,"CPUThrottleProvider::newCycle") Current CPU is 1.703924% current rate = 83 allocationleft = 0
cputhrottleprovider.cpp,140,"CPUThrottleProvider::newCycle") Current CPU is 1.365851% current rate = 91 allocationleft = 0
cputhrottleprovider.cpp,140,"CPUThrottleProvider::newCycle") Current CPU is 2.120477% current rate = 64 allocationleft = 0
cputhrottleprovider.cpp,140,"CPUThrottleProvider::newCycle") Current CPU is 2.233958% current rate = 50 allocationleft = 0
cputhrottleprovider.cpp,140,"CPUThrottleProvider::newCycle
Remark 2:
As documented in the APM documentation link,
The value for parameter KFC_CPUTHROTTLE_TARGET is the percentage of the overall CPU resource that is available for the kfcmserver process. For example, if you have 4 CPU cores and KFC_CPUTHROTTLE_TARGET is set to 10, the resource monitor in Windows(tm) measures CPU resource as 400%. As a result, the kfcmserver process can use up to 40% of the total 400% CPU resources available.
Remark 3:
KFCMENV file location:
UNIX(tm): /opt/ibm/apm/tmaitm6/wrm/kfcmenv
Windows(tm): C:\IBM\APM\TMAITM6_x84\wrm|Analyzer\kfcmenv
Response Time ANALYSER log file location:
UNIX(tm): /opt/ibm/apm/tmaitm6/wrm/<OS platform>/kfcm120_<timestamp>.log
Windows(tm): C:\IBM\APM\TMAITM6_x84\wrm|Analyzer\<hostname>_kfcmserver_<timestamp>.log
Remark 4:
On UNIX(tm) and Linux(tm) kfcmenv file, the syntax to set up these two variables documented here is:
KFC_MAX_PROTOCOL_PACKETRATE=5000; export KFC_MAX_PROTOCOL_PACKETRATE
KFC_CPUTHROTTLE_TARGET=1.5; export KFC_CPUTHROTTLE_TARGET

Document Location

Worldwide

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSVJUL","label":"IBM Application Performance Management"},"Component":"response time;T5;RT","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"8.1","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Historical Number

TS002365684;

Product Synonym

APM;IPM;

Document Information

Modified date:
19 December 2019

UID

ibm11142602