Optimization for WordPress

Hi, i was recently testing the setup for WordPress using WP benchmark plugin WordPress Hosting Benchmark tool – WordPress plugin | WordPress.org

The benchmark show good result but seems to weak in Database performance. What could be the reason?

Virtualmin Install

same was then tested with different control panel.

We don’t know what database optimization options you used in the post installation wizard of Virtualmin or even what your system specs are, so it is difficult to say anything for sure with regard to database performance, and importing a large database could slow down due to many reasons not related to the database server configuration itself.

Database IOPS, these are usually are throttled by cheaper hosts.

“Importing large amounts of data” is disk speed and memory bound. So, most likely either your disk is slow or your memory is small for the amount of data being worked with, or both.

Nothing to do with Virtualmin. And, probably nothing to do with optimization. At least, probably nothing to do with optimization you can do in software.

the server in both cases are same and have same configuration. the server is fast and have faster disk. there is no optimization except redis install.

redis is a memory cache.

So i reviewed the database configuration and made the changes as per https://wpbenchmark.io/improve-wordpress-speed/

editing, /etc/mysql/mariadb.conf.d/50-server.cnf under [mysqld]

# InnoDB Optimizations
innodb_flush_log_at_trx_commit=0
innodb_file_per_table=1
innodb_thread_concurrency=0
innodb_buffer_pool_size=4G
innodb_buffer_pool_instances=8
innodb_log_file_size=512M
innodb_log_buffer_size=512M
innodb_io_capacity=2000
innodb_io_capacity_max=5000
innodb_checksum_algorithm=crc32
innodb_log_compressed_pages=OFF
innodb_change_buffering=all

# Query Cache (Only for MariaDB)
query_cache_type=1
query_cache_limit=128K
query_cache_size=64M
query_cache_min_res_unit=512

# Performance Schema (Disable for performance boost)
performance_schema=0

# SQL Mode
sql-mode="NO_ENGINE_SUBSTITUTION"

# Disable Binary Logging (Only if replication is NOT used)
disable_log_bin=1

Thank you for making this level of control in VM/webmin.

3 Likes

Well done, @aryan bhai!

2 Likes

Ouch… my score was 8… but look at the terrible DATABASE results:

But after the above mods… I got 8.8 and MUCH better database results:

Thank you SO much!!!

1 Like

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