Legacy Knowledge Base
Published Sep. 10, 2025

Why is there a large difference in CPU usage within a clustered environment?

Written By

Tony Ng

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • When viewing Application Metrics, there is a large difference in CPU usage within a clustered environment.
  • For example, CPU usage is showing 5% on one node while it is 50% on another node.

Environment

  • Liferay PaaS

Resolution

  • High CPU usage on one node while the other is low and vice-versa is normal and expected behavior for a properly configured Liferay cluster.
  • The system is operating as designed. The high CPU usage indicates that one of the nodes is correctly handling the necessary background processing for the entire cluster(see additional information below).

Additional Information

  • Here’s a breakdown of what’s happening:
    • Background Jobs: Your Liferay application needs to run heavy background tasks for the whole system, such as search indexing and data processing.
    • Smart Task Handling: To prevent both nodes from doing the same work at the same time (which would be inefficient and cause errors), Liferay intelligently elects one single node to be the "worker" for these tasks.
    • CPU Usage: The node chosen as the "worker" will naturally show higher CPU usage because it's doing two jobs: serving users and running all the background tasks. The other node serves user traffic, so its CPU usage remains low.
    • The Switch: The role of the "worker" node isn't permanent. It can switch to the other node if the first one restarts or during normal cluster operations. This is why you see the high CPU usage pattern swap between nodes.
  • This behavior is not a Kubernetes failure or a load-balancing problem.

 

 

Did this article resolve your issue ?

Legacy Knowledge Base