• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question Poor wordpress database performance on Plesk server... any ideas?

lanix343

Basic Pleskian
Hey Folks,

I've been having a quite frustrating issue that I can't seem to solve. I am running mostly simple and small WordPress Websites on the Server and performance when updating/installing Plugins or doing anything in the Backend is slow.

Using a Plugin called WPPerformanceTester I've been able to compare Queries Per Second on a few different servers and my Sever seems to be very slow when it comes to QPS. I am a novice and I can only tell that the Sites are running rather slow on my server as opposed to other Servers. I asked the Host to check it out and they are also surprised as the QPS on other Servers on the same hosting environment are much faster. It seems that Plesk has something to do with slowing down the DB....

Here is a screenshot of my Plesk Server:

Here are the specs (in German sorry):

1611936549030.png

And the Performance Test:


1611936485977.png

and with another tool:

1611936664105.png

The performance issue seems to relate to these 2 Points:

1611936688386.png



Here is a snapshot of that same test on a different very cheap shared server (GoDaddy):

1611936745649.png

And the QPS Test on that same cheap server:

1611936792814.png

As you can see there are quite big difference in performance.

I have another Server also Running plesk. That one is slower than the cheap shared server but still much faster than my main server with the best hardware specs.

Any ideas how I can optimize DB Speed for my main server?

Best
Thomas
 
Thats interesting. What database version of MySQL or Maria DB are you running? And which Plesk version?
 
Your servers hardware specs are certainly impressive. However make sure you are comparing apples with apples. The specific server configuration, software versions being used and as well as current server load all impact performance.

I noticed in your screenshot that you've got a large number of databases running on your server. I imagine those databases are probably not all idle ;) Which may very well impact your servers performance performance. Do the other servers you've got running (GoDaddy, Siteground, Raidboxes, ect) have the same number of databases running?

Using the MariaDB 10.1 branch ins't bad. In my experience however the > 10.2 branches have a slightly better performance. Especially with a large number of databases running.

As far as I am aware Plesk doesn't throttle or limit the database server. It just uses the databas server provided with the OS as is. But Plesk doesn't tune or optimize the database server either.
 
Your servers hardware specs are certainly impressive. However make sure you are comparing apples with apples. The specific server configuration, software versions being used and as well as current server load all impact performance.

I noticed in your screenshot that you've got a large number of databases running on your server. I imagine those databases are probably not all idle ;) Which may very well impact your servers performance performance. Do the other servers you've got running (GoDaddy, Siteground, Raidboxes, ect) have the same number of databases running?

Using the MariaDB 10.1 branch ins't bad. In my experience however the > 10.2 branches have a slightly better performance. Especially with a large number of databases running.

As far as I am aware Plesk doesn't throttle or limit the database server. It just uses the databas server provided with the OS as is. But Plesk doesn't tune or optimize the database server either.
Thanks for the info on the # of DB's. I was not aware that the mere number of DB's could impact performance per se. Of course some of these DB's are active and putting load on the system but it is not so much as the CPU and DB ultilization is quite minimal. I tried using Litespeed Webserver to see if I get better performance but the bottleneck seems to be the DB in any case....
 
Have you used MySQLTuner to identify what MySQL/MariaDB are doing and where you can optimize the performance?
I don't know how to use SQLTuner mit might be worth looking into.. But when i do a clean WP install with a clean DB hiw is the SQLTuner going to provide better performance or does the Tuner optimize the whole DB (server side)?
 
I setup a clean Plesk Install on CentOS on a small Shared vserver (root)

1612010635108.png


and here is the result I got. The server has nothing else installed other than Plesk and a Clean WP Install. Seems like Plesk is the bottleneck in for Wordpress not allowing for better performance? I mean this is still better than my main server but not close to the 1500 QPS that i get with other hosters like Siteground, Allinkl, Raidboxes etc.


1612010558380.png

Also here the numbers are not so good...



1612010711947.png
 
As @Rasp has already pointed out, Plesk does not throttle the database.

MySQLTuner hooks up to SQL transactions and provides an insight what your databases want and what they are doing. This gives you specific values you can use for optimizing your database server configuration such as the size of the cache, max packet sizes, max connections, temporary table size etc. Bigger is not always better, e.g. a cache can put the brakes on if it is too large, because then searching the cache can take more time than running the full query.

MariaDB 10.1 is more than sufficient and provides perfect speed. I'd guess that besides optimizing database server settings you should look into your disk I/O speed instead and the default database and table file formats. A check into /var/log/messages for mysql or mariadb related messages could also reveal some issues.

It is also possible, that cgroups are limiting the cpu usage of a specific service. And you are testing on a virtual server, which shares its resources with many other customers on the physical machine. You'll never really know how much share you get in disk access time and cpu slices, regardless of what the provider says that his virtualization can do.
 
As @Rasp has already pointed out, Plesk does not throttle the database.

MySQLTuner hooks up to SQL transactions and provides an insight what your databases want and what they are doing. This gives you specific values you can use for optimizing your database server configuration such as the size of the cache, max packet sizes, max connections, temporary table size etc. Bigger is not always better, e.g. a cache can put the brakes on if it is too large, because then searching the cache can take more time than running the full query.

MariaDB 10.1 is more than sufficient and provides perfect speed. I'd guess that besides optimizing database server settings you should look into your disk I/O speed instead and the default database and table file formats. A check into /var/log/messages for mysql or mariadb related messages could also reveal some issues.

It is also possible, that cgroups are limiting the cpu usage of a specific service. And you are testing on a virtual server, which shares its resources with many other customers on the physical machine. You'll never really know how much share you get in disk access time and cpu slices, regardless of what the provider says that his virtualization can do.
Thanks for this information, unfortunately I don't have the technical skills to try this out.. I imagine that since i don't have root access on the service (since it is a managed server) I won't be able to tweak it anyways. I keep wondering why it is not possible to get anywhere near the DB speed values for WordPress with any Plesk Server I try... Could it be that Plesk is the bottleneck in the equation? Because the other shared servers not runnig plesk all have better performance values when it comes to the individual WP Installations..
 
