Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: tidb对nvme的磁盘有优化参数嘛
Does TiDB have optimization parameters for NVMe disks, apart from the optimization suggestions in the official documentation?
It’s in the official documentation.
Check Before Deployment
Add Data Disk ext4 File System Mount Parameters on Target Machine for TiKV Deployment
Take a look at the innodb_io_capacity parameter.
The official recommendations should be the optimizations for the best performance, right?
By default, there are basically no issues. I have tested adjusting the parameters, but there is no noticeable effect.
Generally, NVMe-related parameters are optimized to fully utilize machine resources when the machine configuration is high; otherwise, this part of the optimization can be ignored.
Use the default, generally.
Yes, refer to the official documentation, everything is explained in detail.
Generally, it doesn’t have much impact. In fact, 99% of performance issues are in the SQL itself.
Generally, just use the default settings, and there shouldn’t be any issues.
Generally, it is sufficient to refer to the official recommended settings.
This document is about the mounting operation and does not contain any other optimization parameters.
TiDB probably doesn’t have this optimization. This type of optimization mainly involves tuning the parameters of the operating system and mounted disks, which is generally something people are hesitant to modify.
Recommended Mount Parameters for TiDB:
nodelalloc: By using the nodelalloc parameter to disable delayed allocation, it ensures that each data write operation is immediately synchronized to the disk, thereby reducing the risk of data loss. This is particularly important for application scenarios that have high requirements for data consistency or strict requirements for data persistence.
noatime: By using the noatime parameter, you can prevent the file system from updating the access timestamps of files, thereby reducing the metadata update operations of the file system and improving system performance and throughput. This is especially useful for application scenarios where file access times are not of interest.
Are you all using the default parameters???
The default value of tidb_enable_clustered_index
is INT_ONLY
, which means that only tables with integer primary keys will use clustered indexes by default. If you want to enable clustered indexes for all tables, you need to set this parameter to ON
.
Using the default parameters is fine.