[MDEV-28704] mariadb server consumes 100% of the cpus running in raspberry 64 bits Created: 2022-05-31 Updated: 2022-08-30 Resolved: 2022-08-30 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 10.5.15 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Enrique | Assignee: | Unassigned |
| Resolution: | Incomplete | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Description |
|
I have been running since a week or so a mariadb server in a raspberry 64 bits but very often it starts using all available cores all the time and it does not stop. The database is used by 4 different web services. The interesting thing is that I have been running the same database server, with the same load for years without problem using Raspbian 32 bits. I have now migrated to Debian 64 bits (arm64 architecture) and the problems have started. But it s actually the same mariadb version as well as the whole stack, since Raspbian OS is based on the same Debian 11 sources. I have not been able to correlate the problem with a given query or a particular database. Sometimes the problem starts to appear within minutes of the database restart and sometimes after a few hours. A restart of the database seems to restore a normal behaviour. The system logs do not show anything special. I am attaching the output of journalctl between two restarts where high CPU happened. I have also tried to set the global log with SET GLOBAL general_log=1 but apart from a flurry of queries I cannot say anything obvious. I have attached gdb and show the stack trace of a couple of threads that were showing high CPU usage in top. The trace does not tell me much, but I attach them here in case they bring some useful info. BTW, during the high CPU times, some of the services seem to continue working properly, although at some point it seems that mariadb stops servicing requests, at least for some of the services. |
| Comments |
| Comment by Enrique [ 2022-05-31 ] | ||||||||||||||
|
Some more context info:
The system is fully up to date, so the rest of the stack is what is provided by the Debian repos. This is running in a Raspberry PI 4. I attach the output of lshw. | ||||||||||||||
| Comment by Marko Mäkelä [ 2022-05-31 ] | ||||||||||||||
|
With this little information, it is really hard to say anything. If the ARMv6 or ARMv7 build of MariaDB that ran before upgrading to ARMv8 was before 10.5, then one of many possible causes could be that the innodb_log_file_size may have been effectively halved by | ||||||||||||||
| Comment by Marko Mäkelä [ 2022-05-31 ] | ||||||||||||||
|
Which MariaDB Server version was used before upgrading to the ARMv8 (Aarch64) ISA? What are the start-up parameters of the MariaDB server (in /etc/mysql or elsewhere)? | ||||||||||||||
| Comment by Enrique [ 2022-06-01 ] | ||||||||||||||
|
The version of MariaDB Server used before was exactly the same one :
But that wasn´t indeed the version in which the tables were created. They were created several years ago, so now I cannot tell for sure which version was used at that time. My guess is that it was 10.1.48 for one of the databases and 10.3.34 for the other 3 databases. | ||||||||||||||
| Comment by Sergei Golubchik [ 2022-08-01 ] | ||||||||||||||
|
The gdb trace shows that two threads are inside the SQL optimizer, looking for a best execution plan for your queries.' What SQL queries do you run there? |