initialize

Function

Initializes the MindIO ACP client.

Format

mindio_acp.initialize(server_info: Dict[str, str] = None) -> int

Parameters

Parameter

Mandatory/Optional

Description

Value

server_info

Optional

Parameter information needed for the auto-startup server process. If this parameter is not transferred, the default value is used.

Valid parameter set or None

Table 1 server_info parameters

Parameter Key

Default Value

Mandatory/Optional

Description

Value Range

'memfs.data_block_pool_capacity_in_gb'

'128'

Optional

Memory size allocated to the MindIO ACP file system, in GB. Set this parameter based on the memory size of the server. It is recommended that the value be less than or equal to 25% of the total system memory.

[1, 1024]

'memfs.data_block_size_in_mb'

'128'

Optional

Minimum granularity for allocating file data blocks, in MB. Set this parameter based on the sizes of most files in application scenarios. It is recommended that the average data block size of each file be less than or equal to 128 MB.

[1, 1024]

'memfs.write.parallel.enabled'

'true'

Optional

Optimization for MindIO ACP concurrent read/write performance. You need to determine whether to enable this function based on the service model characteristics.

  • false: disable
  • true: enable

'memfs.write.parallel.thread_num'

'16'

Optional

Number of concurrent threads for MindIO ACP read/write performance optimization.

[2, 96]

'memfs.write.parallel.slice_in_mb'

'16'

Optional

Data segmentation granularity for MindIO ACP concurrent write performance optimization, in MB.

[1, 1024]

'background.backup.thread_num'

'32'

Optional

Number of backup threads.

[1, 256]

If server_info is not passed to mindio_acp.initialize, the server is started based on the default parameters in the table.

Usage Example 1

>>> # Initialize with default param
>>> mindio_acp.initialize()

Usage Example 2

>>> # Initialize with server_info
>>> server_info = {
        'memfs.data_block_pool_capacity_in_gb': '200',
    }
>>> mindio_acp.initialize(server_info=server_info)

Return Value

  • 0: success
  • -1: failure