Xenforo on Azure App Service (Linux) performance issue

366 Views Asked by At

I'm trying to install Xenforo (Forum software) on a Linux Azure Web App (App Service) which has been setup with:

  1. PHP 7.2
  2. Premium P1V2 Plan

It's also connected to an Azure MySQL Database (Version 5.7) with Basic 2 vCore (5 GB).

  • Xenforo version: 2.1.4

Problem

It took around 2 hours to finish the installation, which is way too long since it should take around 2-3 minutes. Also happening on plugins' installation. In particular the Importing... Master data (Phrases: xx.x%) phase takes forever.

Details

  1. There's no CPU nor memory usage exceeded warning, all seems healthy to the diagnostic tools and Xenforo's requirements test has been successfully passed.

  2. I tried to scale all plans to max level and nothing changed (Both MySQL and App Service)

  3. I also tried with MySQL 8.0.

  4. The connection to the website is very fast, only the Xenforo's installation and plugin's installation is slow, so I suppose it could be a file write issue or maybe some configuration (InnoDB?) or something related to compatibility.

Gen5 hardware specification (Microsoft docs)

  • Intel E5-2673 v4 (Broadwell) 2.3-GHz and Intel SP-8160 (Skylake)* processors
  • Provision up to 80 vCores (1 vCore = 1 hyper-thread)
  • 5.1 GB per vCore (Memory)
  • Provision up to 408 GB (Memory)
1

There are 1 best solutions below

4
Wilson Hauck On

Rate Per Second = RPS

Suggestions to consider for your Azure portal, SETTINGS, Server parameters

thread_cache_size=64  # from 9 to reduce threads_created - an expensive operation
read_rnd_buffer_size=192K  # from 512K to reduce handler_read_rnd_next RPS of 57
innodb_lru_scan_depth=100  # from 1024 to avoid 90% of CPU cycles used for function every second
tmp_table_size=32M  # from 16M to expand capacity in RAM
max_heap_table_size=32M  # from 16M to reduce created_tmp_disk_tables of 49 RPhr
innodb_open_files=-1  # to autosize based on table_open_cache at next restart of instance

The first 5 changes are dynamic and will take effect without instance restart.

Let us know how these few changes affect your query response time either good or bad. For additional assistance please view our profile, Network profile and download our free Utility Scripts for assistance with performance tuning.