]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
CAF MA Performance Issues
authorOliver Kurth <okurth@vmware.com>
Sat, 9 Dec 2017 02:57:38 +0000 (18:57 -0800)
committerOliver Kurth <okurth@vmware.com>
Sat, 9 Dec 2017 02:57:38 +0000 (18:57 -0800)
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.

open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CMonitorListener.cpp
open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CMonitorListener.h
open-vm-tools/common-agent/etc/config/ma-context.xml

index 5dba9064f57d53d696fe57d08a0e83b9095b6de5..cc5a63f0f18411041940c41d3c1e365cc5f7823a 100644 (file)
@@ -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;
-}
 
 
 
index a3dd5a3e41ecf0d77b912a80105e5ff0a828a013..e8899f55ade72f53c75816008edacc9493c663f2 100644 (file)
@@ -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;
index cf0c0a4b219fdd253fe10b65b5265d84c8b6719e..8e9074a72aa24c234e118dfa77c085cd652da300 100644 (file)
        <monitor-inbound-channel-adapter
                id="monitorInboundChannelAdapterId"
                channel="nullChannel">
-               <poller fixed-rate="5000"/>
+               <poller fixed-rate="300000"/>
        </monitor-inbound-channel-adapter>
 </caf:beans>