So I am new to passenger and I am trying to make sure I am getting optimal performance before going live with the site.
In the Optimization Guide from passenger they recommended using wrk to test the site. I installed it and tested against my site and the numbers look abysmal to say the least. I thought the Requests/sec would be a lot higher.
12 threads and 50 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 218.35ms 101.82ms 413.71ms 58.33%
Req/Sec 17.50 0.52 18.00 100.00%
4814 requests in 30.00s, 87.95MB read
Socket errors: connect 0, read 0, write 0, timeout 128
Requests/sec: 160.44
Transfer/sec: 2.93MB
I figured that this setup would yield a higher throughput.
All servers at Digital Ocean
1 Load Balancer (haproxy) 2GB Ram / 2 CPU
2 Web Servers (Nginx, Passenger Enterprise) 8GB Ram / 4 CPU
The CPU usage on the load balancer hovers around 40% when testing, but both the web servers CPUs spike to 100% usage the entire time. Its just hard to believe that 50 connections is utilizing 100% CPU usage on two servers. Here is a snippet of my nginx.conf for both servers.
passenger_max_pool_size 7;
passenger_min_instances 7;
Any ideas of why this looks so bad? Are my ruby process supposed to be using 100% CPU usage when I get 50 users on the site?
EDIT: Using passenger enterprise 5.0.4 and nginx 1.6.2