This topic describes how to modify the number of cache files to limit the memory size of a Hybrid Backup Recovery (HBR) client.

Background information

HBR may consume a large amount of memory resources when it backs up a large number of files. To resolve this issue, you can limit the number of cache files that the HBR client can use. This reduces the consumption of memory resources. You can perform this operation by modifying the configuration file of the HBR client.

Procedure

  1. Log on to the host from which files are backed up.
  2. Open the installation folder of the HBR client.
    • Linux
      • The default installation path for a backup client of the new version is /opt/alibabacloud/hbrclient.
      • The default installation path for a backup client of an earlier version is /opt/alibabacloud/hbr.
    • Windows
      • By default, the installation path for a backup client of the new version is C:\Program Files\Aliyun Hybrid Backup Service Client.
      • By default, the installation path for a backup client of earlier versions is C:\Program Files\Aliyun Hybrid Backup Service.
  3. Create a file named hbr.config in the client folder.
    Note
    • If the hbr.config file already exists, you do not need to create a new one. You can modify the existing file.
    • The hbr.config file must be at the same directory level as the ids file.
  4. Set the following parameters of the hbr.config file.

    HBR may consume a large amount of memory resources when it backs up a large number of files. You can modify the configuration file of the HBR client to limit the number of cache files and concurrent files. This reduces the consumption of memory resources during the file backup operation. For more information about the memory required for file backup, see What are resource requirements for backup?.

    Parameter Description
    max_tree_nodes The maximum number of metadata files that can be cached in memory. Valid values: 1 to 16384. The recommended value is 16384.
    max_read_dir_names The maximum number of files that can be buffered in memory. Valid values: 1 to 100000. The recommended value is 100000.
    max_file_workers The maximum number of concurrent file or directory backups. Default value: 10.
    max_blob_uploader The maximum number of concurrent data blocks of the files to upload. Default value: 32.

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

    max_tree_nodes=16384
    max_read_dir_names=100000
    max_file_workers=5
    max_blob_uploader=15