[웹호스팅] innoDB 메모리 설정 방법
2024.05.03 17:10
4
0
https://eond.com/462059

<CPU 사용률이 오르다가 innoDB 메모리 설정 후 안정을 찾은 모습>


출처 : [mysql]innodb 메모리별 설정값 예시 (tistory.com)

대형 커뮤니티 사이트를 통큰 서버에 입주시켰습니다.

입주시키자마다 속도 저하로 이용할 수 없는 지경에 ㅠㅠ

다행히 innoDB 메모리 설정을 해주니 원활하게 이용 가능하게 됐습니다.


[client]

port=3306

socket=/run/mysqld/mysqld.sock

default-character-set=utf8mb4


[mysql]

default-character-set=utf8mb4


[mysqld_safe]

socket=/run/mysqld/mysqld.sock


[mysqld]

user=mysql

pid-file=/run/mysqld/mysqld.pid

socket=/run/mysqld/mysqld.sock

port=3306

basedir=/usr

datadir=/var/lib/mysql

tmpdir=/tmp

lc-messages-dir=/usr/share/mysql

log_error=/var/log/mysql/error.log

collation-server = utf8mb4_unicode_520_ci

init-connect='SET NAMES utf8mb4'

character-set-server = utf8mb4


symbolic-links=0

local-infile=0


skip-external-locking

key_buffer_size = 512M

max_allowed_packet = 64M

table_open_cache = 512

sort_buffer_size = 32M

read_buffer_size = 32M

read_rnd_buffer_size = 40M

myisam_sort_buffer_size = 64M

thread_cache_size = 32

query_cache_size= 64M


#innodb_use_native_aio = 0

default_storage_engine = InnoDB

innodb_buffer_pool_size = 48G

innodb_file_per_table = 1

innodb_log_file_size = 256M

innodb_buffer_pool_instances = 8

innodb_flush_log_at_trx_commit = 0

innodb_flush_method = O_DSYNC

innodb_io_capacity = 15000


max_connections=2000

max_user_connections=1000

wait_timeout=120

interactive_timeout=120

long_query_time=60


!includedir /etc/mysql/conf.d/

!includedir /etc/mysql/mariadb.conf.d/


라이믹스는 이온디와 함께

newcomment
닫기

마이페이지

로그인을 해주세요