All Products
Search
Document Center

Security Center:Troubleshoot the issues that backup tasks consume a large number of disk and memory resources

Last Updated:Jul 27, 2023

To improve the efficiency of data backup, the anti-ransomware feature caches data during the backup. By default, data backup caches consume memory and disk resources on your server. If the backup cache files that are stored on your server occupy a large volume of disk space or if out of memory (OOM) errors occur on your server, backup tasks may fail. This topic describes how to troubleshoot issues that backup tasks consume a large number of disk and memory resources.

A large volume of disk space is occupied

Problem description

Anti-ransomware backup tasks occupy a large volume of disk space of the server.

Cause

In most cases, backup files are temporarily stored on a disk of your server and backup caches are generated. After the backup files are uploaded to the cloud, the backup caches on the server are automatically deleted. If a large number of backup files exist, the size of a backup file is large, or a program does not run as expected, the backup caches may occupy a large volume of disk space.

Solution 1: Clear backup caches

To clear backup caches, perform the following steps:

  1. If the client protection feature of Security Center is enabled for your server, disable the feature for your server.

    If the client protection feature is enabled for your server, Security Center automatically protects the files that are stored in the directory of the Security Center agent. If you want to modify the files in the directory of the Security Center agent and clear cache files, you must disable client protection for the server. For more information about the client protection feature, see Client Protection.

  2. Log on to the server by using an account that has administrative rights.

  3. Clear the backup cache files that are stored in the directory on your server.

    The following table lists the directory in which the backup cache files are stored for each version of the anti-ransomware agent. You can view the version of the anti-ransomware agent installed on your server on the Anti-ransomware page of the Security Center console.

    Agent version

    Operating system of the server

    Directory in which the backup cache files are stored

    1.X.X

    Windows

    C:\Program Files (x86)\Alibaba\Aegis\hbr\cache

    Linux

    /usr/local/aegis/hbr/cache

    2.X.X

    Windows

    C:\Program Files (x86)\Alibaba\Aegis\hbrclient\cache

    Linux

    /usr/local/aegis/hbrclient/cache

    Note

    After you enable the anti-ransomware feature for your server, the feature backs up the specified files in the cloud. If you delete the cache files, the backup files are not affected.

Solution 2: Modify backup cache configurations

To modify the directory in which the caches are stored, the status of the caches, and the upper limit of the memory that the caches can occupy, perform the following steps:

  1. Log on to the server by using an account that has administrative rights.

  2. Go to the directory in which the anti-ransomware agent is installed.

    The following table lists the default installation directory for each version of the anti-ransomware agent.

    Agent version

    Operating system of the server

    Installation directory of the anti-ransomware agent

    1.X.X

    Windows

    C:\Program Files (x86)\Alibaba\Aegis\hbr\client

    Linux

    /usr/local/aegis/hbr/client

    2.X.X

    Windows

    C:\Program Files (x86)\Alibaba\Aegis\hbrclient\client

    Linux

    /usr/local/aegis/hbrclient/client

  3. Go to the installation directory of the anti-ransomware agent and create a file named hbr.config. The default installation directory is ../client.

  4. In the hbr.config file, configure the parameters that are described in the following table to add data IDs and metadata caches. Then, save the file.

    You can configure the parameters in the hbr.config file to specify the directory in which the caches are stored and the upper limit of the system memory that the caches can occupy.

    The following example shows the configurations of the hbr.config file:

    disable_blob_cache = false
    max_blob_cache_weight = 0.15
    cache_prefix = D:\CacheFolder
    max_retain_count = 16
    disable_file_cache = false
    file_cache_max_size_hint = 2g

    Parameter

    Description

    disable_blob_cache

    Specifies whether to cache data entry IDs. If you cache data entry IDs, you can accelerate the data backup process by using cached data entry IDs and metadata. This reduces network requests during data backup. Valid values:

    • true: does not cache data entry IDs.

    • false: caches data entry IDs.

    max_blob_cache_weight

    The maximum percentage of system memory that cached data entry IDs can occupy.

    The value must be within the range between 0 and 1. The default value is 0.15, which indicates that the cached data entry IDs can occupy up to 15% of system memory.

    cache_prefix

    The path to the caches.

    The path must be an absolute path.

    max_retain_count

    The maximum number of cached data entry IDs that can be retained.

    The value must be an integer.

    disable_file_cache

    Specifies whether to cache metadata. Valid values:

    • true: does not cache metadata.

    • false: caches metadata.

    file_cache_max_size_hint

    The maximum disk space that the metadata cache files can occupy. The actual disk space occupied by the files may exceed the specified value.

    Default value: 2 GB.

    Note
    • If you set the parameter to 2 GB, you can back up a minimum of 4 TB of metadata.

    • The value of the parameter cannot exceed the available disk space.

    • If you specify a value that is too small, your backup task does not fail but the cache performance is deteriorated.

    Note

    After you modify the directory in which the cache files are stored, you do not need to restart the anti-ransomware agent. The new configuration automatically takes effect upon the next backup.

OOM error occurs

Problem description

In the Backup Tasks panel on the Anti-ransomware page, the status of a backup task is Failed, and the error message indicating an OOM error is reported.

Cause

When Security Center backs up an excessively large amount of data, the backup task may consume a large number of system resources. If the system resources are insufficient in this scenario, the backup process may trigger an OOM issue and then is terminated by the system. As a result, the backup task fails.

Solution

Important

If you encounter an OOM issue, you can expand the memory or CPU capacity of your server, or try to resolve the issue based on the following solution.

You can split the backup directory that you specified in the anti-ransomware policy into multiple directories. Then, backup tasks are run in series for the new directories. The amount of data in each new directory is reduced. Therefore, the resources consumed by each backup task are reduced.

The following example shows the backup directory in an anti-ransomware policy.

image.png

You can split the backup directory into three directories. The following figure shows an example.

Note

After the splitting, Security Center runs backup tasks based on the new directories. The data that is backed up is not affected.

image.png