Page 132 - 《软件学报》2025年第12期
P. 132

荣垂田 等: 多目标深度强化学习驱动的数据库系统参数优化技术                                                  5513


                 1
                 (School of Computer Science and Technology, Tiangong University, Tianjin 300387, China)
                 2
                 (School of Information Engineering, Ningxia University, Yinchuan 750021, China)
                 Abstract:  The  tuning  of  database  system  parameters  directly  impacts  its  performance  and  the  utilization  of  system  resources.  Relational
                 database  management  systems  typically  offer  hundreds  of  parameters  that  can  be  adjusted  to  achieve  optimal  performance  and  service
                 capabilities.  Database  system  performance  optimization  is  traditionally  carried  out  manually  by  experienced  database  administrators
                 (DBAs).  However,  due  to  the  characteristics  of  parameter  tuning,  such  as  the  large  number  of  parameters,  their  heterogeneity,  and  the
                 complex  correlations  among  them,  traditional  manual  methods  are  inefficient,  costly,  and  lack  reusability.  To  enhance  the  efficiency  of
                 database  system  performance  optimization,  automated  parameter  tuning  techniques  have  become  a  key  focus  in  the  database  field.
                 Reinforcement  learning,  with  its  ability  to  interact  with  the  system  environment  and  gradually  improve  through  feedback,  has  been  widely
                 applied  in  the  optimization  of  complex  systems.  Some  related  studies  have  applied  reinforcement  learning  or  its  variants  to  database
                 parameter  tuning,  but  they  have  relied  on  single-objective  optimization  methods.  Database  system  parameter  tuning  is  a  multi-objective
                 optimization  task,  usually  performed  under  resource  constraints.  Therefore,  existing  methods  have  several  limitations:  (1)  transforming  the
                 multi-objective  optimization  problem  into  a  single-objective  optimization  problem  through  simple  linear  transformations  requires  iterative
                 attempts,  making  optimizations  costly;  (2)  existing  methods  cannot  adapt  to  the  dynamic  changes  in  database  system  requirements,  limiting
                 their  adaptability;  (3)  reinforcement  learning  methods  used  in  existing  studies  are  designed  for  single-objective  optimization,  and  their
                 applications  to  multi-objective  tasks  make  it  difficult  to  effectively  align  preferences  (the  weight  coefficients  of  current  objectives)  with
                 corresponding  optimal  strategies,  potentially  leading  to  suboptimal  solutions;  (4)  existing  research  primarily  focuses  on  optimizing
                 throughput  and  latency,  while  ignoring  resource  utilization  such  as  memory.  To  address  these  issues,  this  study  proposes  a  multi-objective
                 deep  deterministic  policy  gradient-based  reinforcement  learning  algorithm  (MODDPG).  This  method  is  a  native  multi-objective
                 reinforcement  learning  approach  that  does  not  require  transforming  the  multi-objective  task  of  database  system  parameters  tuning  into  a
                 single-objective  task,  enabling  it  to  efficiently  adapt  to  dynamic  changes  in  database  system  requirements.  By  improving  the  reward
                 mechanism  of  the  reinforcement  learning  algorithm,  the  alignment  between  preferences  and  optimal  strategies  can  be  quickly  achieved,
                 effectively  avoiding  suboptimal  solutions.  Consequently,  the  training  process  of  the  reinforcement  learning  model  can  be  accelerated,  and
                 the  efficiency  of  database  system  parameter  tuning  can  be  improved.  To  further  validate  the  generality  of  the  proposed  method,  the  multi-
                 objective  optimization  approach  is  extended  to  achieve  a  collaborative  optimization  goal  of  improving  both  database  performance  and
                 resource  utilization.  Experiments  using  TPC-C  and  SYSBench  benchmarks  demonstrate  the  effectiveness  and  practicality  of  the  proposed
                 parameter  tuning  method.  The  results  show  significant  advantages  in  terms  of  model  training  efficiency  and  the  effectiveness  of  database
                 parameter tuning.
                 Key words:  parameter optimization; database system; deep reinforcement learning; multi-objective optimization; performance optimization
                    数据库系统是数据管理的核心, 能够对大规模的数据进行高效的组织、存储, 提供高效的数据访问服务, 确保
                 数据的完整性和一致性, 已经成为企业信息和数据资产管理的核心, 也是业务运营、决策制定和创新发展的关键
                 基础. 数据库不仅是存储和管理数据的核心技术, 更是支撑复杂业务和系统高效、稳定运行的基础软件. 因此, 数
                 据库系统性能的优化不仅有利于提高数据管理的效率, 还有助于数据价值的挖掘和释放, 进一步提升业务处理效
                 率, 助力企业实现提质、降本、增效.
                    数据库系统的参数优化是提高性能和提供可靠性服务的关键, 主流的关系数据库系统通常包含数百个参数可
                 供调整和优化     [1] . 例如, MySQL 数据库中的 innodb_buffer_pool_size 用于调整内存缓存池大小; table_open_cache
                 用于调整会话中可打开表的数量           [2] ; innodb_buffer_pool_instances 用于指定将  InnoDB  缓冲池划分为独立实例的数
                 量; skip_name_resolve 设置为  ON  时, MySQL  不进行  DNS  解析, 可加快网络连接的速度. 根据实际的业务需求、
                 工作负载和硬件环境正确地对数据库系统的调优参数进行设置, 不仅可以直接改善数据库系统的响应速度和吞吐
                 量、提高系统资源的利用率, 还有利于提升信息系统整体的性能和可靠性.
                    数据库系统参数优化的难点在于如何选择合适的参数并设置合理的取值使系统的性能与负载的需求相匹配.
                 数据库系统产品通常会提供一些默认参数, 这些参数是数据库厂商根据历史运行经验提供的具有广泛的应用场景
                 和硬件适配能力的参数. 但是, 对于特定的应用需求或工作负载数据库系统使用默认的参数难以提供高性能、高
                 可靠的服务. 为了充分发挥数据库系统的性能优势、提高资源的利用率, DBA                       通常需要根据业务需求、负载特点、
                 硬件环境等对数据库系统的参数进行优化. 数据库系统的参数调优是数据库领域公认的复杂工程问题, 数据库中
   127   128   129   130   131   132   133   134   135   136   137