Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
553 views
in Technique[技术] by (71.8m points)

sql server - Maximum Connection Pool Size

I came across below text while reading about Database Connection pool properties:

The maximum pool size property specifies the maximum number of available and borrowed (in use) connections that a pool maintains. If the maximum number of connections are borrowed, no connections will be available until a connection is returned to the pool. This property allows the number of connections in the pool to increase as demand increases. At the same time, the property ensures that the pool doesn't grow to the point of exhausting a system's resources, which ultimately affects an application's performance and availability.

My Question is: When above text talk about 'exhausting system resources' does that mean degrading performance of Database? If answer is yes, why not databases have maximum connection limit that it can withstand without compromising with performance rather than relying on applications to specify proper maximum connection limit? Is there anything in database that says how much concurrent connection it can supports (say for Oracle/SQL Server?)

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

In general, the concern about "exhausting system resources" applies to both the application server and the database server. The more database connections you allow, the more concurrent sessions are running on the application server(s), the more RAM the application server(s) VM requires, the more demand is placed on CPUs on application servers and database servers, etc. If the queue of backlogged work gets too big, you may find yourself spending more time swapping processes on and off the CPU and scheduling tasks than in doing useful work. A maximum size on the connection pool allows you to handle an avalanche of traffic or an unexpected performance bottleneck slightly more gracefully by quickly erroring out rather than letting users time out waiting for replies that will never come.

Databases do, in general, have the ability to limit the number of connections they support. Oracle has PROCESSES and SESSIONS parameters, for example, and supports multiple connection architectures (dedicated server and shared server) to let you trade off performance against resource consumption to increase the number of concurrent connections the database can support.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...