100 or less requests per second (for non-cached pages), what can you expect with Rails?

Foreword: Please do not start a discussion of premature optimization or anything related. I'm just trying to figure out what kind of performance I can get from a single server with rails.

I tested rubies on rails 3 and it seems that the highest query speed per second I can get is around 100 queries per second.

I used a phusion passenger with nginx and Ruby 1.8.7.

This is an instance of ec2 m1.large:

7.5 GB memory 4 EC2 Compute Units (2 virtual cores with 2 EC2 Compute Units each) 850 GB instance storage 64-bit platform I/O Performance: High API name: m1.large 

The page was a very simple action that wrote a single line in mysql.

 user = User.new user.name = "test" user.save 

I do not assume caching (memcache, etc.), I just want to understand what raw numbers are.

I used the apache scanner on one instance of ec2, and I used different levels of # requests (from 1000 to 10000 and different numbers of simultaneous requests 1/5/10/25/50/100).

+6
source share
1 answer

The EC2 m1.large really not that fast, so these numbers are not surprising. If you want performance, you can use spring for a larger instance, as there are currently some of the 80 ECUs or try a different provider.

I found that Linode usually offers better performance at the same price, but not as flexible and does not scale to a very large number of servers. This is much better if you are at the "less than 20 servers" stage.

Also don't think MySQL is a free operation.

+3
source

Source: https://habr.com/ru/post/901630/


All Articles