Skip to content

Instantly share code, notes, and snippets.

@cherts
Last active March 3, 2023 13:11
Show Gist options
  • Select an option

  • Save cherts/c74c16a55cbe43af692ea93f68329730 to your computer and use it in GitHub Desktop.

Select an option

Save cherts/c74c16a55cbe43af692ea93f68329730 to your computer and use it in GitHub Desktop.
Tuned profile for MySQL
apt-get -y install tuned
mkdir /etc/tuned/mysql
(cat<<-EOF
[main]
include=throughput-performance
summary=Tuned profile for MySQL Instances
[bootloader]
cmdline=transparent_hugepage=never
[sysctl]
vm.dirty_ratio=5
vm.dirty_background_ratio=2
vm.dirty_expire_centisecs=500
vm.dirty_writeback_centisecs=250
vm.swappiness=1
#vm.overcommit_memory=2
#vm.overcommit_ratio=100
[vm]
transparent_hugepages=never
EOF
)>/etc/tuned/mysql/tuned.conf
tuned-adm profile mysql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment