# TiKV Writes Parameters Tuning


![`smart`](./student-guide/diagram/TiKVDataWritesParameters_aa_001_20221014.png)
-----------------------------------------------------------------------------
Write parameter optimization  

- The number of scheduler threads, which are mainly responsible for checking the consistency of transaction before writing. If the number of CPU cores is greater than or equal to 16, the default is 8; otherwise, it defaults to 4.
  - Default value: 4
  - Minimum value: 1

- store-pool-size
  - The number of thread pool threads that handle raft.
  - Default value: 2
  - Minimum value: greater than 0

- apply-pool-size
  - The number of thread pool threads that process data discards.
  - Default value: 2
  - Minimum value: greater than 0

- store-max-batch-size
  - The maximum number of request processed in one round.
  - If hibernate-regions is enabled, the default is 256; if hibernate-regions is turned off, the default value is 1024
  - Minimum value: greater than 0

- apply-max-batch-size
  - The maximum number of request for a data drop in a round.
  - Default value: 256
  - Minimum value: greater than 0

- raft-max-inflight-msgs
  - The number of logs to be confirmed. If this number is exceeded, the number of logs sent will be slowed down.
  - Default value: 256
  - Minimum value: greater than 0
