Skip to main content

Posts

Showing posts from November, 2014

Throttling MySQL Enterprise Backup with cgroups

Today I encountered a situation where MySQL Enterprise Backup caused to much load on the I/O subsystem of the server to cause the application to be so slow that it wasn't usable any longer. So I wanted to limit the mysqlbackup process so it wouldn't cause any more issues. The mysqlbackup command has settings to for the number of read, write and process threads. The defaults are 1 read, 1 write and 6 process threads. So that isn't really useful for throttling as I was using the defaults. Using the ionice utility wouldn't work as that requires the CFG I/O scheduler. I found a solution in this blog post . It is to use cgroups on Linux. I had used cgroups before to test how a galera setup works when one of the three servers had a much slower CPU. # mkdir /cgroup/blkio # mount -t cgroup -o blkio non /cgroup/blkio # cgcreate -g blkio:/mysqlbackup # ls -lh /dev/mapper/vgdb01-lvdb01 lrwxrwxrwx 1 root root 7 Sep 26 14:22 /dev/mapper/vgdb01-lvdb01 -> ../dm-2 # ls -lh /...