本帖最后由 xupfly 于 2023-9-11 15:14 编辑 硬件平台:龙芯loongnix cpu family : Loongson-64bit model name : Loongson-3C5000 平台:Kylin Linux Advanced Server release V10 (Lance) 数据库版本:./mysql Ver 8.0.25-16 for Linux on loongarch64 (GreatSQL (GPL), Release 16, Revision 8bb0e5af297) 问题描述:CPU利用低,运行速度慢 原来X86平台,mysql mysql Ver 8.0.31 for Linux on x86_64 (MySQL Community Server - GPL) 硬件平台:虚拟机2颗CPU,8G内存,运行速度比现在的2颗16核的CPU的龙芯平台还要快! 是不是龙芯平台的GreatSql的参数配置不正确,请老师们指教 X86平台是PC 龙芯平台硬件2颗CPU16核心 附:龙芯平台my.cnf [mysqld] # 设置表名不区分大小写 lower_case_table_names=1 basedir=/home/wanli/GreatSQL-8.0.25-16 datadir=/home/wanli/GreatSQL-8.0.25-16/data socket=/tmp/mysql.sock # 自定义服务端口 port=3306 default_storage_engine = InnoDB innodb_file_per_table = 1 innodb_buffer_pool_size = 32768M innodb_log_file_size = 256M innodb_log_buffer_size = 32M innodb_flush_log_at_trx_commit = 0 innodb_lock_wait_timeout = 50 innodb_read_io_threads=8 innodb_write_io_threads=8 # 修改数据库日志时间格式 log_timestamps=SYSTEM sql_mode=NO_ENGINE_SUBSTITUTION key_buffer_size = 256M sort_buffer_size = 4M net_buffer_length = 16K read_buffer_size = 4M read_rnd_buffer_size = 4M myisam_sort_buffer_size = 64M thread_cache_size = 128 tmp_table_size = 256M performance_schema_max_table_instances = 4000 max_connections = 1000 max_connect_errors = 10000 open_files_limit = 8161 log-bin=mysql-bin binlog_format=mixed # 以下是优化项 视情况修改添加 wait_timeout=2880000 max_allowed_packet=128M X86平台my.cnf [mysqld] # 设置表名不区分大小写 lower_case_table_names=1 basedir=/opt/mysql datadir=/var/lib/mysql/data socket=/tmp/mysql.sock # 自定义服务端口 port=3306 key_buffer_size = 128M sort_buffer_size = 2M net_buffer_length = 8K read_buffer_size = 2M read_rnd_buffer_size = 2M myisam_sort_buffer_size = 32M thread_cache_size = 64 tmp_table_size = 128M performance_schema_max_table_instances = 4000 max_connections = 1000 max_connect_errors = 10000 open_files_limit = 8161 log-bin=mysql-bin binlog_format=mixed # 修改数据库日志时间格式 log_timestamps=SYSTEM sql_mode=NO_ENGINE_SUBSTITUTION # 以下是优化项 视情况修改添加 wait_timeout=2880000 max_allowed_packet=128M default_storage_engine = InnoDB innodb_file_per_table = 1 innodb_buffer_pool_size = 4096M innodb_log_file_size = 128M innodb_log_buffer_size = 16M innodb_flush_log_at_trx_commit = 0 innodb_lock_wait_timeout = 50 innodb_read_io_threads=8 innodb_write_io_threads=8 [mysqld_safe] log-error=/opt/mysql/logs/mysql8/mysqld-error.log |
合作电话:010-64087828
社区邮箱:greatsql@greatdb.com