From: Oliver Kurth Date: Sat, 9 Dec 2017 02:57:38 +0000 (-0800) Subject: CAF MA Performance Issues X-Git-Tag: stable-10.2.0~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f58396af22966f23610bff164247771c82f2687f;p=thirdparty%2Fopen-vm-tools.git CAF MA Performance Issues CAF MA Performance Issues Vmware CAF ManagementAgentHost service was polling every 5 secs to check if Guest Network "Tunnel(port 6672)" was enabled to preconfigure & bring up Vmware CAF CommAmqpListener service. This resulted in more CPU Utilization as opposed to previous release in CAF & caused regression in vmtools 10.2.0. We are increasing the Poll rate to 5 mins, which fixed the issue & is giving us the same CPU/memory utilizations as in vmtools 10.1.0. We were checking for the different stages of listener preconfiguration status from the listenerpreConfigure.txt files in the polling time interval, which caused increased IO operations. To fix that we have stored the value of listener preconfiguration status from the files into a variable locally & using the same at all places instead of file access. --- diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CMonitorListener.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CMonitorListener.cpp index 5dba9064f..cc5a63f0f 100644 --- a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CMonitorListener.cpp +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CMonitorListener.cpp @@ -36,6 +36,7 @@ void CMonitorListener::initialize() { "listener_ctrl_preconfigure") ? true : false; _listenerCtrlFollowTunnel = AppConfigUtils::getRequiredUint32("monitor", "listener_ctrl_follow_tunnel") ? true : false; + _listenerPreConfigured = FileSystemUtils::doesFileExist(_listenerPreConfiguredPath) ? true : false; _scriptOutputDir = AppConfigUtils::getRequiredString(_sConfigTmpDir); const std::string installDir = AppConfigUtils::getRequiredString("install_dir"); @@ -188,9 +189,6 @@ void CMonitorListener::listenerPreConfigured( FileSystemUtils::saveTextFile(_listenerPreConfiguredPath, reason); } -bool CMonitorListener::isListenerPreConfigured() { - return FileSystemUtils::doesFileExist(_listenerPreConfiguredPath) ? true : false; -} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CMonitorListener.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CMonitorListener.h index a3dd5a3e4..e8899f55a 100644 --- a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CMonitorListener.h +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CMonitorListener.h @@ -23,7 +23,9 @@ public: bool preConfigureListener(); - bool isListenerPreConfigured(); + bool isListenerPreConfigured() { + return _listenerPreConfigured; + } bool followTunnel(std::string& listenerStartupType); @@ -47,10 +49,13 @@ public: void listenerPreConfigured(const std::string& reason) const; + + private: bool _isInitialized; bool _listenerCtrlPreConfigure; bool _listenerCtrlFollowTunnel; + bool _listenerPreConfigured; std::string _startListenerScript; std::string _restartListenerPath; diff --git a/open-vm-tools/common-agent/etc/config/ma-context.xml b/open-vm-tools/common-agent/etc/config/ma-context.xml index cf0c0a4b2..8e9074a72 100644 --- a/open-vm-tools/common-agent/etc/config/ma-context.xml +++ b/open-vm-tools/common-agent/etc/config/ma-context.xml @@ -335,6 +335,6 @@ - +