2

我正在使用 mysqlslap 在 mysql 服务器中运行基准测试。但有时池中的最后一个线程没有执行并关闭连接。它保持睡眠状态。

mysql> show full processlist;
+-----+------+-----------------------+-----------+---------+------+-------+-----------------------+
| Id  | User | Host                  | db        | Command | Time | State | Info                  |
+-----+------+-----------------------+-----------+---------+------+-------+-----------------------+
|   2 | root | 122.178.231.xxx:15832 | mysqlslap | Sleep   |  740 |       | NULL                  |
| 106 | root | localhost             | NULL      | Query   |    0 | NULL  | show full processlist |
+-----+------+-----------------------+-----------+---------+------+-------+-----------------------+
2 rows in set (0.00 sec)

任何想法?它经常发生:(

这是我执行的命令。

mysqlslap -h IP_address -u root --auto-generate-sql --concurrency=100 -pPASSWORD -vvv --number-of-queries=2500

my.cnf 文件如下,

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
skip-bdb
max_connections = 500
query_cache_type = 1
query_cache_size = 128M
sort_buffer_size = 64M
key_buffer_size = 425M
query_cache_limit = 1024M
thread_cache_size = 4M
innodb_buffer_pool_size = 1360M
innodb_log_file_size = 512M
long_query_time = 5
innodb_thread_concurrency = 8
innodb_lock_wait_timeout = 300
max_allowed_packet = 128M

net_read_timeout = 240
net_write_timeout = 240
table_lock_wait_timeout =240
connect_timeout = 30

log-warnings = 2
log = /var/log/mysqld.log
log-error = /var/log/mysqld.error.log
log-slow-queries = /var/log/mysql_slow_queries.log
4

0 回答 0