Environment is RHEL based, Percona mysql 8, partitioned history using stored procedures. This is a 8400 host server at 250 nps, 30 days history kept.
Followed the instructions in the doc thru running history_pk_prepare.sql.
Used the partition definitions in the latest "configuration backup" to rebuild the partition tables. Normal partition maintenance would only build current and future partitions, not those for the prior 30 days. That would work, but retain more history (using more space) than necessary.
Started with the mysqlsh copy process, the first table worked OK, history_uint was slowly progressing, then filled disk overnight. The disk space problem was binlogs, the slowness was lack of tuning, mysql was running with defaults. Steps to make things much faster:
This emphasizes the rule "TUNE MYSQL"!
Followed the instructions in the doc thru running history_pk_prepare.sql.
Used the partition definitions in the latest "configuration backup" to rebuild the partition tables. Normal partition maintenance would only build current and future partitions, not those for the prior 30 days. That would work, but retain more history (using more space) than necessary.
Started with the mysqlsh copy process, the first table worked OK, history_uint was slowly progressing, then filled disk overnight. The disk space problem was binlogs, the slowness was lack of tuning, mysql was running with defaults. Steps to make things much faster:
- Skip bin logs for the duration of this procedure. They will be turned back on later, we are not replicating the data.
- Enable large pages and set vm.nr_hugepages=1000
- Set innodb_buffer_pool_size=2G (Mysql and all zabbix stack is on the same 8Gb VM)
This emphasizes the rule "TUNE MYSQL"!
Comment