【fix】 控制mysql占用内存在150mb左右

This commit is contained in:
wujiawei
2025-02-11 11:26:48 +08:00
parent 98b4701978
commit cf10347939

View File

@ -122,10 +122,10 @@ spec:
resources:
limits:
cpu: 500m
memory: 512Mi
memory: 256Mi
requests:
cpu: 500m
memory: 512Mi
memory: 256Mi
volumeMounts:
- name: mysql-data
mountPath: /var/lib/mysql
@ -437,16 +437,33 @@ data:
skip-name-resolve
max_connections=1000
max_connections=100
thread_cache_size=10
innodb_buffer_pool_chunk_size=64M #效果不明显
innodb_buffer_pool_size=64M #效果不明显
lower_case_table_names=0
table_open_cache=64
query_cache_type=0
query_cache_size=0
key_buffer_size=0
default-time-zone='+08:00'
sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'
log_timestamps='SYSTEM'
performance_schema_max_table_instances=400 #设置效果不明显
table_definition_cache=400
performance_schema=off #效果明显
slow_query_log=ON
@ -454,5 +471,5 @@ data:
innodb_flush_log_at_trx_commit=2
group_concat_max_len=1024
group_concat_max_len=512