Hikaricp: What is recommended Connection pool size HikariCP?

Created on 10 Sep 2020  路  6Comments  路  Source: brettwooldridge/HikariCP

As written in HikariCP docs the formula for counting connection pool size is connections = ((core_count * 2) + effective_spindle_count). But which core count is this: my app server or database server? For example: my is app running on 2 CPUs, but database is running on 16 CPUs.

All 6 comments

Find out - server CPUs

what do you mean by server cpu? database CPU i assume?

Yeah, database cpu

Actually, whichever one is smaller. If your app server had 16 CPU鈥檚 and your db server had 2 CPU鈥檚, and you used 16 as the value, that formula will result in way too many connections on which SQL can execute, overloading the db server.

@brettwooldridge Oh, thanks. But what if other way around? If my database has 16 CPUs and app only has 2? I thought there is a benefit of caching more connections on client side because it's take more time to establish new one. But now I have some doubts.

While we're at it, can you point me what I need to do to reproduce that benchmark on oracle performance video? @brettwooldridge I wish I could replicate it and somehow have a living proof of a project that everyone else can do to benchmark their connection pool size on their own server configuration

Was this page helpful?
0 / 5 - 0 ratings