SQL SERVER(express)中的连接池 - 推荐数量?

Connection pooling in SQL SERVER (express)- recommended amount?(SQL SERVER(express)中的连接池 - 推荐数量?)

本文介绍了SQL SERVER(express)中的连接池 - 推荐数量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于我用于连接池的每个应用程序是否有推荐的连接数量..,我的应用程序在相同"服务器上针对 sql express 使用 asp.net 和 c#.

is there a recommended amount of connections fro each application i have for use with connection pooling.., my apps are using asp.net and c# against sql express on the "same" server.

我有 5 个应用程序正在运行,它们没有被大量使用,所有连接都打开和关闭..

I have 5 applications running, they are not used intensively, all connections are opened and closed..

所以我正在考虑将每个应用设置为 min pool = 5

So i was thinking of setting each app to have min pool = 5

所以这 5 x 5 = 25

so this 5 x 5 = 25

sql express 可以处理 25 个连接...实际上是 5 个池和每个池 5 个连接吗?

Can sql express handle 25 connection ... well actually 5 pools and 5 connections each pool?

我可以增加到十个吗?是否有必要将 MAX 池属性放在连接字符串中以确保每个池不会超过一个数字?

Could i go up to ten? And is it necessary to put MAX pool property in the connection string to ensure i don't go over a number per pool?

非常感谢任何帮助

推荐答案

连接数无关紧要.你可以让连接池大小默认为100.

The number of connections does matter little. You can let the connection pool size at the default 100.

重要的是请求的数量.SQL Express 的限制之一是它只能运行一个 调度程序,因此实际上它只使用一个 CPU 内核.这限制了可以处理的请求数.没有硬性限制,只是在您开始注意到应用程序性能下降之前,一个 CPU 内核只能处理一定数量的工作(请求需要更长的时间才能完成).

What matters is the number of requests. One of the limitations of SQL Express is that it only runs one scheduler, so in effect it utilizes only one CPU core. This limits the number of requests that can be processed. There is no hard limit, is just that the one CPU core will be able to handle only a certain amount of work before you start noticing performance degradation in your applications (requests take longer to complete).

Express 的第二个重要限制是最大 1 GB 缓冲池大小.这限制了可以缓存的数据量和过程缓存的大小.结果是更短的内存页生命周期和更高的 I/O,以及更频繁的计划编译.所有这些再次导致性能逐渐下降.

The second important limitation of Express is the 1 GB max buffer pool size. This limits the amount of data that can be cached and the size of the procedure cache. The result is shorter page in-memory lifetime and higher I/O, as well as more often compilations of plans. All these again contribute to gradual performance degradation.

正如您在 SQL Express 中看到的那样,您没有达到硬性限制并且它停止工作,只是受限于它分配的硬件资源,结果是总吞吐量有限.当您接近吞吐量限制时,性能开始下降.

As you see with SQL Express there is no hard limit you reach and it stops working, is just that is constrained in what hardware resources it allocates and the result is a limited overall throughput. As you approach that throughput limit, performance start to degrade.

在旧版本的 MSDE 上,查询限制为 5 个并发请求,在第 6 个请求时,MSDE 引擎会人为地减慢自身速度.

On the older version MSDE there was a query limit of 5 concurrent requests, on the 6th requests the MSDE engine would artificially slow itself down.

这篇关于SQL SERVER(express)中的连接池 - 推荐数量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:SQL SERVER(express)中的连接池 - 推荐数量?

基础教程推荐