请帮助配置 MariaDB 服务器。我发现缓冲池仅占 RAM 的 38%,我认为必须对其进行更改。我想将所有 Aria 和 MyISAM 表迁移到 InnoDB 引擎。我是否有足够的 RAM 并且 MariaDB 服务器可以正常工作并且不会崩溃?如果我将缓冲池增加到 10GB 就足够了吗?
内存:
free -h
total used free shared buffers cached
Mem: 15G 15G 607M 4K 138M 7.5G
-/+ buffers/cache: 7.5G 8.2G
Swap: 1.0G 135M 888M
InnoDB配置:
> SELECT VARIABLE_NAME, SESSION_VALUE, GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME IN ('innodb_buffer_pool_size','innodb_additional_mem_pool_size','innodb_log_buffer_size','tmp_table_size','max_connections','sort_buffer_size','read_buffer_size','join_buffer_size','binlog_cache_size');
+-------------------------+---------------+--------------+
| VARIABLE_NAME | SESSION_VALUE | GLOBAL_VALUE |
+-------------------------+---------------+--------------+
| BINLOG_CACHE_SIZE | NULL | 32768 |
| MAX_CONNECTIONS | NULL | 300 |
| JOIN_BUFFER_SIZE | 262144 | 262144 |
| SORT_BUFFER_SIZE | 2097152 | 2097152 |
| READ_BUFFER_SIZE | 131072 | 131072 |
| TMP_TABLE_SIZE | 16777216 | 16777216 |
| INNODB_LOG_BUFFER_SIZE | NULL | 16777216 |
| INNODB_BUFFER_POOL_SIZE | NULL | 6442450944 |
+-------------------------+---------------+--------------+
8 rows in set (0,16 sec)
带索引的数据:
+--------+---------+----------+----------+------------+
| ENGINE | Data GB | Index GB | Total GB | Num Tables |
+--------+---------+----------+----------+------------+
| NULL | NULL | NULL | NULL | 8 |
| Aria | 14.3 | 3.9 | 18.3 | 7 |
| InnoDB | 67.1 | 50.6 | 117.7 | 141 |
| MyISAM | 65.2 | 21.0 | 86.3 | 16 |
+--------+---------+----------+----------+------------+
4 rows in set (0,40 sec)