10 October 2023 Reading time: 3 minutes

Keep it balanced: distribute load among hosts using the new VMmanager service

ISPSystem

Despite the virtualization technology enabling deployment of stable infrastructure with strong performance, the issue of node overload is not uncommon. This issue may cause failure of services hosted by such nodes. VMmanager “balancer” enables prevention of the issue: it automates physical servers’ load level monitoring and load balancing among them, thus reducing man-made efforts. It requires setting-up by the administrator - the rest is managed by the service. Here are some details about the process.

Collecting information about node load

In order to understand what is happening with a node, the “balancer” requests information about CPU and RAM average load over a set period. This period is set by the administrator. For example, if the field “check interval” is set to 10 minutes, the service will request statistics for the last 10 minutes.

It takes about one minute to collect statistics. If the number of nodes is too large, this time period may be insufficient. In this case, the “balancer” will only process the data it has time to collect, and make decisions on their basis. The list of VMs hosted by nodes whose data were not checked is recorded in the log.

Collecting information about node load

Analyzing the collected information, preparing for migration

Once the statistics about nodes are collected, the “balancer” divides the nodes into two lists. The first list includes nodes with high load. By default, a node is considered overloaded if its CPU and RAM use is 70%, however this setting may be changed by the administrator. The second list includes nodes with low load. If a node is under maintenance, it is not included in the list.

Analyzing the collected information, preparing for migration

Then the service compiles another list, which includes virtual machines that may be migrated to a less loaded node in order to reduce the load of the current node. The administrator though may keep certain VMs on the current host and not apply the service to them.

If no overloaded nodes or nodes with sufficient space for VM migration have been found by the “balancer” during the check, no migration is performed in the current process.

The service will repeat the algorithm as time period specified by the administrator goes by.

Migration

The “balancer” migrates VM between nodes using a live migration. mechanism. It means that virtual machines will be accessible throughout the whole process.

The “balancer” can migrate nodes within a cluster, while inter-cluster migration is not possible.

We have described how to setup and operate the service in ou administrator documents.