MariaDB - low-hill/Knowledge GitHub Wiki

ํŠœ๋‹

  • /lib/systemd/system/mariadb.service
    • LimitNOFILE
  • /etc/mysql/mariadb.conf.d/ ๋””๋ ‰ํ† ๋ฆฌ์— ์žˆ๋Š” 50-server.cnf ํŒŒ์ผ์„ ์ˆ˜์ •
  • innodb option
innodb_buffer_pool_size : ์ „์ฒด ๋ฉ”๋ชจ๋ฆฌ์˜ 50% ~ 80%๊นŒ์ง€ ์„ค์ •ํ•˜๋ฉฐ ๋‚ฎ์€ ๊ฐ’๋ถ€ํ„ฐ ์กฐ๊ธˆ์”ฉ ํฌ๊ธฐ๋ฅผ ์˜ฌ๋ ค๊ฐ€๋ฉฐ ์ ์ ˆํ•œ ๊ฐ’์„ ์ฐพ๋Š” ๊ฒƒ์ด ๊ฒƒ์ด ์ข‹๋‹ค.

innodb_log_buffer_size

innodb_file_per_table

innodb_log_file_size

innodb_max_dirty_pages_pct
ํŒŒ๋ผ๋ฏธํ„ฐ ๊ฐ’
innodb_buffer_pool_size ์ „์ฒด ๋ฉ”๋ชจ๋ฆฌ์˜ 50% ~ 80%๊นŒ์ง€ ์„ค์ •ํ•˜๋ฉฐ ๋‚ฎ์€ ๊ฐ’๋ถ€ํ„ฐ ์กฐ๊ธˆ์”ฉ ํฌ๊ธฐ๋ฅผ ์˜ฌ๋ ค๊ฐ€๋ฉฐ ์ ์ ˆํ•œ ๊ฐ’์„ ์ฐพ๋Š” ๊ฒƒ์ด ๊ฒƒ์ด ์ข‹๋‹ค.
innodb_flush_log_at_trx_commit 0 / 1 / 2 (more performance, less reliability)
innodb_log_file_size 128M โ€“ 2G (does not need to be larger than buffer pool)
innodb_flush_method O_DIRECT (avoid double buffering)
  • DB ์žฌ๊ธฐ๋™
sudo systemctl damon-reload
sudo systemctl restart mariadb