We run a Magento 1.9 online store. It contains 110,000 products. We are running into issue around long page load times for category pages and product pages.

Dedicated WebApp server specs: - Apache 2.4 - PHP 5.6 - PHP.ini heavily tweaked, along with an 8GB Redis cache - 6 CPU Cores - 16GB Memory - SSD Storage

Dedicated Database Server: - MySQL 5.6 (tuned with MySQL Tuner). - 6 CPU Cores - 16GB Memory - SSD Storage

The site hasn't launched yet as we are trying to fix these performance issues.

Seems to me the bottleneck is the database. I've read nearly every article I could find on improving performance but we are still at 6-11s load times.


innodb_buffer_pool_instances = 11
innodb_log_file_size = 1024M
innodb_buffer_pool_size = 12000M
query_cache_size = 64M
query_cache_type = 0
query_cache_limit = 2M
key_buffer_size = 36M
max_heap_table_size = 16M
tmp_table_size = 256M
join_buffer_size = 8M
max_allowed_packet = 16M
innodb_read_io_threads = 8
innodb_write_io_threads = 8
innodb_thread_concurrency = 12
max_connections = 500
thread_cache_size = 32
thread_concurrency = 12
innodb_flush_log_at_trx_commit = 2


Actual server resource usage is low. I'd love any recommendations on how we can improve the load speed and increase server resource usage of CPU and Memory.

  • correct way to debug it - do not change any settings - install Aoe_Profiler
    – MagenX
    May 24 '19 at 22:18
  • Thanks, this AOE Profiler gives an amazing graphical break down. This is indicating that header.phtml is taking 5.1s to load. Time to do some more investigation
    – James
    May 25 '19 at 10:34
  • Additional information request. Post on pastebin.com and share the links. Text results of: B) SHOW GLOBAL STATUS; after minimum 24 hours UPTIME C) SHOW GLOBAL VARIABLES; D) SHOW FULL PROCESSLIST; E) complete MySQLTuner report AND Optional very helpful information, if available includes - htop OR top OR mytop for most active apps, ulimit -a for a linux/unix list of limits, iostat -xm 5 3 for IOPS by device and core/cpu count, df -h for a linux/unix free space list by device, for server workload tuning analysis. May 31 '19 at 20:52
  • @james If you could post additional information requested May 31, suggestions will be made for you to improve performance. Jun 8 '19 at 14:01
  • @james If you could post additional information requested May 31, suggestions will be made for you to improve performance - 3rd time might be the charm. Jun 22 '19 at 23:28

Suggestions to consider for your my.cnf [mysqld] section

innodb_lru_scan_depth=100  # from 1024 to reduce amount of CPU work every second by 90% for this function
innodb_read_io_threads=64  # from 8 to raise restriction
innodb_write_io-threads=64  # from 8 to raise restriction
thread_cache_size=100  # from 32 to reduce threads_created
query_cache_size=0  # from 64M conserve RAM since query_cache_type=0 which is OFF
query_cache_limit=0  # from 2M to conserve RAM
tmp_table_size=160M  # from 256M for 1% RAM
max_heap_table_size=160M  # from 16M to be matched to tmp_table_size

Disclaimer: I am the content author of website mentioned in my profile, Network profile with contact info. Please post comment on positive / negative results after implementation + 24 hours.

  • @james One more suggestion, innodb_io_capacity=1900 # from 200 to allow higher IOPS to your SSD devices Have you used any of the suggestions of July 30, 2019? Results positive/negative? Please leave comment. Sep 27 '19 at 17:52
  • @james Did you get your site to production? Were the suggestions above helpful? Nov 7 '19 at 2:12

Flat catalog tables enabled? If not, enable them. The unions for EAV attributes are time consuming. If large tables are being sorted, it has to write to disk to sort. If you have too many attributes, you should be sure they are properly configured.

I won’t dive into the fact that you are launching on an end of life version of PHP where 7.x has proven to have a major performance improvement.

—— update

Check to make sure that your top navigation is being cached.

  • php version is not a problem here
    – MagenX
    May 24 '19 at 22:21
  • I understand your point of view that php 5.6 is not a problem here, but to me, any end-of-life php version is a problem. Php 7.x serves twice the requests in half the time, so if it’s not a problem now, it will be eventually.
    – df2k2
    May 26 '19 at 11:34
  • I support the comment suggesting upgrading to php 7. Difference between this and 5.6 is noticeable. The only way to get 5.6 to work as fast is to implent opcache. May 26 '19 at 16:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.