Performance optimization
Cloud Paralleled File System (CPFS) optimizes the bandwidth aggregation and input/output operations per second (IOPS)
by using stripes. A CPFS cluster consists of multiple metadata and data servers. Data and metadata of each file are striped and stored on the servers. When read and write operations are performed at high concurrency, I/O is implemented across the servers to optimize the bandwidth aggregation and IOPS.
However, the more the stripe units, the longer the I/O latency. For example, if you run the Is command to obtain the metadata of a file, all the stripe units of the file metadata in the servers must be searched for. Therefore, you must configure the appropriate number of stripes based on your workload. Workloads have two extremes: large files and massive small files.
- Large files (larger than 200MB). The typical scenario is genetic computing. To configure the stripe count for large files, run the following command:
lfs setstripe -S 2M -c <stripe count> -i -1 <dir>You can set the stripe count based on the file size. For files that are larger than 1GB, you can set the stripe count to 8. For files between 200MB and 1GB, you can set the stripe count to 4. In most cases, we recommend that you set the stripe count to a value less than or equal to 8.
- Massive small files (smaller than 2 MB). The typical scenario is Artificial Intelligence (AI) training. To configure the stripe count for massive small files, run the following command:
lfs setstripe -S 1M -c 1 -i -1 <dir> lfs setdirstripe -D -c 1 <dir>