mirror of
https://gitee.com/wujiawei1207537021/wu-lazy-cloud-network.git
synced 2025-06-17 02:45:03 +08:00
【fix】 控制mysql占用内存在150mb左右
This commit is contained in:
@ -122,10 +122,10 @@ spec:
|
|||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
cpu: 500m
|
cpu: 500m
|
||||||
memory: 512Mi
|
memory: 256Mi
|
||||||
requests:
|
requests:
|
||||||
cpu: 500m
|
cpu: 500m
|
||||||
memory: 512Mi
|
memory: 256Mi
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: mysql-data
|
- name: mysql-data
|
||||||
mountPath: /var/lib/mysql
|
mountPath: /var/lib/mysql
|
||||||
@ -437,16 +437,33 @@ data:
|
|||||||
|
|
||||||
skip-name-resolve
|
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
|
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'
|
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'
|
sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'
|
||||||
|
|
||||||
log_timestamps='SYSTEM'
|
log_timestamps='SYSTEM'
|
||||||
|
|
||||||
|
performance_schema_max_table_instances=400 #设置效果不明显
|
||||||
|
table_definition_cache=400
|
||||||
|
performance_schema=off #效果明显
|
||||||
|
|
||||||
slow_query_log=ON
|
slow_query_log=ON
|
||||||
|
|
||||||
|
|
||||||
@ -454,5 +471,5 @@ data:
|
|||||||
|
|
||||||
innodb_flush_log_at_trx_commit=2
|
innodb_flush_log_at_trx_commit=2
|
||||||
|
|
||||||
group_concat_max_len=1024
|
group_concat_max_len=512
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user