Tuning Overview
Tuning Process Flow
The access speeds of the CPU cache, memory, and disks vary greatly. If the data required for CPU computing is not loaded to the memory or cache in a timely manner, the CPU spends a lot of time waiting for the drive to read. A computer system uses a multi-level storage structure such as a cache, a RAM, a solid state drive, and a magnetic drive, and works with multiple scheduling algorithms to eliminate or mitigate an impact of such a speed asymmetry. However, the cache space is always limited. The locality principle can be used to read hotspot data from disks in advance, reducing the time spent by the CPU in waiting for disks. Therefore, some optimization methods focus on how to fully use the cache to obtain better I/O performance.
In addition, this section describes the optimization methods at the file system level.
Main Optimization Parameters
Optimization Item |
Description |
Default Value |
Application Scope |
Huawei Kunpeng 916 |
Kunpeng 920 |
|---|---|---|---|---|---|
Expiration time of the dirty data cache |
Adjust the expiration time of the dirty data cache to reduce the drive pressure. |
3000, in centiseconds. |
Immediately |
Y |
Y |
Maximum ratio of the dirty page size to the total memory size |
Adjust the maximum percentage of the total memory occupied by dirty pages (based on memfree + Cached - Mapped) to increase the page cache hit ratio. |
10% |
Immediately |
Y |
Y |
Maximum ratio of the dirty page cache size to the total memory size |
Adjust the maximum ratio of dirty pages to the total memory to prevent the drive write operation from changing to O_DIRECT synchronization, which makes the buffer mechanism invalid. |
40% |
Immediately |
Y |
Y |
Adjusting the drive file read-ahead parameter |
According to the principle of locality, extra data is read and cached to the memory when the drive data is read. |
128 KB |
Immediately |
Y |
Y |
Drive I/O Scheduling Mode |
Select an appropriate I/O scheduler based on the characteristics of service data processing. |
cfq |
Immediately |
Y |
Y |
File system |
Select a file system and related options with better performance. |
N/A |
Immediately |
Y |
Y |