In current Anti-Virus for VMware Tanzu / Anti-Virus Mirror for VMware Tanzu versions (prior to v2.4.4), customers might observe an issue that the clamd process is taking significant CPU resources on Cloud_controller VM(s).
And this issue has the following patterns:
The elevated CPU usage is caused by ClamAV scanning files under the following directory:
This directory is used by the Cloud Controller Prometheus exporter and is continuously updated with metric data. Each file modification triggers an on-access scan.
Due to the frequent updates, the same files are scanned repeatedly, which results in increased CPU utilization.
This behavior is expected when on-access scanning is applied to directories with frequent file updates and is consistent with how real-time scanning operates.
Temporary workaround:
The issue can be resolved by excluding the Prometheus temporary directory from on-access scanning:
Please add this path to the exclusion list in the Antivirus tile and redeploy so that the exclusion is persisted in clamd.conf. This ensures the change remains effective across restarts and future deployments.
OnAccessExcludePath /var/vcap/data/cloud_controller_ng/tmp/prometheusPermanent fix:
This issue is expected to be fixed in the future release - v2.4.4. Please contact Tanzu support team if you need further information or help.