On 2020-09-01 12:08, Ali Taher wrote:
I noticed that there is 48 database connections established by Kamailio (16 x 3) , can this cause an issue knowing that maximum worker processes is 24 ?
Postgres's ability to serve clients and accommodate queries isn't limited by the number of max_worker_processes. The default is 8 if this value is unset, yet any stock PostgreSQL instance can accommodate more than 8 concurrent connections, clearly. max_worker_processes != max_connections.
As far as the wisdom of setting process limits to equal the number of available CPU cores ("VCPUs"), there's no absolute answer to that. The general danger with doing this is just that a particularly expensive or destructive statement can consume all of the hardware resources, with no safety margins for other processes, and perhaps not even enough for someone to log in and resolve the problem. So, the general recommendation is not allow PostgreSQL to consume every single VCPU or max out any other resource, and that's why most Linux distributions' server packages come with these types of settings conservatively tuned.
-- Alex