266dd007创建于 2023年8月18日历史提交
project: "mysql_sysbench"
maxiterations: 2048
startworkload: "taskset -c 0,1 systemctl start mysql"
stopworkload: "systemctl stop mysql && sleep 5"
object : 
  -
    name : "kernel.numa_balancing"
    info :
        desc : "Specifies whether to enable NUMA automatic balancing."
        get : "sysctl -n kernel.numa_balancing"
        set : "sysctl -w kernel.numa_balancing=$value"
        needrestart : "false"
        type : "discrete"
        options :
          - "0"
          - "1"
        dtype : "string"
  -
    name : "kernel.sched_autogroup_enabled"
    info :
        desc : "When enabled, the kernel creates task groups to optimize desktop program scheduling.
0: disabled
1: enabled"
        get : "sysctl -n kernel.sched_autogroup_enabled"
        set : "sysctl -w kernel.sched_autogroup_enabled=$value"
        needrestart : "false"
        type : "discrete"
        options :
          - "0"
          - "1"
        dtype : "string"
  -
    name : "kernel.sched_wakeup_granularity_ns"
    info :
        desc : "This variable indicates the base of the minimum time that a process should run after it is woken up. The smaller the base, the higher the probability of preemption."
        get : "sysctl -n kernel.sched_wakeup_granularity_ns"
        set : "sysctl -w kernel.sched_wakeup_granularity_ns=$value"
        needrestart : "false"
        type : "discrete"
        scope :
          - 1000000
          - 100000000
        step : 1000000
        items : 
        dtype : "int"
  -
    name : "kernel.sched_min_granularity_ns"
    info :
        desc : "Minimum running time of a process on the CPU. During this time, the kernel does not proactively select other processes for scheduling (in nanoseconds)."
        get : "sysctl -n kernel.sched_min_granularity_ns"
        set : "sysctl -w kernel.sched_min_granularity_ns=$value"
        needrestart : "false"
        type : "discrete"
        scope :
          - 1000000
          - 100000000
        step : 1000000
        items : 
        dtype : "int"
  -
    name : "innodb_io_capacity"
    info :
        desc : "MySQL [mysqld] parameters 'innodb_io_capacity'."
        get : "cat /etc/my.cnf | grep 'innodb_io_capacity' | awk -F '=' '{print $2}'"
        set : "sed -i 's/^innodb_io_capacity.*$/innodb_io_capacity=$value/g' /etc/my.cnf"
        needrestart : "true"
        type : "continuous"
        scope :
          - 100
          - 10000
        dtype : "int"
  -
    name : "innodb_write_io_threads"
    info :
        desc : "MySQL [mysqld] parameters 'innodb_write_io_threads'."
        get : "cat /etc/my.cnf | grep 'innodb_write_io_threads' | awk -F '=' '{print $2}'"
        set : "sed -i 's/^innodb_write_io_threads.*$/innodb_write_io_threads=$value/g' /etc/my.cnf"
        needrestart : "true"
        type : "continuous"
        scope :
          - 2
          - 200
        dtype : "int"
  -
    name : "innodb_read_io_threads"
    info :
        desc : "MySQL [mysqld] parameters 'innodb_read_io_threads'."
        get : "cat /etc/my.cnf | grep 'innodb_read_io_threads' | awk -F '=' '{print $2}'"
        set : "sed -i 's/^innodb_read_io_threads.*$/innodb_read_io_threads=$value/g' /etc/my.cnf"
        needrestart : "true"
        type : "continuous"
        scope :
          - 2
          - 30
        dtype : "int"
  -
    name : "innodb_spin_wait_delay"
    info :
        desc : "MySQL [mysqld] parameters 'innodb_spin_wait_delay'."
        get : "cat /etc/my.cnf | grep 'innodb_spin_wait_delay' | awk -F '=' '{print $2}'"
        set : "sed -i 's/^innodb_spin_wait_delay.*$/innodb_spin_wait_delay=$value/g' /etc/my.cnf"
        needrestart : "true"
        type : "continuous"
        scope :
          - 2
          - 30
        dtype : "int"
  -
    name : "innodb_sync_spin_loops"
    info :
        desc : "MySQL [mysqld] parameters 'innodb_sync_spin_loops'."
        get : "cat /etc/my.cnf | grep 'innodb_sync_spin_loops' | awk -F '=' '{print $2}'"
        set : "sed -i 's/^innodb_sync_spin_loops.*$/innodb_sync_spin_loops=$value/g' /etc/my.cnf"
        needrestart : "true"
        type : "continuous"
        scope :
          - 10
          - 500
        dtype : "int"
  -
    name : "innodb_log_file_size"
    info :
        desc : "MySQL [mysqld] parameters 'innodb_log_file_size'."
        get : "cat /etc/my.cnf | grep 'innodb_log_file_size' | awk -F '=' '{print $2}' | awk -F 'M' '{print $1}'"
        set : "sed -i 's/^innodb_log_file_size.*$/innodb_log_file_size=$valueM/g' /etc/my.cnf"
        needrestart : "true"
        type : "continuous"
        scope :
          - 10
          - 1024
        dtype : "int"
  -
    name : "innodb_log_files_in_group"
    info :
        desc : "MySQL [mysqld] parameters 'innodb_log_files_in_group'."
        get : "cat /etc/my.cnf | grep 'innodb_log_files_in_group' | awk -F '=' '{print $2}'"
        set : "sed -i 's/^innodb_log_files_in_group.*$/innodb_log_files_in_group=$value/g' /etc/my.cnf"
        needrestart : "true"
        type : "continuous"
        scope :
          - 1
          - 20
        dtype : "int"
  -
    name : "innodb_buffer_pool_instances"
    info :
        desc : "MySQL [mysqld] parameters 'innodb_buffer_pool_instances'."
        get : "cat /etc/my.cnf | grep 'innodb_buffer_pool_instances' | awk -F '=' '{print $2}'"
        set : "sed -i 's/^innodb_buffer_pool_instances.*$/innodb_buffer_pool_instances=$value/g' /etc/my.cnf"
        needrestart : "true"
        type : "continuous"
        scope :
          - 1
          - 20
        dtype : "int"
  -
    name : "innodb_log_buffer_size"
    info :
        desc : "MySQL [mysqld] parameters 'innodb_log_buffer_size'."
        get : "cat /etc/my.cnf | grep 'innodb_log_buffer_size' | awk -F '=' '{print $2}' | awk -F 'M' '{print $1}'"
        set : "sed -i 's/^innodb_log_buffer_size.*$/innodb_log_buffer_size=$valueM/g' /etc/my.cnf"
        needrestart : "true"
        type : "continuous"
        scope :
          - 8
          - 1024
        dtype : "int"
  -
    name : "innodb_page_cleaners"
    info :
        desc : "MySQL [mysqld] parameters 'innodb_page_cleaners'."
        get : "cat /etc/my.cnf | grep 'innodb_page_cleaners' | awk -F '=' '{print $2}'"
        set : "sed -i 's/^innodb_page_cleaners.*$/innodb_page_cleaners=$value/g' /etc/my.cnf"
        needrestart : "true"
        type : "continuous"
        scope :
          - 1
          - 20
        dtype : "int"
  -
    name : "innodb_lru_scan_depth"
    info :
        desc : "MySQL [mysqld] parameters 'innodb_lru_scan_depth'."
        get : "cat /etc/my.cnf | grep 'innodb_lru_scan_depth' | awk -F '=' '{print $2}'"
        set : "sed -i 's/^innodb_lru_scan_depth.*$/innodb_lru_scan_depth=$value/g' /etc/my.cnf"
        needrestart : "true"
        type : "continuous"
        scope :
          - 20
          - 2000
        dtype : "int"
  -
    name : "innodb_thread_concurrency"
    info :
        desc : "MySQL [mysqld] parameters 'innodb_thread_concurrency'."
        get : "cat /etc/my.cnf | grep 'innodb_thread_concurrency' | awk -F '=' '{print $2}'"
        set : "sed -i 's/^innodb_thread_concurrency.*$/innodb_thread_concurrency=$value/g' /etc/my.cnf"
        needrestart : "true"
        type : "continuous"
        scope :
          - 0
          - 300
        dtype : "int"
  -
    name : "innodb_flush_log_at_trx_commit"
    info :
        desc : "MySQL [mysqld] parameters 'innodb_flush_log_at_trx_commit'."
        get : "cat /etc/my.cnf | grep 'innodb_flush_log_at_trx_commit' | awk -F '=' '{print $2}'"
        set : "sed -i 's/^innodb_flush_log_at_trx_commit.*$/innodb_flush_log_at_trx_commit=$value/g' /etc/my.cnf"
        needrestart : "true"
        type : "continuous"
        scope :
          - 0
          - 2
        dtype : "int"
  -
    name : "sync_binlog"
    info :
        desc : "MySQL [mysqld] parameters 'sync_binlog'."
        get : "cat /etc/my.cnf | grep 'sync_binlog' | awk -F '=' '{print $2}'"
        set : "sed -i 's/^sync_binlog.*$/sync_binlog=$value/g' /etc/my.cnf"
        needrestart : "true"
        type : "continuous"
        scope :
          - 0
          - 2
        dtype : "int"