mirror of
https://gitee.com/wujiawei1207537021/wu-lazy-cloud-network.git
synced 2025-06-16 18:35:05 +08:00
【fix】 控制mysql占用内存在150mb左右
This commit is contained in:
@ -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,9 +437,22 @@ 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'
|
||||
|
||||
@ -447,6 +460,10 @@ data:
|
||||
|
||||
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
|
||||
|
||||
|
Reference in New Issue
Block a user