0

Our mobile APIs were hosted in AWS EC2 instance and it was working very fast, say 300 ms. Recently we migrated to Azure VM and after that, all the API responses are very slow, say 2 to 8 secs.

The structure is below.

  • AWS EC2 instance size is 4 CPUs, 16GM RAM (t3.xlarge)
  • Azure VM is (Ds3v2) 4 CPUs, 16GM RAM
  • Program is built on Lumen framework (PHP), connected to Mysql

After discussing with Azure tech support, they suggest to upgrade the instance to F-series and I've done that too. But still I am facing this performance issue.

  • 1
    Which F series are you using? Storage optimized? Windows or Linux host? Additional information request. Post on pastebin.com and share the links. From your SSH login root, Text results of: B) SHOW GLOBAL STATUS; after minimum 24 hours UPTIME C) SHOW GLOBAL VARIABLES; D) SHOW FULL PROCESSLIST; E) STATUS; for server workload tuning analysis to provide suggestions. – Wilson Hauck Feb 02 '21 at 18:09
  • @WilsonHauck, I am using Standard F8s_v2 (8 vcpus, 16 GiB memory) and it is Linux based. CPU utilization has never reached 1% – Muhammed Shihabudeen Labba A Feb 04 '21 at 07:11

1 Answers1

1

This can happen for a variety of reasons, not necessarily VM related. The best way to find this out is to add logging / profiling to your app, so you can see where, exactly, is the bottleneck. I would add logging, at least:

  • When the request arrives to the server
  • When a DB query begins
  • When a DB query ends
  • When the response is returned to the client This will give you an indication about where the problem is.

In addition - did you look at the machine's metric? What's the CPU and RAM utilization?

ml123
  • 143
  • 4