Content
MySQL terrible slow on newly installed OpenProject
Added by Jens Baae almost 7 years ago
Hi all,
last week i installed OpenProject according to the download page (base system: CentOS7 on a Core2Duo 2.4GHz, 2GB RAM, 120GB SSD). Everything went fine until i tried to add some work packages to a newly created project.
Every time a want to add a package, change the relations or whatever, the system freezes. It needs from 30 seconds to 2 minutes to come back and be responsible again. Sometimes the browser gives up and shows “proxy error: error reading from remote server”.
I checked the cpu and mysql performance, and you can see the cpu at 100% (one of 2 cores) and mysql running a query during that time. See the screenshots i attached to this message.
Is there anything i can do to speedup the system?
Because at this level, it’s not usable.
Jens
Replies (9)
Hi Jens,
it would be helpful to know:
Regards
Jens
Hi Jens,
let’s see:
- OpenProject 7.3.2 (Mysql2)
- MariaDB 5.5.56
See the attached screenshots for an example sql query.
I have to mention that today the system seems to be more responsible compared to yesterday, even though i didn’t change anything.
Today it needs 5-15 seconds to be ready to go on after i changed a work package or inserted a new one. Not really fast, but usable.
I made the screenshots using mytop, then F “taskno.”. I changed the update cycle to 1 second. Then i can see that the DB process several queries in a line. Each query takes several seconds to complete.
It would be great if there are any ideas to improve the overall performance.
Jens
Given that it has become bearable I’d propose to wait for 7.4 to be released which should happen shortly.
The one query I could guess at was related to relations, a corner of the code we have invested in quite a bit in 7.4. If it isn’t a production setup and you feel up to the challenge, you could also install it manually now and see if that fixes the problem.
Only guessing but the reason why the server might become faster between days might be that the DBMS was stuck on some slow running operation (another query?) which it managed to get sorted out somewhere between your attempts.
You might also want to try out the statements posted on a console of the DBMS to see whether they are actually the slow ones or if they just happen to fall into your 1 second cycle.
If they are slow, you could try an explain and see if that helps to find out where e.g. an index might be missing.
As we don’t test on MariaDB (something I regret but for now at least MySql is still more widely used) it might be that the DBMS is disregarding indexes we offer it for one reason or another.
Then again, you could also just lie back and wait for 7.4 if that is an option.
Hi Jens,
thanks for the quick answer. Then i will wait for OP 7.4…
Two question about the DBMS:
- Why did the setup install MariaDB 5.5 instead of the current 10.2?
- Are there any general parameters to tune-up MariaDB?
The installation of MariaDB used in the setup is like out-of-the-box, no specific parameters are used. I checked the homepage of MariaDB, but got lost in the hundreds of optional parameters. But there are many hints in the internet about that topic. Would it make sense to use some tune-ups?
If i encounter the system to be short-time dead again, i will try to record the query used in this moment.
Jens
Ähhh,
if you didn’t test against MariaDB, why did the standard installer use this DBMS?
As i mentioned before, the installation of OP i did was according to the text at the OP homepage, running the installation via yum.
Jens
You are right Jens, but I still wasn’t aware of it as most of the distros are still using MySql.
Then, lets just wait and see if 7.4 fixes the problem.
Ok, no problem.
I just saw that the OP homepage will be update to 7.4 this night…
And i found that MariaDB 5.5 is the standard installation in CentOS, replacing MySQL. Maybe i will try an upgrade to 10.2.
Jens
I tried to open my internal OP page with Google Chrome, and it’s much faster compared to Firefox. Maybe that was also a reason OP feels so slow…
Jens
P.S. Changing MariaDB from 5.5 to 10.2 is possible, but the CentOS system state seems to be mixed-up afterwards. I went back to 5.5…