So I have an Amazon EC2 small instance setup on Ubuntu with Ruby Enterprise Edition running on Passenger + Nginx. I set 25 Passenger instances and performance is dropping very quickly relative to the number of concurrent connections.
For example, at 1 concurrent connection from JMeter, the response time is less than 1 second. Then at 5 concurrent connections, the response time jumps over 1 second. By the time I'm trying 10 concurrent connections the response time is averaging between 3-7 seconds!!
I imagined since I have 25 instances running, it should at least be able to handle 25 concurrent connections without much performance degradation? Obviously I'm a newbie to Web servers and all... Can someone explain to me the cause of this performance degradation?
Is it... that CPU is too slow? I feel like 1.7GB of memory should be plenty... Considering each instance apparently is running only about 30MB of memory.
Any further insights into how to configure Passenger + Nginx correctly would be greatly appreciated!!