Install the P2P acceleration suite (ACK cluster version 1.33 or later)
Enable the P2P module in a Container Registry Enterprise Edition instance and install the ack-p2pagent component in node pools of ACK clusters (version 1.33 or later). P2P image distribution between nodes speeds up image pulls in large-scale clusters and shortens application deployment time.
Background information
When large-scale container clusters download images in batches, the network bandwidth of container image storage can become a performance bottleneck, resulting in slow image pulls. The P2P acceleration feature can use the bandwidth resources of compute nodes to distribute images between nodes. This reduces the load on container image storage, significantly improves image pull speeds, and shortens application deployment time.
Tests show that, in a 1,000-node cluster, P2P acceleration reduces the time to pull a 1 GB image by more than 95% compared with conventional image pulling. The tests used a bandwidth of 10 Gbps as an example. It also supports P2P acceleration for Load container images on demand by default.
Applicability
The cluster must be an ACK managed or dedicated cluster and run version 1.33 or later.
The containerd version on cluster nodes must be 2.1.4 or later.
P2P acceleration applies only to Container Registry Enterprise Edition instances in the Standard or Advanced Edition.
Step 1: Enable the P2P module and get the P2P access IP address
Log on to the Container Registry console.
In the top menu bar, select the desired region.
In the left-side navigation pane, choose Instance.
On the Instance page, click the target Container Registry Enterprise Edition instance.
On the Overview page, record the Instance ID, and in the Component Settings section, turn on P2P acceleration. In the dialog box that appears, click Confirm.
WarningBefore you turn off P2P acceleration, stop using the P2P feature and uninstall the ack-p2pagent component from all clusters where it is installed. To turn P2P acceleration back on, you must reinstall the ack-p2pagent component.
After you turn on P2P acceleration, in the left-side navigation pane, choose Access Controland get the P2P access IP address from the Virtual Private Cloud (VPC) list.
NoteEnsure that the VPC of the ACK cluster is configured in the Container Registry Enterprise Edition instance. Also ensure that the P2P access IP address belongs to the VPC in which the ACK cluster resides.
Step 2: Install the ack-p2pagent component in an ACK node pool
Log on to the Container Service management console.
In the top menu bar, select the desired region.
In the left-side navigation pane, choose Clusters.
On the Clusters page, click the target cluster name.
In the left-side navigation pane, choose , and then click the target node pool name.
(Recommended) Validate the ack-p2pagent component in a newly created node pool before you install it in existing node pools.
Select Node Components and click Install Node Components. Select ack-p2pagent and enter the P2P access IP address from Step 1 in the p2pRoot field. The following table describes some of the parameters of the ack-p2pagent component:
To integrate the P2P Agent Monitoring dashboard, also select
Enable Prometheus Monitoring Metrics, and then follow the prompts to complete the installation.filecache-related
Default value (disk mode)
Default value (memory mode)
Description
blocksize
256
256
The size of each shard requested from the Object Storage Service (OSS) data source.
capacity
4294967296
0
The size of the disk cache.
optionBlockSize
67108864
8589934592
Memory cache size:
In disk mode, this parameter specifies the size of the memory buffer in the two-level P2P cache (memory + disk).
In memory mode, this value is the size of the memory buffer.
memoryCacheCapacityGB
1
8
This value is ignored in disk mode. Retain the default value.
In memory mode, this value is
optionBlockSizeexpressed in GB.
aio
0
0
Specifies whether to enable libaio. This setting takes effect only in disk mode and has no effect in memory mode.
When you use Enhanced SSD (ESSD) AutoPL or ESSD PL3 cloud disks, enable this setting to improve performance.
When you use ESSD PL0 or ESSD PL1 cloud disks, an excessively long aio disk-write time can cause many timeout errors across the entire P2P network.
(Optional) Step 3: Integrate the P2P Agent Monitoring dashboard
Billing information
After you integrate the monitoring data of a cluster with Alibaba Cloud Prometheus Monitoring, the related components automatically send monitoring metrics to the Alibaba Cloud Prometheus service. These metrics are considered custom metrics. Using custom metrics incurs additional charges.
To avoid additional fees, before you enable this feature, read the Billing overview of Managed Service for Prometheus to understand how custom metrics are billed. Fees 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.
Integration procedure
Log on to the Container Service management console.
In the top menu bar, select the desired region.
In the left-side navigation pane, choose Clusters.
On the Clusters page, click the target cluster name.
In the left-side navigation pane, choose , and wait for the page to initialize automatically.
Click Collection Configuration in the upper-right corner of the page to go to the Integration Management page, and click Integration Center.
In the Integration Center search box, search for P2P Agent Monitoring, and click the P2P Agent Monitoring card in the search results.
On the P2P Agent Monitoring page that appears, from the drop-down list, select the cluster to integrate as the monitoring target, and click OK to enable P2P Agent Monitoring.
Return to the page and click the Others tab. Find the P2P-Legacy Dashboard and P2P-NG Dashboard tabs to view the P2P Agent Monitoring dashboard.