0

Why is my Apache2 server with PHP-FPM experiencing significantly lower performance on AWS EC2 instances compared to DigitalOcean Droplets? Despite similar hardware specifications and configurations, the server on AWS is showing higher latency and lower throughput. Is there something in the network or configuration that could be causing this discrepancy?

When migrating to AWS EC2 I configured the servers on a clean fresh install of Amazon Linux 2 AMI kernel on t3a.micro (even better hardware than the one I was using on DigitalOcean) instance type. These new EC2 instances are geographically closer to my company's HQ, and therefore there should be less network latency.

I've tried changing Apache's MPM on AWS from prefork to event as well as tweaking PHP FPM's settings (process manager's number of child processes and so on) but still didn't notice a performance improvement. It takes way too much to load the pages and it seems that the server responds in a sequential manner (this didn't happen before migrating to AWS).

  • How significantly? How are you checking? Are the two servers in the same geographic location? Are the Apache configurations identical, including the default configs? Has your `t3` bursting instance run out of bursting credits? – ceejayoz Mar 06 '23 at 13:06
  • @ceejayoz I haven't measured it accurately, it's just that it takes quite longer (about more than 2 seconds) for the server to respond. I'm checking by opening several tabs on different pages on the browser, and the conditions are almost identical (same number of employees working simultaneously in the back office). Regarding the config, it's true, it's not identical, but I don't think I was using atypical configuration parameters on DigitalOcean. Geographic location is closer than previously. The instance doesn't run out of credits because there isn't high hardware usage (CPU, I/O, network). – robertpartfy Mar 06 '23 at 14:16
  • @ceejayoz How would you recommend checking/measuring the whole HTTP request (performance monitoring) to detect where is the bottleneck (be it EC2 disk, CPU, network usage or RDS' hardware) or the configuration issue? – robertpartfy Mar 06 '23 at 14:20

0 Answers0