skip to Main Content

I have 3 mariadb galera db’s, 2 nginx/php machines at these sizes
DBs – E8ds_v5, nginx/php-fpm – D4ds_V5
I am getting really bad performance from mariadb. These machines are in the same vnet, but different subnets for db and web. The two nginx/php-fpm servers share web files through and azure files premium nfs share which seems to be working OK.

I have tried upgrading the storage of the DBs to P40 with no change in performance. Currently testing with an upgraded instance size(only one server to test) to E20ds_v5, Storage at Premium SSDv2 (30,000 IOPS, 500 MB/s)

I am running wordpress benchmarks and timing db queries to a barebones wordpress install with absolutely no change in score no matter what is done. The barebones wordpress install is pointed directly to the upgraded machine at the moment. My next step is to try and use MySQL Flex, but it would be great if I could get this self hosted mariadb working.. no matter what amount of tuning is done, things seem to remain the same, slow.

I think the biggest problem is that I get terrible performance if MySQL is not running locally to where PHP is being processed.

Galera DB INFO requested

Here are the benchmark scores from WordPress Hosting Benchmark tool with different setups.

Benchmark of nginx/php-fpm/mariadb on the same VM (Standard_D1_v2) – NODATA

Benchmark of nginx/php-fpm/mariadb on the same VM (Standard_D1_v2) – WITH DATA

When using 2 NGINX/PHP-FPM servers with 1 separate MySQL 8 FLEX DB (different subnet) Business Critical, E16ds_v5, 16 vCores, 128 GiB RAM, 256 GiB storage NO DATA

When using 2 NGINX/PHP-FPM servers with 1 separate MySQL 8 FLEX DB (different subnet) Business Critical, E16ds_v5, 16 vCores, 128 GiB RAM, 256 GiB storage DATA

When using 2 NGINX/PHP-FPM servers with 3 dbs(galera, different subnet from web) mentioned above DATA

When using 2 NGINX/PHP-FPM servers with 1 maria db (same subnet) mentioned above NO DATA

2

Answers


  1. Chosen as BEST ANSWER

    The problem turned out to be the slow Azure Files NFS system. Even though it was a Premium(Hot) NFS 4.1 fileshare, it was too slow.

    We built our own HA NFS server and haven't had problems with the DB anymore.


  2. Rate Per Second = RPS

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

    innodb_buffer_pool_size=24G  # from 48G until more than 10G is used
    thread_pool_size=6  # from 16 you only have 8 cpu's 
    read_rnd_buffer_size=16384  # from 4M to reduce innodb_data_read RPS of 114,229 
    read_buffer_size=524288  # from 3M to reduce innodb_data_read RPS of 114,229 
    innodb_lru_scan_depth=100  # from 1024 to reduce 90% CPU cycles used for function.
    

    There are many more opportunities to improve performance. Please view my profile.

    Observation,
    innodb_secondary_index_triggered_cluster_reads had 1,878,540 reported in 16 hours. This is usually caused by table(s) with NO Primary Key. For a query to find the tables of this nature, please provide an email address.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search