You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

M1 Mac环境下pytest -n auto搭配MariaDB运行过慢求助

pytest -n auto搭配MariaDB时耗时远超直接运行pytest的问题

问题描述

运行pytest -n auto搭配MariaDB时,耗时远高于直接运行pytest,相关结果与耗时见截图:
结果与耗时截图

系统配置

系统配置截图

软件版本

  • mariadb Ver 15.1 Distrib 10.8.3-MariaDB
  • python 3.9.6
  • pytest 7.1.3

MariaDB配置文件

[client]
port = 3306
socket = /tmp/mysql.sock

[mysqld]
port = 3306
socket = /tmp/mysql.sock

back_log = 50
max_connections = 100
wait_timeout = 256
max_connect_errors = 10

table_open_cache = 2048
max_allowed_packet = 16M
binlog_cache_size = 512M
max_heap_table_size = 512M

read_buffer_size = 64M
read_rnd_buffer_size = 64M
sort_buffer_size = 64M
join_buffer_size = 64M

thread_cache_size = 8
thread_concurrency = 8
thread_stack = 240K

query_cache_size = 128M
query_cache_limit = 2M
ft_min_word_len = 4
default-storage-engine = InnoDB
transaction_isolation = REPEATABLE-READ
tmp_table_size = 512M

log-bin=mysql-bin
binlog_format=mixed
slow_query_log
long_query_time = 2

server-id = 1

# INNODB options
innodb_buffer_pool_size = 4G
innodb_buffer_pool_instances = 8
innodb_data_file_path = ibdata1:10M:autoextend

innodb_write_io_threads = 8
innodb_read_io_threads = 8

innodb_thread_concurrency = 16
innodb_flush_log_at_trx_commit = 1

innodb_log_buffer_size = 1GB
innodb_change_buffering = all
innodb_change_buffer_max_size = 25

innodb_log_file_size = 512M
innodb_log_files_in_group = 3
innodb_max_dirty_pages_pct = 90
innodb_lock_wait_timeout = 256

[mysqldump]
quick
max_allowed_packet = 50M

[mysql]
no-auto-rehash

[mysqlhotcopy]
interactive-timeout

[mysqld_safe]
open-files-limit = 8192

补充信息

所有软件包与应用均为原生运行,未通过Rosetta转译。

内容的提问来源于stack exchange,提问作者Anoop Christopher Thiparala

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.18 21:01:55