I have test instance of Prestashop in AWS on EC2 t3.small (2 x vCPUs, 2GB memory) running Ubuntu with Apache2 + PHP 7.4 + MySQL 5.7.
I have cloned exactly the same setup to Azure App Service with PHP 7.4 (B1 1 vCP, 1.74GB memory) and MySQL Flexible Server 5.7 (Burstable 1 x vCore, 2 GB memory, 640 IOPS). MySQL is accessible via public network. Both AAS and MySQL are on the same region.
Both setups have the same configuration, AWS hosted Prestashop takes on average 2-3 seconds to load any page.The one in Azure takes around 1 minute and 30 seconds to load any page.
Metrics show none of the resources: CPU, memory, IOPS reaching 100% of usage.
I upgraded both Azue App Service to Premium (P1V2) and MySQL to Business Critical Tier (Standard_E2ds 2 vCores, 16 GiB, 5000 iops) and the results are the same.
Prestashop debug mode shows huge amount of time spent on querying.
I also connected to both AWS and Azure MySQL directly and executed the same query.
On average AWS is 3 times faster than Azure one (100ms vs 310ms).
One approach I haven't tried is to set MySQL on VNET, but would that improve the performance at all?
Maybe there is something I'm missing in the setup or maybe MySQL performance in Azure is questionable. I have seen other posts stating that running MySQL in Azure VM gives better performance than using managed one which would be crazy.