Good to note that mariadb is consuming considerable CPU, but examine memory utilization as well. Can you open a shell window and examine the total memory utilization to see the amount of memory used vs available just before, during, and after accessing the php.ini file?