{
  "system_type": "TiDB",
  "version": "v6.1.0",
  "knobs": [
    {
      "name": "tidb_distsql_scan_concurrency",
      "var_type": "INTEGER",
      "unit": "other",
      "category": "system_variables",
      "description": "Set the concurrency of the scan operation.",
      "scope": "global",
      "min_val": "1",
      "max_val": "256",
      "default": "15",
      "enum_vals": null,
      "tunable": true,
      "resource": "CPU"
    },
    {
      "name": "tidb_executor_concurrency",
      "var_type": "INTEGER",
      "unit": "other",
      "category": "system_variables",
      "description": "Set the concurrency of some SQL operators, such as 'index lookup', 'hash join', 'hash aggregation' etc.",
      "scope": "global",
      "min_val": "1",
      "max_val": "256",
      "default": "5",
      "enum_vals": null,
      "tunable": true,
      "resource": "CPU"
    },
    {
      "name": "tidb_guarantee_linearizability",
      "var_type": "ENUM",
      "unit": "other",
      "category": "system_variables",
      "description": "This variable controls the way commit TS is calculated for async commit.",
      "scope": "global",
      "min_val": null,
      "max_val": null,
      "default": "ON",
      "enum_vals": "OFF,ON",
      "tunable": true,
      "resource": "Other"
    },
    {
      "name": "tidb_enable_clustered_index",
      "var_type": "ENUM",
      "unit": "other",
      "category": "system_variables",
      "description": "This variable is used to control whether to create the primary key as a clustered index by default.",
      "scope": "global",
      "min_val": null,
      "max_val": null,
      "default": "INT_ONLY",
      "enum_vals": "OFF,ON,INT_ONLY",
      "tunable": true,
      "resource": "Other"
    },
    {
      "name": "tidb_index_serial_scan_concurrency",
      "var_type": "INTEGER",
      "unit": "other",
      "category": "system_variables",
      "description": "This variable is used to set the concurrency of the serial scan operation.",
      "scope": "global",
      "min_val": "1",
      "max_val": "256",
      "default": "1",
      "enum_vals": null,
      "tunable": true,
      "resource": "CPU"
    },
    {
      "name": "tidb_build_stats_concurrency",
      "var_type": "INTEGER",
      "unit": "other",
      "category": "system_variables",
      "description": "This variable is used to set the concurrency of executing the ANALYZE statement.",
      "scope": "global",
      "min_val": "1",
      "max_val": "256",
      "default": "4",
      "enum_vals": null,
      "tunable": true,
      "resource": "CPU"
    },
    {
      "name": "tidb_enable_prepared_plan_cache",
      "var_type": "ENUM",
      "unit": "other",
      "category": "system_variables",
      "description": "Determines whether to enable 'Prepared Plan Cache'.",
      "scope": "global",
      "min_val": null,
      "max_val": null,
      "default": "ON",
      "enum_vals": "OFF,ON",
      "tunable": true,
      "resource": "Memory"
    },
    {
      "name": "tidb_prepared_plan_cache_size",
      "var_type": "INTEGER",
      "unit": "other",
      "category": "system_variables",
      "description": "The maximum number of plans that can be cached in a session.",
      "scope": "global",
      "min_val": "1",
      "max_val": "100000",
      "default": "100",
      "enum_vals": null,
      "tunable": true,
      "resource": "Memory"
    },
    {
      "name": "tidb_committer_concurrency",
      "var_type": "INTEGER",
      "unit": "other",
      "category": "system_variables",
      "description": "The number of goroutines for requests related to executing commit in the commit phase of the single transaction.",
      "scope": "global",
      "min_val": "1",
      "max_val": "10000",
      "default": "128",
      "enum_vals": null,
      "tunable": true,
      "resource": "CPU"
    },
    {
      "name": "tidb.token-limit",
      "var_type": "INTEGER",
      "unit": "other",
      "category": "tidb_variables",
      "description": "The limit of concurrent executed sessions.",
      "scope": "global",
      "min_val": "100",
      "max_val": "5000",
      "default": "1000",
      "enum_vals": null,
      "tunable": true,
      "resource": "Other"
    },
    {
      "name": "tidb.performance.gogc",
      "var_type": "INTEGER",
      "unit": "other",
      "category": "tidb_variables",
      "description": "The Go GC trigger factor",
      "scope": "global",
      "min_val": "100",
      "max_val": "400",
      "default": "100",
      "enum_vals": null,
      "tunable": true,
      "resource": "Memory"
    },
    {
      "name": "tidb.performance.distinct-agg-push-down",
      "var_type": "ENUM",
      "unit": "other",
      "category": "tidb_variables",
      "description": "Whether support pushing down aggregation with distinct to cop task.",
      "scope": "global",
      "min_val": null,
      "max_val": null,
      "default": "false",
      "enum_vals": "false,true",
      "tunable": true,
      "resource": "Other"
    },
    {
      "name": "tidb.tikv-client.grpc-connection-count",
      "var_type": "INTEGER",
      "unit": "other",
      "category": "tidb_variables",
      "description": "Max gRPC connections that will be established with each tikv-server.",
      "scope": "global",
      "min_val": "2",
      "max_val": "20",
      "default": "4",
      "enum_vals": null,
      "tunable": true,
      "resource": "Other"
    },
    {
      "name": "tidb.tikv-client.copr-cache.capacity-mb",
      "var_type": "REAL",
      "unit": "other",
      "category": "tidb_variables",
      "description": "The capacity in MB of the cache.",
      "scope": "global",
      "min_val": "0.0",
      "max_val": "3000.0",
      "default": "1000.0",
      "enum_vals": null,
      "tunable": true,
      "resource": "Memory"
    },
    {
      "name": "tikv.raft-engine.enable",
      "var_type": "ENUM",
      "unit": "other",
      "category": "tikv_variables",
      "description": "Determines whether to use Raft Engine to store raft logs.",
      "scope": "global",
      "min_val": null,
      "max_val": null,
      "default": "true",
      "enum_vals": "false,true",
      "tunable": true,
      "resource": "Other"
    },
    {
      "name": "tikv.raftstore.store-io-pool-size",
      "var_type": "INTEGER",
      "unit": "other",
      "category": "tikv_variables",
      "description": "Use how many threads to handle raft io tasks.",
      "scope": "global",
      "min_val": "0",
      "max_val": "5",
      "default": "0",
      "enum_vals": null,
      "tunable": true,
      "resource": "CPU"
    },
    {
      "name": "tikv.raftstore.store-pool-size",
      "var_type": "INTEGER",
      "unit": "other",
      "category": "tikv_variables",
      "description": "Use how many threads to handle raft messages.",
      "scope": "global",
      "min_val": "1",
      "max_val": "16",
      "default": "2",
      "enum_vals": null,
      "tunable": true,
      "resource": "CPU"
    },
    {
      "name": "tikv.raftstore.apply-pool-size",
      "var_type": "INTEGER",
      "unit": "other",
      "category": "tikv_variables",
      "description": "Use how many threads to handle log apply.",
      "scope": "global",
      "min_val": "2",
      "max_val": "16",
      "default": "2",
      "enum_vals": null,
      "tunable": true,
      "resource": "CPU"
    },
    {
      "name": "tikv.raftstore.apply-max-batch-size",
      "var_type": "INTEGER",
      "unit": "other",
      "category": "tikv_variables",
      "description": "Raft state machines process data write requests in batches by the BatchSystem.",
      "scope": "global",
      "min_val": "1",
      "max_val": "10240",
      "default": "256",
      "enum_vals": null,
      "tunable": true,
      "resource": "Other"
    },
    {
      "name": "tikv.raftstore.local-read-batch-size",
      "var_type": "INTEGER",
      "unit": "other",
      "category": "tikv_variables",
      "description": "The maximum number of read requests processed in one batch.",
      "scope": "global",
      "min_val": "1",
      "max_val": "4096",
      "default": "1024",
      "enum_vals": null,
      "tunable": true,
      "resource": "Other"
    },
    {
      "name": "tikv.raftstore.store-max-batch-size",
      "var_type": "INTEGER",
      "unit": "other",
      "category": "tikv_variables",
      "description": "Raft state machines process requests for flushing logs into the disk in batches by the BatchSystem.",
      "scope": "global",
      "min_val": "1",
      "max_val": "10240",
      "default": "256",
      "enum_vals": null,
      "tunable": true,
      "resource": "Other"
    },
    {
      "name": "tikv.storage.scheduler-worker-pool-size",
      "var_type": "INTEGER",
      "unit": "other",
      "category": "tikv_variables",
      "description": "The number of threads in the Scheduler thread pool.",
      "scope": "global",
      "min_val": "2",
      "max_val": "8",
      "default": "4",
      "enum_vals": null,
      "tunable": true,
      "resource": "CPU"
    },
    {
      "name": "tikv.raftdb.max-background-jobs",
      "var_type": "INTEGER",
      "unit": "other",
      "category": "tikv_variables",
      "description": "The number of background threads in RocksDB.",
      "scope": "global",
      "min_val": "2",
      "max_val": "16",
      "default": "4",
      "enum_vals": null,
      "tunable": true,
      "resource": "CPU"
    },
    {
      "name": "tikv.raftdb.max-sub-compactions",
      "var_type": "INTEGER",
      "unit": "other",
      "category": "tikv_variables",
      "description": "The number of concurrent sub-compaction operations performed in RocksDB.",
      "scope": "global",
      "min_val": "1",
      "max_val": "16",
      "default": "2",
      "enum_vals": null,
      "tunable": true,
      "resource": "CPU"
    },
    {
      "name": "tikv.readpool.unified.min-thread-count",
      "var_type": "INTEGER",
      "unit": "other",
      "category": "tikv_variables",
      "description": "The minimal working thread count of the unified read pool.",
      "scope": "global",
      "min_val": "1",
      "max_val": "4",
      "default": "1",
      "enum_vals": null,
      "tunable": true,
      "resource": "CPU"
    },
    {
      "name": "tikv.readpool.unified.max-thread-count",
      "var_type": "INTEGER",
      "unit": "other",
      "category": "tikv_variables",
      "description": "The maximum working thread count of the unified read pool or the UnifyReadPool thread pool.",
      "scope": "global",
      "min_val": "4",
      "max_val": "8",
      "default": "4",
      "enum_vals": null,
      "tunable": true,
      "resource": "CPU"
    },
    {
      "name": "tikv.rocksdb.max-background-jobs",
      "var_type": "INTEGER",
      "unit": "other",
      "category": "tikv_variables",
      "description": "The number of background threads in RocksDB.",
      "scope": "global",
      "min_val": "2",
      "max_val": "32",
      "default": "7",
      "enum_vals": null,
      "tunable": true,
      "resource": "CPU"
    },
    {
      "name": "tikv.rocksdb.max-sub-compactions",
      "var_type": "INTEGER",
      "unit": "other",
      "category": "tikv_variables",
      "description": "The number of sub-compaction operations performed concurrently in RocksDB.",
      "scope": "global",
      "min_val": "1",
      "max_val": "16",
      "default": "3",
      "enum_vals": null,
      "tunable": true,
      "resource": "CPU"
    },
    {
      "name": "tikv.server.grpc-concurrency",
      "var_type": "INTEGER",
      "unit": "other",
      "category": "tikv_variables",
      "description": "The number of gRPC worker threads.",
      "scope": "global",
      "min_val": "1",
      "max_val": "16",
      "default": "5",
      "enum_vals": null,
      "tunable": true,
      "resource": "CPU"
    },
    {
      "name": "tikv.server.grpc-raft-conn-num",
      "var_type": "INTEGER",
      "unit": "other",
      "category": "tikv_variables",
      "description": "The maximum number of links among TiKV nodes for Raft communication.",
      "scope": "global",
      "min_val": "1",
      "max_val": "16",
      "default": "1",
      "enum_vals": null,
      "tunable": true,
      "resource": "CPU"
    },
    {
      "name": "tikv.storage.block-cache.shared",
      "var_type": "ENUM",
      "unit": "other",
      "category": "tikv_variables",
      "description": "Enables or disables the sharing of block cache.",
      "scope": "global",
      "min_val": null,
      "max_val": null,
      "default": "true",
      "enum_vals": "false,true",
      "tunable": true,
      "resource": "Memory"
    },
    {
      "name": "tikv.storage.block-cache.capacity",
      "var_type": "INTEGER",
      "unit": "bytes",
      "category": "tikv_variables",
      "description": "Size of the shared block cache",
      "scope": "global",
      "min_val": "0",
      "max_val": "68719476736",
      "default": "0",
      "enum_vals": null,
      "tunable": true,
      "resource": "Memory"
    }
  ],
  "metrics": [
    {
      "name":"tidb.tidb_qps",
      "var_type": "REAL",
      "unit": "other",
      "description": "The throughput of the tidb server",
      "metric_type": "STATISTICS",
      "scope": "global"
    },
    {
      "name":"tidb.tidb_query_duration",
      "var_type": "REAL",
      "unit": "seconds",
      "description": "The query duration of the tidb server",
      "metric_type": "STATISTICS",
      "scope": "global"
    }
  ]
}