Well here is another installation i've now done clean on vultr with a cloud droplet that is extemely powerful (16cores and 32GB Ram) and again issues with the Database performance in Wordpress.

Is there a way to check Raw DB performance outside of wordpress with SSH or any other tool so i can benchmark the servers against each other this way?
I would really like to get these WP Specific performance increases with my Plesk server but my theory seems to hold ground that Plesk is just not bringing the performance that other hosting env. are producing regardless of hardware..

1612016171393.png


1612016640350.png
 
You don't seem to understand what Plesk is. It has nothing to do with your database server. Plesk creates a very small database called "psa" in any existing database server software. It does not configure the database server, nor does it put any load on it on a regular basis. It is almost "inactive" when you're not logged in and not currently doing anything in the Plesk user surface. It just stores its own configuration an the settings that users do in Plesk. Besides that, it has nothing to do with your database. I guarantee it puts way less load on the database server than your Wordpress website, actually any Wordpress website.

If you don't have SSH access to your system, all the testing is nonsense. You need SSH access and you need to run a tool like MySQLTuner, that will reveal what is really happening. You also need to run Linux command dd like "dd if=/dev/zero of=/root/testfile bs=1G count=1 oflag=direct" or "dd if=/dev/zero of=/root/testfile bs=512 count=1000 oflag=direct" to do hard disk performance tests.

All this Wordpress benchmark stuff is just nonsense. Are you even sure hat you have your own database server that resides on your own physical server? You need to do real, thorough testing in your operating system on your own machine. Anything else is a waste of time.
 
what Plesk is. It has nothing to do with your database server. Plesk creates a very small database called "psa" in any existing database server software. It does not configure the database server, nor does it put any load on it on a regular basis. It is almost "inactive" when you're not logged in and not currently doing anything in t
You don't seem to understand what Plesk is. It has nothing to do with your database server. Plesk creates a very small database called "psa" in any existing database server software. It does not configure the database server, nor does it put any load on it on a regular basis. It is almost "inactive" when you're not logged in and not currently doing anything in the Plesk user surface. It just stores its own configuration an the settings that users do in Plesk. Besides that, it has nothing to do with your database. I guarantee it puts way less load on the database server than your Wordpress website, actually any Wordpress website.

If you don't have SSH access to your system, all the testing is nonsense. You need SSH access and you need to run a tool like MySQLTuner, that will reveal what is really happening. You also need to run Linux command dd like "dd if=/dev/zero of=/root/testfile bs=1G count=1 oflag=direct" or "dd if=/dev/zero of=/root/testfile bs=512 count=1000 oflag=direct" to do hard disk performance tests.

All this Wordpress benchmark stuff is just nonsense. Are you even sure hat you have your own database server that resides on your own physical server? You need to do real, thorough testing in your operating system on your own machine. Anything else is a waste of time.
I will ask my sysadmin to do these checks and let you know.

Just out of curiosity. I installed a WP Instance on the droplet without plesk (just pure WP with CentOS) and the values seem better. How can this be explained all things staying equal. ?

1612021203807.png
1612021233178.png
 
Quite a lot of providers offer their hosting with optimized server configuration. Raidboxes is a great example of this. Their business is modeled towards Wordpress, providing servers configured and optimized just for Wordpress. Other providers do this too. I haven't used Vultr myself, but I know a lot of cloud providers use their own custom OS images which they have optimized for hosting. For example if you install CentOS on a vps/droplet with a cloud/hosting provider it likely isn't the default OS image, but rather an centOS image (pre)configured (and in one way or another optimized) by the provider for (web)hosting usage. (Which makes sense, because that whats it is going to be used for).

In contrast, Plesk is often offered with the default server software configuration by providers on VPSses/droplets/images. Meaning unfortunately no database optimization of any kind. Plesk itself isn't the bottleneck, it is the lack of (database) optimization. Which is especially noticeable when you compare the performance to hosting that has been optimized.

Still, I think you've raised an interesting point. Perhaps Plesk should make a bit more effort in providing tools to optimize the database server for it's users. Could be a use full addition to the Wordpress Toolkit.
 
Quite a lot of providers offer their hosting with optimized server configuration. Raidboxes is a great example of this. Their business is modeled towards Wordpress, providing servers configured and optimized just for Wordpress. Other providers do this too. I haven't used Vultr myself, but I know a lot of cloud providers use their own custom OS images which they have optimized for hosting. For example if you install CentOS on a vps/droplet with a cloud/hosting provider it likely isn't the default OS image, but rather an centOS image (pre)configured (and in one way or another optimized) by the provider for (web)hosting usage. (Which makes sense, because that whats it is going to be used for).

In contrast, Plesk is often offered with the default server software configuration by providers on VPSses/droplets/images. Meaning unfortunately no database optimization of any kind. Plesk itself isn't the bottleneck, it is the lack of (database) optimization. Which is especially noticeable when you compare the performance to hosting that has been optimized.

Still, I think you've raised an interesting point. Perhaps Plesk should make a bit more effort in providing tools to optimize the database server for it's users. Could be a use full addition to the Wordpress Toolkit.

That makes a lot of sense to me.. seems like plesk is not optmized for WP Performance.

Optimization would be a great place to start but can you tell me what would be some quick wins to optimize DB performance and how it can be executed on a server level?
 
I think it would be helpful to know which mysql/mariadb versions are running on which server, and the differences of their mysql.conf/mariadb.conf files.
 
Back
Top