Install the P2P acceleration suite (ACK clusters 1.33 or later)

Updated at:

In large-scale container clusters, image pull speed is often limited by the bandwidth of the image registry. This topic describes how to enable the P2P module in a Container Registry Enterprise Edition instance. You then install the ack-p2pagent add-on in the node pools of an ACK cluster that runs version 1.33 or later. P2P distribution between nodes speeds up image pulls and shortens application deployment time.

Background information

When large-scale container clusters pull images in batches, the network bandwidth of the image registry becomes a performance bottleneck and image pulls slow down. P2P acceleration uses the bandwidth of your compute nodes to distribute images between nodes. This reduces the load on the image registry, significantly speeds up image pulls, and shortens application deployment time.

Test results show that in a cluster of 1,000 nodes pulling a 1 GB image, P2P acceleration reduces image pull time by more than 95% compared to standard image pulling (with a bandwidth of 10 Gbps as an example), and supports Load container images on demand with P2P acceleration by default.

Scope

Step 1: Enable the P2P module and obtain the P2P access IP address

  1. Log on to the Container Registry console.

  2. In the top navigation bar, select the desired region.

  3. In the left-side navigation pane, choose Instance.

  4. On the Instance page, click the target Enterprise Edition instance.

  5. On the Overview page, note the Instance ID. In the Component Settings section, turn on the P2P acceleration toggle. In the dialog box that appears, click Confirm.

    Warning

    Before turning off P2P acceleration, stop using P2P features and uninstall the P2P add-on from all clusters where it is installed. Re-enabling P2P acceleration requires reinstalling the P2P add-on.

  6. After P2P acceleration is enabled, in the left-side navigation pane, choose Access Control, and obtain the P2P access IP address from the VPC list.

    Note

    Make sure that the VPC of the ACK cluster is configured in the Container Registry Enterprise Edition instance. Ensure that the P2P access IP address corresponds to the VPC where the ACK cluster resides.

Step 2: Install the ack-p2pagent add-on in an ACK node pool

  1. Log on to the Container Service Management console.

  2. In the top navigation bar, select the desired region.

  3. In the left-side navigation pane, choose Clusters.

  4. On the Clusters page, click the name of the target cluster.

  5. In the left-side navigation pane, choose Nodes > Node Pools, and click the name of the target node pool.

    Note

    Validate the ack-p2pagent add-on in a new node pool before installing it in existing node pools.

  6. Choose Node Components, and then click Install Node Components. Select ack-p2pagent and enter the P2P access IP address obtained in Step 1 in the p2pRoot field. The following table describes some parameters of the ack-p2pagent add-on.

    To access the P2P Agent monitoring dashboard, also select Enable Prometheus Monitoring Metrics and then follow the on-screen instructions to complete the installation.

    filecache parameter

    Default value (disk mode)

    Default value (memory mode)

    Description

    blocksize

    256

    256

    The shard size for each request to the OSS data source.

    capacity

    4294967296

    0

    The disk cache size.

    optionBlockSize

    67108864

    8589934592

    The memory cache size:

    • In disk mode, this parameter defines the memory buffer size in the two-level cache (memory + disk) of P2P.

    • In memory mode, this value is the memory buffer size.

    memoryCacheCapacityGB

    1

    8

    • In disk mode, ignore this value and keep the default.

    • In memory mode, this value is the GB equivalent of optionBlockSize.

    aio

    0

    0

    Specifies whether to enable libaio. This parameter takes effect only in disk mode and is invalid in memory mode.

    • When using ESSD AutoPL disks or ESSD PL3 disks, enable this parameter to improve performance.

    • When you use ESSD PL0 disks or ESSD PL1 disks, the long flush time of aio causes a large number of timeout errors across the P2P network.

(Optional) Step 3: Access the P2P Agent monitoring dashboard

Billing

After cluster monitoring data is integrated with Alibaba Cloud Prometheus, the related add-ons automatically send monitoring metrics to Alibaba Cloud Prometheus. These metrics are treated as custom metrics. Custom metrics incur additional costs.

To avoid unexpected charges, review the Billing overview for Managed Service for Prometheus to understand the pricing of custom metrics before you enable this feature. Costs vary based on factors such as your cluster scale and the number of applications. You can use the resource usage statistics feature to monitor and manage your resource usage.

Procedure

  1. Log on to the Container Service Management console.

  2. In the top navigation bar, select the desired region.

  3. In the left-side navigation pane, choose Clusters.

  4. On the Clusters page, click the name of the target cluster.

  5. In the left-side navigation pane, choose Operations > Prometheus Monitoring and wait for the page to initialize.

  6. In the upper-right corner of the page, click Collection Configuration. On the Integration Management page, click Access Center.

  7. In the Access Center search box, search for P2P Agent Monitoring. Click the P2P Agent Monitoring card in the search results.

  8. In the P2P Agent Monitoring panel, select the cluster to monitor from the drop-down list and click OK to enable P2P Agent Monitoring.

  9. Go back to the Operations > Prometheus Monitoring page. Click the Others tab and find the P2P-Legacy Dashboard and P2P-NG Dashboard tabs to view the P2P Agent Monitoring dashboards.