Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions check-before-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -404,13 +404,13 @@ sudo systemctl enable ntpd.service

For TiDB in the production environment, it is recommended to optimize the operating system configuration in the following ways:

1. Disable THP (Transparent Huge Pages). The memory access pattern of databases tends to be sparse rather than consecutive. If the high-level memory fragmentation is serious, higher latency will occur when THP pages are allocated.
2. Set the I/O Scheduler of the storage media.
1. Refer to [Memory—transparent huge page (THP)](/tune-operating-system/#Memory—transparent huge page (THP)) and disable THP (Transparent Huge Pages). The memory access pattern of databases tends to be sparse rather than consecutive. If the high-level memory fragmentation is serious, higher latency will occur when THP pages are allocated.
2. Refer to [I/O scheduler](/tune-operating-system/#I/O scheduler) and set the I/O Scheduler of the storage media.

- For the high-speed SSD storage, the kernel's default I/O scheduling operations might cause performance loss. It is recommended to set the I/O Scheduler to first-in-first-out (FIFO), such as `noop` or `none`. This configuration allows the kernel to pass I/O requests directly to hardware without scheduling, thus improving performance.
- For NVMe storage, the default I/O Scheduler is `none`, so no adjustment is needed.

3. Choose the `performance` mode for the cpufrequ module which controls the CPU frequency. The performance is maximized when the CPU frequency is fixed at its highest supported operating frequency without dynamic adjustment.
3. Refer to [CPU—frequency scaling](/tune-operating-system/#CPU—frequency scaling) and choose the `performance` mode for the cpufrequ module which controls the CPU frequency. The performance is maximized when the CPU frequency is fixed at its highest supported operating frequency without dynamic adjustment.
Comment on lines +407 to +413

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Thanks for adding these helpful cross-references. The links seem to be broken due to spaces and special characters in the URL anchors. I've corrected them in the suggestion.

I also slightly rephrased the sentences for better readability, changing 'Refer to ... and ...' to 'Refer to ... to ...'.

Suggested change
1. Refer to [Memory—transparent huge page (THP)](/tune-operating-system/#Memory—transparent huge page (THP)) and disable THP (Transparent Huge Pages). The memory access pattern of databases tends to be sparse rather than consecutive. If the high-level memory fragmentation is serious, higher latency will occur when THP pages are allocated.
2. Refer to [I/O scheduler](/tune-operating-system/#I/O scheduler) and set the I/O Scheduler of the storage media.
- For the high-speed SSD storage, the kernel's default I/O scheduling operations might cause performance loss. It is recommended to set the I/O Scheduler to first-in-first-out (FIFO), such as `noop` or `none`. This configuration allows the kernel to pass I/O requests directly to hardware without scheduling, thus improving performance.
- For NVMe storage, the default I/O Scheduler is `none`, so no adjustment is needed.
3. Choose the `performance` mode for the cpufrequ module which controls the CPU frequency. The performance is maximized when the CPU frequency is fixed at its highest supported operating frequency without dynamic adjustment.
3. Refer to [CPU—frequency scaling](/tune-operating-system/#CPU—frequency scaling) and choose the `performance` mode for the cpufrequ module which controls the CPU frequency. The performance is maximized when the CPU frequency is fixed at its highest supported operating frequency without dynamic adjustment.
1. Refer to [Memory—transparent huge page (THP)](/tune-operating-system/#memorytransparent-huge-page-thp) to disable THP (Transparent Huge Pages). The memory access pattern of databases tends to be sparse rather than consecutive. If the high-level memory fragmentation is serious, higher latency will occur when THP pages are allocated.
2. Refer to [I/O scheduler](/tune-operating-system/#io-scheduler) to set the I/O Scheduler of the storage media.
- For the high-speed SSD storage, the kernel's default I/O scheduling operations might cause performance loss. It is recommended to set the I/O Scheduler to first-in-first-out (FIFO), such as `noop` or `none`. This configuration allows the kernel to pass I/O requests directly to hardware without scheduling, thus improving performance.
- For NVMe storage, the default I/O Scheduler is `none`, so no adjustment is needed.
3. Refer to [CPU—frequency scaling](/tune-operating-system/#cpufrequency-scaling) to choose the `performance` mode for the cpufrequ module which controls the CPU frequency. The performance is maximized when the CPU frequency is fixed at its highest supported operating frequency without dynamic adjustment.


Take the following steps to check the current operating system configuration and configure optimal parameters:

Expand Down