Tunning very high traffic Rails site

#1
Hi,

I have a site which must be rendering about 2M page views/day, but I am not being able to achieve this yet.

The first thing I did was to try the Enterprise Edition, since 150 connections was a bottleneck... now it's using about 600~700 connections.

Now, Rails is the bottleneck. I am getting 200~300 request at VHOST level, and I have 16 Rails instances (max connections on vhost level). Real time report shows me:

Request:

myVHost: 500 Requests in Processing; 200 Requests/Second

External Application:

myVHost: 16 Max CONN; 16 Eff Max; 16 Pool; 16 In Use; Idle: 0; WaitQ: 425; 53 Req/Sec

---

Suppose the DB is not the bottleneck, which would be the right way to optmize this? Just increasing the number of the VHost max connections? Or another setting would help it too?

Thanks!
 

mistwang

LiteSpeed Staff
#2
If you still have IDLE cpu cycles on that server, you can increase the "Max Connection", if not, increase "Max Connection" may not help much, you probably need to upgrade the server CPU or use cluster if it is CPU bound.

You need to make your rails application run as fast as it can. Using all kinds of cache if you can, Page cache, object cache, memcache to improve DB performance etc.
 
Top