I'm trying to test load a LAMP application that my team developed and deployed on AWS ubuntu 14.04 using jmeter. We are using AWS CDN to serve static files, mysql and apache are on the same host.
When there is only one user doing stuff, the response time is normal, between 2 and 5 seconds depending on the page.
My goal is to make it respond with that same time to 500 connected users doing stuff at the same time.
I started with smaller number of users, using mod_php and prefork module on a t2.small ( 1vCPU, 2 Gb RAM ) and I was satisfied with only 40 connected users. Once there are 100, it extremely slows down with a response time +20s.
I tried with php-fpm and event module after going on some SO ressources. The performance was better but remains slow; +15s for any single page. I decided to upgrade the server to M4.2xlarge( 8vCPU, 32 Gb RAM). For 100 connected users, it behaves normal and I'm satisfied, but that's an expensive one and I want to find the better performance using the most suited server spec.
Anyway, I tried to test this M4.2xlarge with 330 connected users doing stuff concurently, and it became too slow, +15~+20s per page. Been trying to tune event configuration, and fpm process with no luck (In most case I have +90℅ cpu, but enough RAM not being used that's why I yhink there us a limit somewhere).
I feel I'm so close but I can't do it. I will update my question with any file, log or ouptut you would ask for.