Forum: Ruby on Rails optimize la value of pool in database.yml

4b991e6bc2c354df945713544f637f63?d=identicon&s=25 john lee (optimumdulopin)
on 2013-10-21 00:16
(Received via mailing list)
Hi,
I would like to understand how to calculate optimal value for "pool"
parameter in database.yml

I'm using rails 3, ruby 2, postgres, elasticsearch, unicorn, nginx

My server : 12 coeurs 24 threads ( I dont know if it is necessary for
define pool value)
unicorn : worker_processes 24
I have around 1500 pages requested per minutes, and around 200ms per
request

Is it also useful/necessary to use this ?
    allow_concurrency: true

thanks
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2013-10-21 13:07
(Received via mailing list)
On Sunday, October 20, 2013 11:14:40 PM UTC+1, Oto Iashvili wrote:
>
> Hi,
> I would like to understand how to calculate optimal value for "pool"
> parameter in database.yml
>
> I'm using rails 3, ruby 2, postgres, elasticsearch, unicorn, nginx
>
>
My server : 12 coeurs 24 threads ( I dont know if it is necessary for
> define pool value)
> unicorn : worker_processes 24
> I have around 1500 pages requested per minutes, and around 200ms per
> request
>
>
Unicorn only dispatches one request at a time to each worker, so the
pool
setting doesn't matter: each worker will only process one request at a
time

Your numbers suggest you can do 5 requests per second per worker, ie 300
per minute per worker, so it seems that you have ample resources.
However
you'll probably need to do some testing to confirm this as it would only
be
true if CPU is your bottleneck (as opposed to database concurrency for
example)


> Is it also useful/necessary to use this ?
>     allow_concurrency: true
>
> not sure what that is without some context.

Fred
4b991e6bc2c354df945713544f637f63?d=identicon&s=25 john lee (optimumdulopin)
on 2013-10-23 01:29
(Received via mailing list)
thanks for answer
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.