title: What should I consider for my pool size in database.yml?
body: <p>I've been having some thoughts on setting the appropriate pool size (in database.yml).</p>
  
  <p>I saw a similar question at <a href="https://stackoverflow.com/questions/12635152/what-is-the-use-of-the-pool-option-in-database-yml">what is the use of the pool option in database.yml</a> but needed to go further to understand this more.</p>
  
  <p>Here is my setup. I have instances running Unicorn with 5 worker process'. I also have Sidekiq instances with concurrency set to 5 (I am asumming thats 5 concurrent threads).</p>
  
  <p>What should I consider for my pool size? What are other factors should I take into consideration?</p>
  
  <p>This is my understanding so far (as quoted from an engineer I was speaking to earlier):</p>
  
  <blockquote>
    <p>Suppose you leave it at the default 5. It just means that, inside "a
    single process", the pool size is 5. The pool is
    per process. It is not system-wide so having a value of 5 does not
    mean that you are limited to 5 processes it just means that <em>each</em>
    process has its own pool, of size 5.</p>
  </blockquote>
  
  <p><strong>In summary</strong>, each instance has a db pool size of 5. This also means the db pool size setting is not app wide, but per process/instance. Which also means, since Sidekiq and Unicorn will run in its own instance. It will have its own db pool size of 5. Is this assumption correct?</p>
  
  <p>At this point, I can assume that the default pool size of 5 is generally safe. Your thoughts?</p>
  
  <p>PS. If you can share your pool size for your AWS RDS instances. That would be appreciated.</p>