Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best tuning practices, experiences with Puma + Heroku + Rails 4 + Ruby 2.0

I been reading nearly all articles covering Puma tuning on Heroku, yet I'm not being able to find the sweet spot here.

I have a site with around 100k / daily visits.

I tried using 2x Dynos. The app is an average Rails app that performs mostly selects hitting 80% of the time memcache directly. Ram usage per worker can be between 160-180mb.

I tried:

DB_POOL=25
PUMA_THREADS=16
PUMA_WORKERS=4

An also something like this:

DB_POOL=10
PUMA_THREADS=5
PUMA_WORKERS=5

None of the results were convincing to me. Pageviews are always down a % compared to last week and traffic of the site has no changed.

Does anyone have a experiencing in tuning high traffic sites that would like to share? Nearly all articles explain mostly the same configs but things start to get nasty when having 100 people visiting the site at the same time.

like image 962
Martin Avatar asked Sep 11 '13 01:09

Martin


1 Answers

I have stack rails 3 + capistrano + unicorn + ruby 1.9.1 on the project with 150-200k page views per day. I can advice you install 'newrelic' to your VPS to monitor bottlenecks of your application.

Digitalocean is nice, but they didn't serve droplets with big amount of memory and cores at Amsterdam datacenter in the moment when we choose hosting. So we used hetzner dedicated servers with SSD and lower price at higher performance.

like image 172
Voldemar Duletskiy Avatar answered Nov 04 '22 02:11

Voldemar Duletskiy