This topic describes how to enable and use cache acceleration for AI tasks on the PAI Serverless platform. This feature uses Elastic File Client (EFC) to create a high-speed cache on the local storage of compute nodes. This cache accelerates read-intensive tasks and significantly improves the efficiency of model training and inference.
Usage notes
Supported storage: This feature supports Object Storage Service (OSS), File Storage NAS, and Cloud Parallel File Storage (CPFS) for AI Computing.
Applicable resources: On the PAI platform, this feature is currently available only for Lingjun resources. Note that enabling the cache consumes some resources, such as CPU and memory, on the compute node.
Acceleration target: This feature is designed to improve data read performance. It does not accelerate write operations.
How it works: During multi-epoch training, the first epoch pulls data from a storage instance, such as OSS, NAS, or CPFS for AI Computing. The performance of this initial read is the same as reading directly from storage. Starting from the second epoch, data is read from the local cache, which significantly improves read speed.
Capacity and policy: The maximum cache capacity depends on the Lingjun AI Computing Service specifications you select. The cache eviction policy is Least Recently Used (LRU).
Data reliability: The cache is designed to improve performance and does not guarantee data persistence or high availability. In abnormal situations, such as a node or host failure, cached data may be lost. Store the original data in a highly reliable storage service, such as NAS or OSS. Do not use the cache as the only storage medium.
Procedure
On the PAI Serverless platform, you can enable local cache acceleration in the console.
Enable local cache for a resource quota. In the navigation pane on the left, click Resource Quota > Lingjun Resources. Find the target quota and click its name to open its management page. Enable Local Cache and set the storage paths to be cached.
If you use nested resource quotas, make sure that local cache is enabled for the top-level resource quota.

Create a DLC job using the Lingjun resources from the target resource quota and enable Used Cache. When a mounted storage address matches a cache path that you specified in Step 1, acceleration is enabled by default. You can choose to disable it.
