How do I resolve OOM issues on a Cloud Backup client?

Updated at:

If an OOM (Out of Memory) issue occurs on the machine that hosts the backup client, backup jobs fail. You can try to resolve the OOM issue by adding CPU or memory resources, splitting the backup directory into multiple directories, configuring traffic shaping, or reducing the resource consumption of the client. This topic describes how to resolve OOM issues.

Background information

When you use Cloud Backup to back up data in scenarios with extremely large data volumes or insufficient system resources, the backup client may consume a large amount of system resources and encounter an OOM issue. If an OOM issue occurs, the system terminates the backup process because it runs out of memory, which causes the backup job to fail.

Important

If you encounter an OOM issue, you can scale up the memory or CPU capacity of the machine that hosts the backup client based on your needs, or try the approaches described in this topic. For general backup failures, we recommend that you try to resolve them by referring to Troubleshoot backup failures.

Method 1: Split the backup directory

Split the backup file path in the backup plan into multiple directories.

Within the same backup plan, backup jobs for the split directories run serially. Because each split directory contains less data than the original large directory, each backup job consumes fewer resources. For example, the backup file path in your backup plan is as follows:

-/backup
--/path1
--/path2
--/path3

You can then modify the backup plan to split the backup file path into three directories.

Note

After the split, the backup plan runs based on the split directories. The original backups and restores are not affected.

-/backup/path1
-/backup/path2
-/backup/path3

After the split, an orange warning appears in the backup file path configuration panel: Backing up multiple folders together may cause performance issues. We recommend that you split different folders into multiple backup plans and stagger their execution times. You can click Add Directory to add a path, or click Delete to the right of a path to remove it.

Method 2: Configure traffic shaping for a backup plan

In the Cloud Backup console, find the backup plan of the data source, edit the backup plan, enable traffic shaping, and then configure traffic shaping.

In the Advanced Settings section, turn on the Use Traffic Shaping switch. Use the Rate-limiting Period slider to select a time range (for example, 06:00 to 18:00). In the Maximum Traffic (MB) field, enter a rate limit value (for example, 5), and click Add to add the rule to the traffic shaping rule table below. You can add multiple rules to cover different time periods (for example, a rate limit of 20 MB from 00:00 to 06:00). After you finish the configuration, click OK.

Method 3: Reduce the resource consumption of the backup client

You can modify the backup client configuration file to control the number of concurrent files, which prevents the backup client from consuming excessive memory resources.

Important

This method does not apply to backing up anti-ransomware files on cloud security servers.

  1. Log on to the server that hosts the files to back up.

  2. Find and open the installation path of the backup client.

    • Linux

      • Default installation path of the new backup client: /opt/alibabacloud/hbrclient

      • Default installation path of the old backup client: /opt/alibabacloud/hbr/

    • Windows

      • Default installation path of the new backup client: C:\Program Files\Aliyun Hybrid Backup Service Client

      • Default installation path of the old backup client: C:\Program Files\Aliyun Hybrid Backup Service

  3. If the hbr.config file does not exist, create the hbr.config file in a subdirectory of the client folder.

    Note

    The hbr.config file must be at the same level as the ids file.

  4. Add the following parameters to the hbr.config file.

    By modifying the backup client configuration file to control the number of cache files and the file concurrency, you can reduce the memory usage during file backups. For the memory required by file backups, see Resource requirements for backup.

    The following is an example configuration of the hbr.config file:

    max_file_workers=5
    max_blob_uploader=16

    You can also directly download hbr.config.

    Parameter

    Description

    max_file_workers

    The number of concurrent file or directory backup jobs. Default value: 10.

    max_blob_uploader

    The number of concurrent file data block uploads. Default value: 32.

Related documentation for backup error handling

Important

If the issue persists, submit a ticket to get support.