单机版默认使用MySQL存储统计结果数据,Mysql的读写压力较大,需要预留服务器内存的30%~40%给MySQL服务。 此外redis的主从模式可能会存在单点写入故障问题,所以单机版的redis仍使用集群模式,即启动6个节点。
如果服务器资源较为紧张,请务必关注服务器的内存使用率相关数据,内存使用率如果超过70%,请及时进行相关参数调整或扩容,防止内存刷满,导致服务故障(严重时可能会导致服务器无法登录的情况,需要重启解决)!
standalone-config.json配置
{
"lighthouse": {
"timezone": "Asia/Shanghai",
"standalone_xmx_memory": "500M",
"standalone_xms_memory": "500M",
"insights_xmx_memory": "256M",
"insights_xms_memory": "256M"
"redis": {
"max_memory": "220M"
"mysql": {
"max_connections": "50",
"innodb_buffer_pool_size": "600M",
"tmp_table_size": "8M",
"max_heap_table_size": "8M"
单节点16G内存配置参考
standalone-config.json配置{
"lighthouse": {
"timezone": "Asia/Shanghai",
"standalone_xmx_memory": "1000M",
"standalone_xms_memory": "1000M",
"insights_xmx_memory": "512M",
"insights_xms_memory": "512M"
"redis": {
"max_memory": "450M"
"mysql": {
"max_connections": "80",
"innodb_buffer_pool_size": "1300M",
"tmp_table_size": "10M",
"max_heap_table_size": "10M"
单节点32G内存配置参考
standalone-config.json配置{
"lighthouse": {
"timezone": "Asia/Shanghai",
"standalone_xmx_memory": "2000M",
"standalone_xms_memory": "2000M",
"insights_xmx_memory": "1024M",
"insights_xms_memory": "1024M"
"redis": {
"max_memory": "900M"
"mysql": {
"max_connections": "100",
"innodb_buffer_pool_size": "2600M",
"tmp_table_size": "16M",
"max_heap_table_size": "16M"
单节点64G内存配置参考
standalone-config.json配置
"lighthouse": {
"timezone": "Asia/Shanghai",
"standalone_xmx_memory": "3000M",
"standalone_xms_memory": "3000M",
"insights_xmx_memory": "1024M",
"insights_xms_memory": "1024M"
"redis": {
"max_memory": "1800M"
"mysql": {
"max_connections": "151",
"innodb_buffer_pool_size": "5200M",
"tmp_table_size": "16M",
"max_heap_table_size": "16M"
单节点128G内存配置参考
standalone-config.json配置
"lighthouse": {
"timezone": "Asia/Shanghai",
"standalone_xmx_memory": "3000M",
"standalone_xms_memory": "3000M",
"insights_xmx_memory": "1024M",
"insights_xms_memory": "1024M"
"redis": {
"max_memory": "3600M"
"mysql": {
"max_connections": "151",
"innodb_buffer_pool_size": "10000M",
"tmp_table_size": "32M",
"max_heap_table_size": "32M"
单节点256G内存配置参考
standalone-config.json配置{
"lighthouse": {
"timezone": "Asia/Shanghai",
"standalone_xmx_memory": "5000M",
"standalone_xms_memory": "5000M",
"insights_xmx_memory": "2048M",
"insights_xms_memory": "2048M"
"redis": {
"max_memory": "7200M"
"mysql": {
"max_connections": "200",
"innodb_buffer_pool_size": "20000M",
"tmp_table_size": "64M",
"max_heap_table_size": "64M"