The PostgresSQL wiki suggest a rule for find the optimal amount of DB connection pool size.

amount = ((core_count * 2) + effective_spindle_count)

But it does not explain what the effective spindle count is and how can I find this value.

1 Answer 1


This relates to rotating harddisks (not SSDs). One rotating harddisk is one spindle.

So if your server uses e.g. a RAID with 16 disks, then your effective_spindle_count is 16

It is essentially a measure of how many concurrent I/O request your server can manage. Rotating harddisks can (typically) only handle one I/O request at a time. If you have 16, your system can handle 16 I/O requests at the same time.

The mentioned rule of thumb is no longer valid for SSDs. As they can typically handle several parallel I/O requests at the same time. I don't know however how you could obtain that number.

Which is also mentioned in the Wiki page you linked to:

There hasn't been any analysis so far regarding how well the formula works with SSDs.

  • 1
    That wiki page was last updated nearly 5 years ago, and the advice in question is even older. I/O queue depth might be more relevant today than the number of spindles, even if the latter are actually present.
    – mustaccio
    Feb 1, 2019 at 17:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.