I have a LAMP stack running on AWS with a m3.large instance (2 vCPU, 8GB RAM, SSD). The performance is horrible when any decent load gets on it. If no load, then home page of the Wordpress site is ~2 seconds. If I test it with Apache Bench with a load of just 50-100, it gets into the ~12 second range for page load.
I have tested all the pieces individually and they seem to be fine. I Apache Bench tested an info.php page for 100 users and it came back at 0.2 seconds. I also used Mysqlslap to load test 100 users and it came back about 0.2 seconds.
I have memcached installed and have tried all sorts of various settings in php.ini, my.cnf, and httpd.conf, but nothing seems to do any difference.
Any ideas?
Disable all plugins and see if that speeds up the response time. Then enable them one by one to find the issue. You can do this via the admin panel.
If you cannot access the admin panel, rename the plugin directory.