I'm trying to understand why Percona
and xtradb
InnoDB/MySQL
behaves the way it does and if there's anything I can change in the configuration to fix it.
I've a InnoDB database with only one table with about 10 rows.
`ID` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`randomnumber` INT(11) NULL DEFAULT NULL,
PRIMARY KEY (`ID`)
When I insert a single row, about 1-2 seconds after commit the mysql process causes 30-40% CPU usage for about one second.
INSERT INTO status
.statustest
(randomnumber
) VALUES ('1111111');
But when inserting one row every 500ms for 10 seconds (so in total 20 rows), the CPU spikes only after the last commit.
I found a similar question, but there was no answer to it:
I see this behaviour only with Percona
and XtraDB
, not with MariaDB
.
My system:
2GB RAM
2CPU Cores
20GB SSD
Debian 9.9 x64
mysqld Ver 5.7.26-29 for debian-linux-gnu on x86_64 (Percona Server (GPL), Release '29', Revision '11ad961')
Has anyone found a solution as how to get rid of those CPU spikes
and what causes them?