Sudden Performance Drop in Manjaro After MySQL/MariaDB/Php Installation

Hi everyone,

I recently reinstalled Manjaro and wanted a simple way to monitor system performance. I created a script that calculates Pi for a brief period and logs the completion time. This time was consistently between 16 and 18 seconds for several months.

Here the script:

On March 11th, I had trouble installing and configuring MySQL/MariaDB. I also made some changes to PHP settings and possibly other system configurations. Unfortunately, I wasn’t careful in documenting all the changes I made, and my history file seems incomplete.

After these changes, my performance script now shows a slower completion time (around 25 seconds).

 420   │ 2024-03-09 17:01:17 root 16.44
 421   │ 2024-03-10 00:01:22 root 21.39
 422   │ 2024-03-10 11:01:18 root 16.67
 423   │ 2024-03-11 00:01:18 root 16.59
 424   │ 2024-03-11 01:01:17 root 16.49
 425   │ 2024-03-11 02:01:18 root 16.48
 426   │ 2024-03-11 12:01:27 root 25.53
 427   │ 2024-03-11 13:01:46 root 45.82
 428   │ 2024-03-11 14:01:28 root 26.45
 429   │ 2024-03-11 16:01:27 root 26.23
 430   │ 2024-03-11 23:01:26 root 25.81

If I can’t find a easy way to bring perfance back like it was before, I think I will reinstall again my machine.

Before reinstalling, I’d like to ask for advice on how to troubleshoot the performance issue. What specific things should I check or reinstall to try to fix the slowdown?

Thanks!

Depending on the load on your mariadb installation your system has more to do.

A database service does not come cheap … depending on system specifications.

Combine that with apache and php - and yes - your pi calculation may take longer.

But I don’t think you point to the result and say performance is degraded - after all you did setup additional services.

Hi @TAVGHY, and welcome!

As @linux-aarhus said, the database specifically does not come cheap, and like he also said, combined with Apache and PHP it can be heavy on a system. Especially considering it’s 3 server grade applications running constantly. Whether they are actively in use or not.

To confirm it’s them, you can stop them and run your test:

sudo systemctl stop apache2.service mariadb.service

And, depending on version of PHP:

sudo systemctl status php<phpVersion>-fpm.service

Where:

  • <phpVersion> is the version of PHP you have. My version 8.3, for example would be:
    sudo systemctl stop php8.3-fpm.service
    

If it’s that and you reinstall your system, you’ll only see an improvement until they are started again…

1 Like

By all means reinstall your system for the sake of a few seconds. That is what a typical Windows user might do when faced with an equally insummountable dilemma…

Or, if you really must save those precious few seconds, consider creating a script to start the respective services manually; when you need them. In this way, your system will not be affected by the additional overhead during boot.

Cheers.

Well this is a performance drop from 40%. I would certainly investigate. Probably just the database if it is a big thing, frequently accessed.
If half of your cpu time is taken from some process you would also be able to see it with some process monitor, be it top or gnome-monitor.

MariaDB is not causing that unless it’s being heavily used. If it’s not being used then there should be no impact on your system. Use ps -ef --sort +time to see what is using cpu time.

1 Like

This :point_up: (“no” meaning “negligible”).
RAM usage however might always be a problem even when that mariadb isn’t queried/taxed alot.
Also you did not share any system information, see

Great news. A system update resolved the performance issue I was experiencing.

Unfortunately, I wasn’t able to pinpoint the exact cause of the slowdown. This makes it difficult to learn from the experience.

Thanks to everyone who offered their help and suggestions!

That is great news.

please mark this topic as solved

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.